Python
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",
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}{
"run_id": [
"This field is required."
],
"evaluation_model": [
"Unsupported evaluation model: invalid-model"
],
"error": "Can only evaluate completed runs"
}{
"error": "<string>",
"code": "not_supported_hybrid"
}Evaluations
Create evaluation
Start a new evaluation for a completed run
POST
/
api
/
dataframer
/
evaluations
/
Python
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",
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}{
"run_id": [
"This field is required."
],
"evaluation_model": [
"Unsupported evaluation model: invalid-model"
],
"error": "Can only evaluate completed runs"
}{
"error": "<string>",
"code": "not_supported_hybrid"
}Async operation: This endpoint returns immediately with an evaluation ID. Poll
GET /api/dataframer/evaluations/{evaluation_id}/ until status is COMPLETED or FAILED.SUCCEEDED status before an evaluation can be created.Authorizations
Body
application/json
Request body for creating an evaluation
AI model to use for evaluation. Defaults to anthropic/claude-sonnet-5-thinking.
Available options:
anthropic/claude-fable-5-1-thinking, anthropic/claude-opus-5-5-thinking, anthropic/claude-sonnet-5-5-thinking, openai/gpt-6-astra, openai/gpt-6-astra-thinking, openai/gpt-6.1-sol, openai/gpt-6.1-sol-thinking, openai/gpt-5.6-terra, openai/gpt-5.6-terra-thinking, databricks/system.ai.claude-sonnet-5, databricks/system.ai.claude-sonnet-5-thinking, databricks/system.ai.claude-opus-5, databricks/system.ai.claude-opus-5-thinking, databricks/system.ai.gpt-6-astra, databricks/system.ai.gpt-6-astra-thinking, databricks/system.ai.gpt-6-1-sol, databricks/system.ai.gpt-6-1-sol-thinking, databricks/system.ai.gpt-5-6-terra, databricks/system.ai.gpt-5-6-terra-thinking Response
Evaluation started successfully
Set when distribution_analysis and sample_classifications are empty because they are stored in your own cloud, not because nothing was classified. Absent or null otherwise. The Python SDK reads the text from your data plane, fills the fields and clears this
Available options:
result_content_in_data_plane 
