import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
evaluation = client.dataframer.evaluations.create(
run_id="a98715da-921d-4326-bbf8-208f8bcc2956",
)
print(evaluation.id)curl https://df-api.dataframer.ai/api/dataframer/evaluations/ \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $DATAFRAMER_API_KEY" \
-d '{
"run_id": "a98715da-921d-4326-bbf8-208f8bcc2956"
}'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"distribution_analysis": [
{
"property_name": "<string>",
"total_samples": 123,
"requested_distributions": {
"positive": 40,
"negative": 30,
"neutral": 30
},
"expected_distributions": {
"positive": 42,
"negative": 30,
"neutral": 28
},
"evaluated_distributions": {
"positive": 45,
"negative": 28,
"neutral": 27
},
"total_samples_analyzed": 123
}
],
"sample_classifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sample_identifier": "<string>",
"classifications": {
"sentiment": "positive",
"topic": "technology",
"length": "medium"
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"completed_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"created_by_email": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"run_id": [
"This field is required."
],
"evaluation_model": [
"Unsupported evaluation model: invalid-model"
],
"error": "Can only evaluate completed runs"
}Create evaluation
Start a new evaluation for a completed run
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
evaluation = client.dataframer.evaluations.create(
run_id="a98715da-921d-4326-bbf8-208f8bcc2956",
)
print(evaluation.id)curl https://df-api.dataframer.ai/api/dataframer/evaluations/ \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $DATAFRAMER_API_KEY" \
-d '{
"run_id": "a98715da-921d-4326-bbf8-208f8bcc2956"
}'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"distribution_analysis": [
{
"property_name": "<string>",
"total_samples": 123,
"requested_distributions": {
"positive": 40,
"negative": 30,
"neutral": 30
},
"expected_distributions": {
"positive": 42,
"negative": 30,
"neutral": 28
},
"evaluated_distributions": {
"positive": 45,
"negative": 28,
"neutral": 27
},
"total_samples_analyzed": 123
}
],
"sample_classifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sample_identifier": "<string>",
"classifications": {
"sentiment": "positive",
"topic": "technology",
"length": "medium"
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"completed_at": "2023-11-07T05:31:56Z",
"error_message": "<string>",
"created_by_email": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"run_id": [
"This field is required."
],
"evaluation_model": [
"Unsupported evaluation model: invalid-model"
],
"error": "Can only evaluate completed runs"
}GET /api/dataframer/evaluations/{evaluation_id}/ until status is COMPLETED or FAILED.SUCCEEDED status before an evaluation can be created.Authorizations
API Key authentication. Format: "Bearer YOUR_API_KEY"
Body
Request body for creating an evaluation
ID of the completed run to evaluate. Run must be in SUCCEEDED status.
AI model to use for evaluation. Defaults to anthropic/claude-sonnet-5-thinking.
anthropic/claude-fable-5-thinking, anthropic/claude-opus-5, anthropic/claude-opus-5-thinking, anthropic/claude-sonnet-5, anthropic/claude-sonnet-5-thinking, openai/gpt-5.6-sol, openai/gpt-5.6-sol-thinking, openai/gpt-5.6-terra, openai/gpt-5.6-terra-thinking Response
Evaluation started successfully
Unique identifier for the evaluation
ID of the run being evaluated
Current status of the evaluation
PENDING, PROCESSING, SUCCEEDED, FAILED Per-property comparison of expected vs observed distributions. Null until evaluation completes.
Show child attributes
Show child attributes
Classification results for each generated sample. Empty until evaluation completes.
Show child attributes
Show child attributes
When evaluation completed
Error message if evaluation failed
Email of the user who created the evaluation
When the evaluation was created

