Skip to main content
POST
Enqueue an async document agent job

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json

Request for the v2 document/agent endpoint.

query
string
required

Question to ask about the document(s)

Required string length: 1 - 10000
source_id
string | null

Data source ID of a single indexed document

source_ids
string[] | null

List of data source IDs for multi-document queries (max 50)

Maximum array length: 50
json_schema
Json Schema · object | null

JSON Schema for structured output

model
string
default:claude-opus-4-7

Model to use (claude-opus-4-7, claude-sonnet-4-5-20250929, etc.)

thinking_enabled
boolean
default:true

Enable extended thinking

thinking_budget
integer
default:10000

Token budget for thinking (ignored for adaptive models like Opus 4.7)

Required range: 1000 <= x <= 50000
stream
boolean
default:false

Stream response as SSE events

Response

Successful Response

Returned by POST /document/agent/jobs.

job_id
string
required

Workflow run id — pass to GET/stream/cancel endpoints

status
string
required

Initial status — usually 'queued'

created_at
string
required
message
string
required