Experiments
REST API methods for interacting with Phoenix experiments
Experiments retrieved successfully
Forbidden
Validation Error
GET /v1/datasets/{dataset_id}/experiments HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"id": "text",
"dataset_id": "text",
"dataset_version_id": "text",
"repetitions": 1,
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"project_name": "text",
"created_at": "2025-09-26T23:44:05.224Z",
"updated_at": "2025-09-26T23:44:05.224Z"
}
]
}
Details of the experiment to be created
Name of the experiment (if omitted, a random name will be generated)
An optional description of the experiment
Metadata for the experiment
ID of the dataset version over which the experiment will be run (if omitted, the latest version will be used)
Number of times the experiment should be repeated for each example
1
Experiment retrieved successfully
Forbidden
Dataset or DatasetVersion not found
Validation Error
POST /v1/datasets/{dataset_id}/experiments HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 122
{
"name": "text",
"description": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"version_id": "text",
"repetitions": 1
}
{
"data": {
"id": "text",
"dataset_id": "text",
"dataset_version_id": "text",
"repetitions": 1,
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"project_name": "text",
"created_at": "2025-09-26T23:44:05.224Z",
"updated_at": "2025-09-26T23:44:05.224Z"
}
}
Experiment retrieved successfully
Forbidden
Experiment not found
Validation Error
GET /v1/experiments/{experiment_id} HTTP/1.1
Host:
Accept: */*
{
"data": {
"id": "text",
"dataset_id": "text",
"dataset_version_id": "text",
"repetitions": 1,
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"project_name": "text",
"created_at": "2025-09-26T23:44:05.224Z",
"updated_at": "2025-09-26T23:44:05.224Z"
}
}
Successful Response
Forbidden
Experiment not found
Validation Error
GET /v1/experiments/{experiment_id}/json HTTP/1.1
Host:
Accept: */*
text
Retrieve a paginated list of runs for an experiment
Cursor for pagination (base64-encoded experiment run ID)
The max number of experiment runs to return at a time. If not specified, returns all results.
Experiment runs retrieved successfully
Forbidden
Experiment not found
Invalid cursor format
GET /v1/experiments/{experiment_id}/runs HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"dataset_example_id": "text",
"output": null,
"repetition_number": 1,
"start_time": "2025-09-26T23:44:05.224Z",
"end_time": "2025-09-26T23:44:05.224Z",
"trace_id": "text",
"error": "text",
"id": "text",
"experiment_id": "text"
}
],
"next_cursor": "text"
}
The ID of the dataset example used in the experiment run
The output of the experiment task
The repetition number of the experiment run
The start time of the experiment run
The end time of the experiment run
The ID of the corresponding trace (if one exists)
Optional error message if the experiment run encountered an error
Experiment run created successfully
Forbidden
Experiment or dataset example not found
This experiment run has already been submitted
Validation Error
POST /v1/experiments/{experiment_id}/runs HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 176
{
"dataset_example_id": "text",
"output": null,
"repetition_number": 1,
"start_time": "2025-09-26T23:44:05.224Z",
"end_time": "2025-09-26T23:44:05.224Z",
"trace_id": "text",
"error": "text"
}
{
"data": {
"id": "text"
}
}
The ID of the experiment run being evaluated
The name of the evaluation
The kind of annotator used for the evaluation
The start time of the evaluation in ISO format
The end time of the evaluation in ISO format
The result of the evaluation. Either result or error must be provided.
Error message if the evaluation encountered an error. Either result or error must be provided.
Metadata for the evaluation
Optional trace ID for tracking
Successful Response
Forbidden
Experiment run not found
Validation Error
POST /v1/experiment_evaluations HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 283
{
"experiment_run_id": "text",
"name": "text",
"annotator_kind": "LLM",
"start_time": "2025-09-26T23:44:05.224Z",
"end_time": "2025-09-26T23:44:05.224Z",
"result": {
"label": "text",
"score": 1,
"explanation": "text"
},
"error": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"trace_id": "text"
}
{
"data": {
"id": "text"
}
}
Last updated
Was this helpful?