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",
    "per_key_attribution": false,
    "temperature": 0,
    "enable_thinking": true,
    "additional_instructions": "<string>",
    "enable_agentic_array_extraction": false
  },
  "stream": false
}
'
{
  "job_id": "<string>",
  "status": "pending",
  "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
ExtractConfig · object

Configuration options for the extraction process

stream
boolean
default:false

Whether to stream the results as they become available. If true, the response will be a stream of JSON objects.

Response

Successful Response

Response model for extraction job creation.

job_id
string
required

Unique ID of the extraction job

status
enum<string>
required

Current status of the job

Available options:
pending,
processing,
retrying,
completed,
failed,
cancelled
created_at
string
required

Timestamp when the job was created

estimated_completion
string
required

Estimated completion time