- A Datalab account with an API key
- Python 3.11+ installed
- The Datalab SDK:
pip install datalab-python-sdk - Your
DATALAB_API_KEYenvironment variable set
SDK Batch Processing
Process multiple files using Python’s async capabilities:Async Batch Processing
For higher throughput:CLI Batch Processing
The CLI handles directory processing automatically:REST API Batch Processing
Start with the complete Python requests example for submitting a document, checking failures, and retrieving inline or downloaded results. Use a bounded worker pool to process multiple documents and reuse a session within each worker.Rate Limits
- Request rate limit: 25 requests per minute on Free, 400 on Launch and Team (429 on exceed)
- Concurrent request limit: 25 on Free, 400 on Launch and Team (429 on exceed)
- Page concurrency limit: 5,000 pages in flight across all requests — this is enforced during processing, not at submission. Results return with
success: falseif exceeded. Always check thesuccessfield when polling for results. - The SDK and CLI retry supported transient submission and polling errors; retry behavior depends on the request type
- For higher limits, contact support@datalab.to
Tips
- Use async for high throughput - Async processing handles many concurrent requests efficiently
- Limit concurrency - Start with 5-10 concurrent requests and adjust based on your rate limits
- Handle failures gracefully - Check
successfor each result and record failed files so you can retry them selectively - Save progress - Write results incrementally to avoid losing work on long batches
Next Steps
Document Conversion
Learn more about Marker’s conversion API and output formats.
API Limits
Understand rate limits and how to optimize throughput.
Pipelines
Chain processors into versioned, reusable pipelines.
Webhooks
Get notified when batch conversions complete via webhooks.