Skip to main content
A
Docs

Eval API reference

Endpoints, request examples and errors for the Eval API: benchmarks, evaluation runs, results, comparisons and the leaderboard.

Authentication

Send a token as Authorization: Bearer <token>. Read API conventions.

Endpoints

MethodPathPurposeRole
GET/api/v1/endpointsList the model endpoints that you can evaluateAny
GET/api/v1/benchmarksList benchmarksAny
GET/api/v1/benchmarks/{benchmark_id}Get a benchmarkAny
POST/api/v1/eval/runRun benchmarks against a modeladmin
POST/api/v1/eval/safety-evalRun the safety evaluationadmin
POST/api/v1/eval/compareCompare modelsAny
POST/api/v1/benchmarks/compareCompare results on benchmarksAny
GET/api/v1/resultsList resultsAny
GET/api/v1/results/{eval_id}Get a resultAny
POST/api/v1/results/batch-deleteDelete more than one resultadmin
GET/api/v1/leaderboardModel leaderboardAny
GET/api/v1/models/{model_id}/summarySummary for one modelAny
GET/api/v1/models/{model_id}/historyResult history for one modelAny
GET/api/v1/benchmarks/{benchmark_id}/exportExport the results of a benchmarkAny
GET/api/v1/healthHealth checkNone

Run an evaluation

curl https://eval.example.gov/api/v1/eval/run \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"benchmark_ids": ["arabic_reasoning", "gcc_government_knowledge"], "endpoint_id": "ministry-llm", "temperature": 0.0}'
FieldTypeRequiredMeaning
benchmark_idsarrayYesUp to 20 benchmark identifiers from GET /api/v1/benchmarks
endpoint_idstringYesThe id of a registered endpoint from GET /api/v1/endpoints
temperaturenumberNo0 to 2. The default is 0.

The run continues in the background. Get the results from GET /api/v1/results.

Errors

StatusCause
403Your role cannot start runs or delete results
404A benchmark does not exist
422The endpoint is not registered
503No judge model or Guard connection is set up