Create Extraction
Run a structured extraction on a document.
Extracts structured data from the document according to the supplied
json_schema, using the requested model. Returns the extraction
with its output, consensus details, and usage on 201. When
stream is true, partial results are streamed back as they are produced.
Extraction resource that can later be retrieved via GET /v1/extractions/{extraction_id} or listed via GET /v1/extractions.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request to run a structured extraction on a single document.
Extends the base extraction request with the document to process (either
inline content or a reference to a previously uploaded file) and a stream
flag that controls whether results are returned incrementally.
A file represented by its filename and a base64 data url.
- MIMEData
- FileRef
JSON schema describing the structured output
The model to use for the extraction
Resolution of the image sent to the LLM
Free-form instructions appended to the system prompt to steer the extraction.
Number of consensus extraction runs to perform. Uses deterministic single-pass when set to 1.
User-defined metadata to associate with this extraction
Additional chat messages forwarded to the extraction model.
If true, skip the LLM cache and force a fresh completion
If true, run asynchronously: returns immediately with status 'queued' and an empty output. Poll GET /v1//{id} until status is terminal. Mutually exclusive with stream.
Response
Streaming extraction chunks