Skip to main content

Asynchronous Processing

For large documents or production workflows, use async processing to avoid timeouts and handle long-running operations gracefully.

How It Works

  1. Submit - Send your request with async: true
  2. Receive job ID - Get an immediate response with a job_id
  3. Poll - Check job status via GET /job/{jobId}
  4. 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

Add async: true to any supported endpoint’s request body:

Async Response Format

When async: true, you receive a 202 Accepted response:

Polling for Results

Use GET /job/{jobId} to check status and retrieve results:

Poll Response

Job Status Values


Canceling Jobs

Cancel a running job with DELETE /job/{jobId}:

When to Use Async

Synchronous requests may timeout for large documents. Always use async for documents over 50 pages.
Schema extraction with many fields or nested structures benefits from async processing.
Async provides better reliability and allows you to handle failures gracefully with retries.
Submit multiple documents asynchronously and poll for results in parallel.

Sync vs Async Comparison


Webhooks Alternative

Instead of polling, you can use webhooks to receive notifications when jobs complete:
See Svix Webhooks for setup instructions.