Skip to main content

Options

Configure Talonic extraction options: output format, strict mode, async processing, raw text inclusion, PDF page ranges, and language hints for OCR accuracy.

Extraction options control how POST /v1/extract processes a document. Pass them as fields in the options JSON object (a JSON string in the multipart form) to switch between sync and async mode, include raw text, restrict PDF page ranges, or hint the document language for better OCR accuracy.

formatstringOutput format for the extracted data: `json`, `csv`, or `table`. Default: "json"
strictbooleanWhen true, fields not in the schema are omitted from the response. When false, additional discovered fields may be included. Default: true
asyncbooleanWhen true, returns a 202 with a poll URL instead of blocking. Poll the document endpoint for results. Default: false
include_raw_textbooleanInclude the raw extracted text alongside structured data. Default: false
page_rangestringPages to extract from. E.g. "1-5", "1,3,7-10". PDF only.
language_hintstringISO 639-1 language code hint. Improves extraction for non-English documents.

curl — async extraction of pages 1-5 of a German document

Most integrations use strict: true (default) to receive only the schema-defined fields. Set strict: false when you want the AI to also return additional fields it discovers beyond your schema.

The page_range option accepts comma-separated page numbers and ranges (e.g. "1-5", "1,3,7-10") and applies only to PDF files. Use language_hint with an ISO 639-1 code (e.g. "de", "ja") to improve extraction accuracy for non-English documents, especially when the OCR needs guidance on character sets.

Pair include_raw_text: true with schema-driven extraction when your downstream system needs both structured data and the original text for audit or display purposes. With async: true the response is 202 Accepted; poll GET /v1/documents/:id until status is completed, or configure a webhook destination and listen for extraction.complete events to skip polling entirely (see [Webhook Events](webhook-events)).

The format option controls the output shape of the data field. Use "json" (default) for programmatic consumption. CSV format is also available on the GET /v1/extractions/:id/data endpoint for already-completed extractions.