API Key Management
Store keys in environment variables
Never hardcode API keys in source code. Use environment variables:Use per-key spend limits
Create separate API keys for different environments and set spend limits on each:- Development key — low spend limit for testing
- Staging key — moderate limit for integration testing
- Production key — appropriate limit for your expected usage
Rotate keys regularly
If you suspect a key has been compromised:- Create a new API key at datalab.to/app/keys
- Update your application to use the new key
- Revoke the old key
Webhook Security
Always use HTTPS
Configure your webhook endpoint to use HTTPS. Webhook payloads contain request data that should be encrypted in transit.Verify webhook signatures
Always verify the webhook signature before processing the payload:Handle duplicate events
Webhook deliveries may be retried on 5xx errors or timeouts. Use therequest_id field to deduplicate:
Data Handling
Results expiration
Conversion results are automatically deleted from Datalab servers one hour after processing completes. Retrieve and store results in your own infrastructure promptly.Data retention consent
You can control whether your documents are used to improve Datalab’s models. This is an opt-in setting configurable in your team settings. Teams that opt in receive discounted rates.Minimize data exposure
- Only send documents that need to be processed — avoid sending unnecessary files
- Use
page_rangeto process only the pages you need rather than entire documents - Download and delete results as soon as they’re available
Network Security
For on-premises deployments
- Place the Datalab container behind a reverse proxy with TLS termination
- Restrict network access to the container’s port (8000) to trusted clients only
- The on-premises container does not require API key authentication by default — implement authentication at the network or reverse proxy level
- See On-Premises Overview for deployment details
IP restrictions
For additional security, consider restricting API access to known IP addresses using your infrastructure’s firewall or WAF rules.Next Steps
Webhooks
Configure and verify webhook signatures
API Limits
Understand rate limits and quotas
Billing
Manage spend limits and usage
On-Premises
Self-hosted deployment security