Overview
Previously, you could pass astructured_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
Code Examples
Python SDK
TypeScript SDK
curl
With Async Processing
If you were usingstructured_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 oldstructured_output approach.
Python
Response Field Mapping
If you’re parsing the response, here’s how the fields map:FAQ
Will structured_output on /extract stop working immediately?
Will structured_output on /extract stop working immediately?
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.
Is the schema format the same?
Is the schema format the same?
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.Does the two-step flow cost more?
Does the two-step flow cost more?
/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.Can I use async for the schema step too?
Can I use async for the schema step too?
Yes! Set
async: true on the /schema request to get a job_id and poll for results, just like extraction.What if I don't need structured data — just markdown?
What if I don't need structured data — just markdown?
Then you’re already using the recommended flow. Just call
/extract without any schema parameters and use the markdown from the response.Related
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