A route for extracting structured data from documents using LLMs. This endpoint processes document data and extracts information according to the provided JSON schema. It supports various document types and can return either a complete response or streamed chunks.
Document to be analyzed
Model used for chat completion
JSON schema format used to validate the output data.
Resolution of the image sent to the LLM
96 <= x <= 300Number of consensus models to use for extraction.
If true, the extraction will be streamed to the user using the active WebSocket connection
If set, keys to be used for the extraction of long lists of data using Parallel OCR
{
"products": "identity.id",
"properties": "ID"
}User-defined metadata to associate with this extraction
Extraction ID to use for this extraction. If not provided, a new ID will be generated.
Additional chat messages to append after the document content messages. Useful for providing extra context or instructions.
Successful Response
"chat.completion"auto, default, flex, scale, priority Usage statistics for the completion request.
Object defining the uncertainties of the fields extracted when using consensus. Follows the same structure as the extraction object.
Timestamp of the request
Timestamp of the first token of the document. If non-streaming, set to last_token_at
Timestamp of the last token of the document