GET
/
api
/
scores
/
import requests

url = "https://api.keywordsai.co/api/scores/"
api_key = "YOUR_KEY" # Replace with your actual Keywords AI API key
headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())
{
  "count": 3,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "eval_result_unique_id_1",
      "created_at": "2024-01-15T10:30:00Z",
      "type": "llm",
      "environment": "test",
      "numerical_value": 4.5,
      "string_value": "Good quality",
      "boolean_value": true,
      "is_passed": false,
      "cost": 0.0,
      "evaluator_id": null,
      "evaluator_slug": "quality_evaluator",
      "log_id": "log_unique_id_1",
      "dataset_id": null
    },
    {
      "id": "eval_result_unique_id_2",
      "created_at": "2024-01-15T11:15:00Z",
      "type": "llm",
      "environment": "production",
      "numerical_value": 3.8,
      "string_value": "Average quality",
      "boolean_value": false,
      "is_passed": true,
      "cost": 0.0,
      "evaluator_id": null,
      "evaluator_slug": "relevance_evaluator",
      "log_id": "log_unique_id_2",
      "dataset_id": null
    }
  ]
}
Retrieves a list of all evaluation scores.
import requests

url = "https://api.keywordsai.co/api/scores/"
api_key = "YOUR_KEY" # Replace with your actual Keywords AI API key
headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())
{
  "count": 3,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "eval_result_unique_id_1",
      "created_at": "2024-01-15T10:30:00Z",
      "type": "llm",
      "environment": "test",
      "numerical_value": 4.5,
      "string_value": "Good quality",
      "boolean_value": true,
      "is_passed": false,
      "cost": 0.0,
      "evaluator_id": null,
      "evaluator_slug": "quality_evaluator",
      "log_id": "log_unique_id_1",
      "dataset_id": null
    },
    {
      "id": "eval_result_unique_id_2",
      "created_at": "2024-01-15T11:15:00Z",
      "type": "llm",
      "environment": "production",
      "numerical_value": 3.8,
      "string_value": "Average quality",
      "boolean_value": false,
      "is_passed": true,
      "cost": 0.0,
      "evaluator_id": null,
      "evaluator_slug": "relevance_evaluator",
      "log_id": "log_unique_id_2",
      "dataset_id": null
    }
  ]
}