Skip to main content
POST
/
extract
/
jobs
Start Extraction Job
curl --request POST \
  --url https://api.contextual.ai/v1/extract/jobs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "document_id": "<string>",
  "schema_id": "<string>",
  "config": {
    "model": "gemini-2.5-flash",
    "max_num_concurrent_requests": 5,
    "validate_response_schema": true,
    "per_key_attribution": false,
    "splitter_configs": {},
    "temperature": 0,
    "seed": 42,
    "enable_thinking": true,
    "n_max_retries": 0,
    "use_explicit_context_cache": true
  }
}'
{
  "job_id": "<string>",
  "status": "<string>",
  "created_at": "<string>",
  "estimated_completion": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for starting a structured extraction job.

document_id
string
required

ID of the document to extract from

schema_id
string
required

ID of the schema to use for extraction

config
object | null

Configuration options for the extraction process Configuration for the extraction process.

This configuration controls how the AI model processes your document and extracts data. Most settings have sensible defaults, but you can customize them for your specific use case.

Response

Successful Response

Response model for extraction job creation.

job_id
string
required

Unique ID of the extraction job

status
string
required

Current status of the job

created_at
string
required

Timestamp when the job was created

estimated_completion
string
required

Estimated completion time