What can the asynchronous API do?
- Process large size documents and complex schemas without maintaining long-running connections
- Submit multiple documents in a single request for batch processing
- Optimize resource utilization for large-scale document processing workflows
For single document processing with immediate results, use the synchronous API instead.
How asynchronous API is different from the synchronous API?
| Limitation | Synchronous API | Asynchronous API |
|---|---|---|
| Maximum number of pages | 100 pages | 1,000 pages |
| Maximum file size | 50MB | 50MB |
| Maximum number of properties in schema | Up to 100 properties | Up to 5000 properties |
| Maximum number of characters in schema | Up to 15,000 characters | Up to 120,000 characters |
How it works
Create Job
Create an async job by submitting multiple documents along with your extraction schema. The API returns a job_id immediately without waiting for processing to complete.
Request
Response
- Supported file formats: PDF, JPEG, PNG, BMP, TIFF, HEIC, DOCX, PPTX, XLSX
- Maximum file size per document: 50MB
- Maximum pages per document: 1,000 pages
- Maximum pixels per page: 200,000,000 pixels
- Maximum documents per job: Up to 20 documents
- Supported character sets: Alphanumeric, Hangul, and Hanja are fully supported. Hanzi and Kanji are in beta.
Hanja, Hanzi, and Kanji are writing systems based on Chinese characters. For more information, see this article.
Retrieve Job
Use the job_id to retrieve the job information. The job information will include the status, total documents, completed documents, created at, started at, and completed at.
The status will be one of: CREATED, IN_PROGRESS, PARTIALLY_COMPLETED, COMPLETED, FAILED, or CANCELED.
Once the job is completed, extraction results will be available in the response.
Request
Response
List Jobs
List extraction jobs with summarized information. Users can use limit and offset to get paginated results.
Request
Response
API Endpoints
The asynchronous API provides three main endpoints:
Create Async Job
Submit multiple documents for batch processing
Retrieve Job
Get job status and results
List Jobs
List all your extraction jobs
Schema definition
Similar to the synchronous API, you need to define a schema for data extraction. The schema follows JSON Schema Syntax. For detailed instructions on writing a schema, see the Writing a schema page.
Additional parameters
The asynchronous API supports the same additional parameters as the synchronous API to enhance extraction capabilities:
- mode: Choose between standard and enhanced extraction modes.
- split: Enable document splitting to extract information from multiple documents contained within a single file.
- location: Enable location coordinates to get the page number and bounding box coordinates for each extracted field.
- confidence: Enable confidence scores to receive confidence scores (
"high"or"low") for each extracted field, helping you assess the reliability of results.
Best practices
- Batch similar documents together: Group documents of the same type or schema for more efficient processing
- Store job IDs: Keep track of job IDs for later retrieval and auditing
- Use appropriate polling intervals: Check job status every 5-10 seconds to balance responsiveness and API usage
- Download results after successful completion: Download results after the job is completed to avoid waiting for the results to be generated.
- Fix errors and retry failed jobs: Fix errors and retry failed jobs to improve the success rate.
Basic async job workflow
Frequently Asked Questions
Confidence
Learn how to obtain confidence for extracted information to assess reliability and implement Human-in-the-Loop workflows.
Document Classification
Classify scans, photos, and digital PDFs into your own user-defined categories with Upstage Document Classification β no templates and no fine-tuning required.