curl --request POST \
--url https://api.openai.com/v1/evals/{eval_id}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"metadata": {},
"data_source": {
"type": "jsonl",
"source": {
"type": "file_content",
"content": [
{
"item": {},
"sample": {}
}
]
}
}
}'
{
"object": "eval.run",
"id": "<string>",
"eval_id": "<string>",
"status": "<string>",
"model": "<string>",
"name": "<string>",
"created_at": 123,
"report_url": "<string>",
"result_counts": {
"total": 123,
"errored": 123,
"failed": 123,
"passed": 123
},
"per_model_usage": [
{
"model_name": "<string>",
"invocation_count": 123,
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"cached_tokens": 123
}
],
"per_testing_criteria_results": [
{
"testing_criteria": "<string>",
"passed": 123,
"failed": 123
}
],
"data_source": {
"type": "jsonl",
"source": {
"type": "file_content",
"content": [
{
"item": {},
"sample": {}
}
]
}
},
"metadata": {},
"error": {
"code": "<string>",
"message": "<string>"
}
}
Create a new evaluation run. This is the endpoint that will kick off grading.
curl --request POST \
--url https://api.openai.com/v1/evals/{eval_id}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"metadata": {},
"data_source": {
"type": "jsonl",
"source": {
"type": "file_content",
"content": [
{
"item": {},
"sample": {}
}
]
}
}
}'
{
"object": "eval.run",
"id": "<string>",
"eval_id": "<string>",
"status": "<string>",
"model": "<string>",
"name": "<string>",
"created_at": 123,
"report_url": "<string>",
"result_counts": {
"total": 123,
"errored": 123,
"failed": 123,
"passed": 123
},
"per_model_usage": [
{
"model_name": "<string>",
"invocation_count": 123,
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"cached_tokens": 123
}
],
"per_testing_criteria_results": [
{
"testing_criteria": "<string>",
"passed": 123,
"failed": 123
}
],
"data_source": {
"type": "jsonl",
"source": {
"type": "file_content",
"content": [
{
"item": {},
"sample": {}
}
]
}
},
"metadata": {},
"error": {
"code": "<string>",
"message": "<string>"
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The ID of the evaluation to create a run for.
Successfully created a run for the evaluation
A schema representing an evaluation run.
Was this page helpful?