Asynchronous Processing
For large documents or production workflows, use async processing to avoid timeouts and handle long-running operations gracefully.How It Works
- Submit - Send your request with
async: true - Receive job ID - Get an immediate response with a
job_id - Poll - Check job status via
GET /job/{jobId} - Get results - Retrieve completed results from the poll response
Endpoints with Async Support
POST /extract_async is deprecated. Use POST /extract with async: true instead.Using the Async Flag
Addasync: true to any supported endpoint’s request body:
Async Response Format
Whenasync: true, you receive a 202 Accepted response:
Polling for Results
UseGET /job/{jobId} to check status and retrieve results:
Poll Response
Job Status Values
Canceling Jobs
Cancel a running job withDELETE /job/{jobId}:
When to Use Async
Large documents (50+ pages)
Large documents (50+ pages)
Synchronous requests may timeout for large documents. Always use async for documents over 50 pages.
Complex schemas
Complex schemas
Schema extraction with many fields or nested structures benefits from async processing.
Production workflows
Production workflows
Async provides better reliability and allows you to handle failures gracefully with retries.
Batch processing
Batch processing
Submit multiple documents asynchronously and poll for results in parallel.