Error Response Format
All API errors return a JSON response with adetail field:
HTTP Error Codes
| Code | Type | Retryable | Description |
|---|---|---|---|
| 400 | invalid_request_error | No | Issue with the format or content of your request |
| 401 | authentication_error | No | Invalid or missing API key |
| 403 | permission_error | No | API key lacks permission or subscription issue |
| 404 | not_found_error | No | Requested resource not found or expired |
| 413 | request_too_large | No | File exceeds the maximum allowed size |
| 429 | rate_limit_error | Yes | Rate limit exceeded — wait and retry |
| 500 | api_error | Yes | Internal server error — wait and retry |
| 529 | overloaded_error | Yes | API temporarily overloaded — wait and retry |
SDK Exception Mapping
The Python SDK maps HTTP errors to specific exception classes:| HTTP Code | SDK Exception | Description |
|---|---|---|
| 400 | DatalabAPIError | Check the response_data field for details |
| 401 | DatalabAPIError | Invalid API key |
| 403 | DatalabAPIError | Subscription or permission issue |
| 404 | DatalabAPIError | Resource not found or expired |
| 413 | DatalabAPIError | File too large |
| 429 | Auto-retried | SDK retries automatically with exponential backoff |
| 500 | Auto-retried | SDK retries automatically |
| Timeout | DatalabTimeoutError | Request timed out |
| File error | DatalabFileError | File not found or empty |
| Validation | DatalabValidationError | Invalid input parameters |
Common Error Messages
400 Bad Request
401 Unauthorized
403 Forbidden
429 Too Many Requests
Subscription and Access Errors
When making API requests, you may encounter 403 errors related to your subscription status:No Active Subscription
Error:"You need an active, paid subscription to use this API."
This occurs when you don’t have an active subscription and have exhausted your free credits. To resolve:
- Subscribe to a paid plan in the dashboard
- New accounts include free credits — verify your email to claim them
Expired Subscription
Error:"Your subscription has expired. You may need to re-enable your plan, or pay an unpaid invoice."
Your subscription has passed its end date and grace period. To resolve:
- Renew your subscription in the dashboard
- Pay any outstanding invoices
Payment Failed
Error:"Your payment has failed. Please pay any unpaid invoices to continue using the API."
A payment for your subscription has failed and you’ve exceeded the grace period. To resolve:
- Update your payment method in the dashboard
- Pay any unpaid invoices
Inactive Subscription
Error:"Your subscription is not active. You may need to re-enable your plan or pay an unpaid invoice."
Your subscription is canceled or inactive. To resolve:
- Reactivate your subscription in the dashboard
- Subscribe to a new plan