Skip to main content

Document Processing Overview

Synchronous Processing Deprecated

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?

FeatureSynchronous (Deprecated)Asynchronous (Recommended)
Response TimeImmediate (within seconds)Job ID returned instantly, results later
Best ForSmall documents (1-5 pages)All documents (any size)
Timeout30 seconds maxNo timeout, processes in background
IntegrationSimple HTTP request/responseWebhooks or polling
ReliabilitySingle attempt3 retry attempts with backoff
Result AccessOne-time response onlyRetrievable for 7 days via job ID
Rate LimitsSame limits applySame limits apply
IdempotencyNot built-inAutomatic duplicate detection
Status⚠️ Deprecated✅ Recommended
Deprecated

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 response
  • Simple request/response pattern works for your use case

Legacy documentation for Synchronous Processing →

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

  1. Authentication: Set up your API key
  2. Synchronous Processing: Process small documents immediately
  3. Asynchronous Processing: Handle large documents with retries
  4. Webhooks: Receive automatic notifications
  5. Error Handling: Handle errors gracefully