Document Processing Overview
The synchronous processing method is deprecated and will be removed in a future version.
We strongly recommend using Asynchronous Processing with Webhooks for:
- Better reliability with automatic retries
- No timeout limitations
- Idempotent job submission
- Ability to retrieve results multiple times
The async method is now the recommended approach for all use cases.
Parselyze offers two ways to process documents: Synchronous (deprecated) and Asynchronous (recommended). Choose the approach that best fits your use case and workflow requirements.
Sync vs Async: Which to Choose?
| Feature | Synchronous (Deprecated) | Asynchronous (Recommended) |
|---|---|---|
| Response Time | Immediate (within seconds) | Job ID returned instantly, results later |
| Best For | All documents (any size) | |
| Timeout | 30 seconds max | No timeout, processes in background |
| Integration | Simple HTTP request/response | Webhooks or polling |
| Reliability | Single attempt | 3 retry attempts with backoff |
| Result Access | One-time response only | Retrievable for 7 days via job ID |
| Rate Limits | Same limits apply | Same limits apply |
| Idempotency | Not built-in | Automatic duplicate detection |
| Status | ⚠️ Deprecated | ✅ Recommended |
⚠️ Synchronous (Deprecated - Not Recommended)
Synchronous processing is deprecated. Please migrate to asynchronous processing.
Use synchronous processing only if:
Documents are small (under 5 pages)You need results immediately in the responseSimple request/response pattern works for your use case
Legacy documentation for Synchronous Processing →
✅ Asynchronous (Recommended)
Use asynchronous processing for all use cases:
- ✅ All document sizes (small to large)
- ✅ Better reliability with automatic retries
- ✅ No timeout constraints
- ✅ Webhook notifications for real-time updates
- ✅ Idempotent job submission (duplicate prevention)
- ✅ Results accessible for 7 days
- ✅ Perfect for batch processing
- ✅ Integration with background job systems
Example: Invoice processing, receipt scanning, form extraction, bulk document analysis, automated workflows
Learn more about Asynchronous Processing →
Quick Comparison
Synchronous Flow
Upload Document → Wait for Processing → Receive Results → Done
Total Time: 2-10 seconds (one request)
Asynchronous Flow
Submit Job → Receive Job ID → Continue Work → Webhook Notification → Retrieve Results → Done
Total Time: Instant submission + background processing
API Endpoints
- Synchronous:
POST /documents/parse - Asynchronous:
POST /v1/documents/parse/async - Job Status:
GET /v1/jobs/:jobId
Next Steps
- Authentication: Set up your API key
- Synchronous Processing: Process small documents immediately
- Asynchronous Processing: Handle large documents with retries
- Webhooks: Receive automatic notifications
- Error Handling: Handle errors gracefully