Skip to main content
GET
/
api
/
v2
/
experiments
/
{experiment_id}
/
logs
/
{log_id}
Retrieve experiment log (V2)
curl --request GET \
  --url https://api.keywordsai.co/api/v2/experiments/{experiment_id}/logs/{log_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "log_id_123",
  "input": {
    "current_prompt_version": "v1"
  },
  "output": {
    "result": "output_value"
  },
  "comparison_key": "b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"
}
Retrieve a specific log from an experiment using the V2 API.

Authentication

  • API key: Authorization: Bearer <API key>

Path Parameters

experiment_id
string
required
The ID of the experiment.
log_id
string
required
The ID of the log to retrieve.

Examples

import requests

experiment_id = "experiment_id_123"
log_id = "log_id_123"
url = f"https://api.keywordsai.co/api/v2/experiments/{experiment_id}/logs/{log_id}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())

Response

{
  "id": "log_id_123",
  "input": {
    "current_prompt_version": "v1"
  },
  "output": {
    "result": "output_value"
  },
  "comparison_key": "b7c84ae535cf66aef2f862eb260a14bd1aa9310220076cf196fec40860ac0d11"
}