import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
run = client.dataframer.runs.create(
number_of_samples=1,
spec_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(run.id)curl https://df-api.dataframer.ai/api/dataframer/runs/ \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $DATAFRAMER_API_KEY" \
-d '{
"number_of_samples": 1,
"spec_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"spec_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec_name": "<string>",
"spec_version": 123,
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_name": "<string>",
"dataset_type": "SINGLE_FILE",
"samples_completed": 123,
"samples_failed": 123,
"total_cost": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by_email": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"runtime_params": {
"number_of_samples": 123,
"generation_model": "<string>",
"outline_model": "<string>",
"revision_model": "<string>",
"revision_types": [
"<string>"
],
"filtering_types": [
"<string>"
],
"max_revision_cycles": 123,
"seed_shuffling_level": "none",
"max_examples_in_prompt": 123,
"unified_multifield": true,
"generation_thinking_budget": 123,
"outline_thinking_budget": 123,
"revision_thinking_budget": 123,
"skip_outline": true,
"tools": [
"<string>"
]
},
"generated_files": [
{
"id": "<string>",
"path": "<string>",
"file_type": "<string>",
"size_bytes": 123
}
]
}{
"error": "<string>",
"code": "not_supported_hybrid"
}Start a new generation run
Start a new data generation 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
)
run = client.dataframer.runs.create(
number_of_samples=1,
spec_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(run.id)curl https://df-api.dataframer.ai/api/dataframer/runs/ \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $DATAFRAMER_API_KEY" \
-d '{
"number_of_samples": 1,
"spec_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"spec_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec_name": "<string>",
"spec_version": 123,
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_name": "<string>",
"dataset_type": "SINGLE_FILE",
"samples_completed": 123,
"samples_failed": 123,
"total_cost": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by_email": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"runtime_params": {
"number_of_samples": 123,
"generation_model": "<string>",
"outline_model": "<string>",
"revision_model": "<string>",
"revision_types": [
"<string>"
],
"filtering_types": [
"<string>"
],
"max_revision_cycles": 123,
"seed_shuffling_level": "none",
"max_examples_in_prompt": 123,
"unified_multifield": true,
"generation_thinking_budget": 123,
"outline_thinking_budget": 123,
"revision_thinking_budget": 123,
"skip_outline": true,
"tools": [
"<string>"
]
},
"generated_files": [
{
"id": "<string>",
"path": "<string>",
"file_type": "<string>",
"size_bytes": 123
}
]
}{
"error": "<string>",
"code": "not_supported_hybrid"
}GET /api/dataframer/runs/{id}/ until status changes from PENDING/IN_PROGRESS to SUCCEEDED or FAILED.Authorizations
Body
Request body for creating a generation run
Model for generation. Use -thinking suffix to enable thinking mode.
anthropic/claude-fable-5-1-thinking, anthropic/claude-opus-5-5-thinking, anthropic/claude-sonnet-5-5-thinking, anthropic/claude-haiku-4-5, anthropic/claude-haiku-4-5-thinking, gemini/gemini-3.1-pro-preview, gemini/gemini-3.1-pro-preview-thinking, openai/gpt-oss-120b, deepseek-ai/DeepSeek-V4-Pro-0813, moonshotai/Kimi-K3, moonshotai/Kimi-K2.6, 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, openai/gpt-6-luna, openai/gpt-6-luna-thinking, databricks/system.ai.claude-haiku-4-5, databricks/system.ai.claude-haiku-4-5-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, databricks/system.ai.gpt-5-6-luna, databricks/system.ai.gpt-5-6-luna-thinking, databricks/system.ai.deepseek-v4-pro-0813 Model for outline generation
anthropic/claude-fable-5-1-thinking, anthropic/claude-opus-5-5-thinking, anthropic/claude-sonnet-5-5-thinking, anthropic/claude-haiku-4-5, anthropic/claude-haiku-4-5-thinking, gemini/gemini-3.1-pro-preview, gemini/gemini-3.1-pro-preview-thinking, openai/gpt-oss-120b, deepseek-ai/DeepSeek-V4-Pro-0813, moonshotai/Kimi-K3, moonshotai/Kimi-K2.6, 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, openai/gpt-6-luna, openai/gpt-6-luna-thinking, databricks/system.ai.claude-haiku-4-5, databricks/system.ai.claude-haiku-4-5-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, databricks/system.ai.gpt-5-6-luna, databricks/system.ai.gpt-5-6-luna-thinking, databricks/system.ai.deepseek-v4-pro-0813 Model for revisions and filtering (only used if revision_types or filtering_types is set)
anthropic/claude-fable-5-1-thinking, anthropic/claude-opus-5-5-thinking, anthropic/claude-sonnet-5-5-thinking, anthropic/claude-haiku-4-5, anthropic/claude-haiku-4-5-thinking, gemini/gemini-3.1-pro-preview, gemini/gemini-3.1-pro-preview-thinking, openai/gpt-oss-120b, deepseek-ai/DeepSeek-V4-Pro-0813, moonshotai/Kimi-K3, moonshotai/Kimi-K2.6, 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, openai/gpt-6-luna, openai/gpt-6-luna-thinking, databricks/system.ai.claude-haiku-4-5, databricks/system.ai.claude-haiku-4-5-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, databricks/system.ai.gpt-5-6-luna, databricks/system.ai.gpt-5-6-luna-thinking, databricks/system.ai.deepseek-v4-pro-0813 List of revision types to apply. Valid values: 'coherence_flow' (fix formatting/flow issues), 'consistency' (fix internal contradictions), 'distinguishability' (seeded only — blend with seed style), 'conformance' (verify property compliance). Defaults to empty (no revisions).
coherence_flow, consistency, distinguishability, conformance Response
Run created and submitted. Returns the full run resource including server-applied defaults (generation_model, outline_model, revision_model, max_revision_cycles, seed_shuffling_level, unified_multifield, skip_outline, tools) and the resolved spec_version, so callers can confirm how the run was created without a follow-up GET.

