---
title: "Submit an Extractions request"
method: POST
path: "/api/alpha/extractions"
tags: ["alpha.extractions"]
---

# Submit an Extractions request

`POST /api/alpha/extractions`

## Request

- Base URL: `https://openrouter.ai`
- URL: `https://openrouter.ai/api/alpha/extractions`
- Auth: HTTP bearer

Extracts, computes, estimates or forecasts typed fields from a state string and image assets using an extraction-style System One model. Alpha: the shape is not stable.

## Request body

- ExtractionsRequest
  - `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, unless `state` is empty or omitted, in which case the assets are read without a reference. 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), takes that form or an empty or omitted `state`: any other text around the key is state text and is rejected with 400.
  - `fields` object, required: Map of field name to typed field spec.
  - `model` string, required
  - `provider` intersection: Provider routing preferences for the request.
    - [`ProviderPreferences`](https://skmtc.dev/openrouterteam/apis/openrouter-api/revisions/f797e38f23b4/schema?at=%2Fcomponents%2Fschemas%2FProviderPreferences)
  - `reference_date` string: ISO date that anchors dates written without a year.
  - `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.
  - `state` string: The text to read from. May be empty or omitted only when the request carries assets, which are then read without being referenced by key.
  - `trace` TraceConfig: 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.
    - `generation_name` string
    - `parent_span_id` string
    - `span_name` string
    - `trace_id` string
    - `trace_name` string
  - `user` string

## Response `200`

Extractions response

- ExtractionsResponse
  - `answers` object, required
  - `id` string
  - `model` string, required
  - `provider` string
  - `state_text` string, nullable: The text that spans index into, when requested through provider options.
  - `truncated` boolean: True when the provider read only a prefix of the state.
  - `usage` ExtractionsUsage, required
    - `cost` number, double
    - `image_tokens` integer
    - `input_tokens` integer, required
    - `output_tokens` integer, required
    - `passes` integer: Number of upstream passes when the fields did not fit in one.
    - `schema_tokens` integer
    - `state_tokens` integer

## Other responses

- `400`: Bad Request - Invalid request parameters or malformed input
- `401`: Unauthorized - Authentication required or invalid credentials
- `402`: Payment Required - Insufficient credits or quota to complete request
- `403`: Forbidden - Authentication successful but insufficient permissions
- `404`: Not Found - Resource does not exist
- `413`: Payload Too Large - Request payload exceeds size limits
- `429`: Too Many Requests - Rate limit exceeded
- `500`: Internal Server Error - Unexpected server error
- `502`: Bad Gateway - Provider/upstream API failure
- `503`: Service Unavailable - Service temporarily unavailable
- `524`: Infrastructure Timeout - Provider request timed out at edge network
- `529`: Provider Overloaded - Provider is temporarily overloaded

## Changes

- **2026-12-02** `c74778295fb8`: 4 info
  - added the new optional request property `provider/allOf[#/components/schemas/ProviderPreferences]/options/celeris`
  - added the new `Celeris` enum value to the request property `provider/allOf[#/components/schemas/ProviderPreferences]/ignore/items/anyOf[#/components/schemas/ProviderName]/`
  - added the new `Celeris` enum value to the request property `provider/allOf[#/components/schemas/ProviderPreferences]/only/items/anyOf[#/components/schemas/ProviderName]/`
  - added the new `Celeris` enum value to the request property `provider/allOf[#/components/schemas/ProviderPreferences]/order/items/anyOf[#/components/schemas/ProviderName]/`
- **2026-12-02** `f5d20d956cd3`: 4 info
  - added the new optional request property `provider/allOf[#/components/schemas/ProviderPreferences]/options/langchain`
  - added the new `LangChain` enum value to the request property `provider/allOf[#/components/schemas/ProviderPreferences]/ignore/items/anyOf[#/components/schemas/ProviderName]/`
  - added the new `LangChain` enum value to the request property `provider/allOf[#/components/schemas/ProviderPreferences]/only/items/anyOf[#/components/schemas/ProviderName]/`
  - added the new `LangChain` enum value to the request property `provider/allOf[#/components/schemas/ProviderPreferences]/order/items/anyOf[#/components/schemas/ProviderName]/`
- …earlier changes not shown

[Operation history](https://skmtc.dev/openrouterteam/apis/openrouter-api/changes/api/alpha/extractions/post.md)

---

[API](https://skmtc.dev/openrouterteam/apis/openrouter-api.md) - [All operations](https://skmtc.dev/openrouterteam/apis/openrouter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openrouterteam/apis/openrouter-api/revisions/f797e38f23b4?raw)
