Authentication
- API key:
Authorization: Bearer <API key>
- 401 Unauthorized — Missing/invalid authentication
- 404 Not Found — Dataset or log not found
- 400 Bad Request — Invalid request body
curl --request PUT \
--url https://api.keywordsai.co/api/datasets/{dataset_id}/logs/{log_id}/ \
--header 'Authorization: Bearer <token>'
Authorization: Bearer <API key>
{
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
},
{
"role": "assistant",
"content": "The capital of France is Paris."
}
],
"model": "gpt-4",
"parameters": {
"temperature": 0.7,
"max_tokens": 150
},
"metadata": {
"user_id": "user123",
"session_id": "session456"
}
}
curl -X PUT "https://api.keywordsai.co/api/datasets/{dataset_id}/logs/{log_id}/" \
-H "Authorization: Bearer <API key>" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
},
{
"role": "assistant",
"content": "The capital of France is Paris."
}
],
"model": "gpt-4",
"parameters": {
"temperature": 0.7,
"max_tokens": 150
},
"metadata": {
"user_id": "user123",
"session_id": "session456"
}
}'
{
"id": "log_12345",
"dataset_id": "dataset_67890",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
},
{
"role": "assistant",
"content": "The capital of France is Paris."
}
],
"model": "gpt-4",
"parameters": {
"temperature": 0.7,
"max_tokens": 150
},
"metadata": {
"user_id": "user123",
"session_id": "session456"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T11:45:00Z"
}
Was this page helpful?
curl --request PUT \
--url https://api.keywordsai.co/api/datasets/{dataset_id}/logs/{log_id}/ \
--header 'Authorization: Bearer <token>'