Skip to main content
POST
Query document(s) with an AI agent (synchronous)

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

Response from the v2 document/agent endpoint.

answer
string
required
model
string
required
citations
DocumentCitation · object[]
structured_output
unknown
usage
Usage · object | null