Skip to main content
The JavaScript SDK is inherently async (Promise-based). This guide covers concurrent document processing and async job management for long-running operations.

Concurrent Processing

Process multiple documents simultaneously with Promise.all:

Parse Multiple Documents

Extract from Multiple Documents

Split Multiple Documents

Fill Multiple Forms


Rate Limiting

Control concurrency to avoid overwhelming the API:

Async Jobs (runJob)

For documents that take longer to process, use runJob methods to avoid timeouts:

Start Async Job

Poll for Completion

All Async Methods

Each endpoint has a runJob variant:

Error Handling

Use Promise.allSettled to handle failures gracefully:

When to Use Async Jobs

Use runJob When

Processing large documents (50+ pages), running long extract operations, or integrating with webhooks.

Use run When

Processing small documents, need immediate results, or simple scripts where waiting is acceptable.

Next Steps