Skip to main content
POST
Submit an Extractions request

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Body

application/json
fields
object
required

Map of field name to typed field spec.

model
string
required
state
string
required

The text to read from. May be empty only when the request carries image assets.

assets
object

Assets keyed by reference string. Write a reference wherever the asset belongs in state or a field instructions; every asset must be referenced at least once. A state that is exactly the sole asset's key carries no text of its own and is read as file-only. A model that reads either text or a document per request, not both (ScaleDown Extract with a PDF), needs that form: any other text around the key is state text and is rejected with 400.

provider
object | null

Provider routing preferences for the request.

Example:
reference_date
string

ISO date that anchors dates written without a year.

Pattern: ^\d{4}-\d{2}-\d{2}$
session_id
string

A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.

Maximum string length: 256
Example:

"session-1234"

trace
object

Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.

Example:
user
string
Maximum string length: 256

Response

Extractions response

answers
object
required
model
string
required
usage
object
required
id
string
provider
string
state_text
string | null

The text that spans index into, when requested through provider options.

truncated
boolean

True when the provider read only a prefix of the state.