V2
Extract
LlamaExtract
Create Extract Job
Create an extraction job.
Extracts structured data from a document using either a saved configuration or an inline JSON Schema.
Input
Provide exactly one of:
- configuration_id — reference a saved extraction config
- configuration — inline configuration with a data_schema
Document input
Set document_input_value to a file ID (dfl-...) or a completed parse job ID (pjb-...).
The job runs asynchronously. Poll GET /extract/{job_id} or register a webhook to monitor completion.
post/api/v2/extract
Query parameters
project_idstring uuid nullable
organization_idstring uuid nullable
Cookies
sessionstring nullable
Request body
Example request
{
"configuration_id": "cfg-11111111-2222-3333-4444-555555555555",
"document_input_value": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
}Response
Successful Response
Example response
{
"id": "ext-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"configuration_id": "cfg-11111111-2222-3333-4444-555555555555",
"document_input_value": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"configuration": {
"target_pages": "1,3,5-7",
"max_pages": 10,
"lang": "en",
"tier": "cost_effective",
"extract_version": "latest",
"extraction_target": "per_doc",
"system_prompt": "Extract all monetary values in USD. If a currency is not specified, assume USD.",
"parse_tier": "fast",
"parse_config_id": "cfg-11111111-2222-3333-4444-555555555555"
},
"status": "COMPLETED"
}