Skip to main content
The structured_output parameter on /extract is deprecated and will be removed in a future version. Please migrate to the two-step extract → schema flow described below.

Overview

Previously, you could pass a structured_output object directly in your /extract request to get structured data in a single call. This approach has been replaced by a dedicated /schema endpoint that runs after extraction.

Why the change?

Before vs. After

Migration Steps

1
Step 1: Remove structured_output from your /extract call
2
Strip the structured_output, schema, and schema_prompt parameters from your extraction request. Keep all other parameters (pages, figure_processing, extensions, etc.) as-is.
3
Step 2: Save the extraction_id from the response
4
The /extract response includes an extraction_id (when storage is enabled, which is the default). Store this ID — you’ll need it for the schema step.
5
Step 3: Call /schema with your schema config
6
Send a POST /schema request with the extraction_id and your schema in the schema_config object. The schema format is the same JSON Schema you were using before.
7
Step 4: Update response handling
8
The schema result is now in response.schema_output (instead of response.structured_output). The shape includes values and citations.

Code Examples

Python SDK

TypeScript SDK

curl

With Async Processing

If you were using structured_output with async extraction, here’s the updated flow:

Advanced: Split-Mode Schema (New Capability)

With the new flow, you can now split a document into topics and apply different schemas to each section. This was not possible with the old structured_output approach.
Python

Response Field Mapping

If you’re parsing the response, here’s how the fields map:

FAQ

No. The parameter will continue to work for backward compatibility but will be removed in a future version. We recommend migrating as soon as possible.
Yes. The JSON Schema format is identical. The only change is where you send it: instead of structured_output.schema on /extract, you send schema_config.input_schema on /schema. The schema_prompt field is also in the same location within the config object.
/schema is billed at 1 credit/page (or 4 credits/page with effort: true) on top of the /extract charge. The document is not re-extracted — /schema runs on the already-extracted content — but the schema step itself is metered. See Credit Usage for the full rate table.
Yes! Set async: true on the /schema request to get a job_id and poll for results, just like extraction.
Then you’re already using the recommended flow. Just call /extract without any schema parameters and use the markdown from the response.

Schema Endpoint

Full reference for the /schema endpoint (single + split mode)

Schema Design Guide

Best practices for writing effective JSON schemas

Pipeline Overview

How extract → split → schema work together

Split Endpoint

Split documents into topics for targeted schema extraction