Error Response Format
HTTP Status Codes
| Status | Meaning | Common Causes |
|---|---|---|
| 400 | Bad Request | Invalid JSON, missing required fields |
| 401 | Unauthorized | Missing or invalid API key |
| 402 | Payment Required | Insufficient credits |
| 403 | Forbidden | API key lacks required scope |
| 404 | Not Found | Flow or execution doesn’t exist |
| 409 | Conflict | Execution already cancelled |
| 422 | Unprocessable Entity | Valid JSON but invalid data |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side error |
| 503 | Service Unavailable | Maintenance or overload |
Error Codes Reference
Authentication Errors
| Code | Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid authorization header |
INVALID_API_KEY | 401 | API key is malformed or revoked |
FORBIDDEN | 403 | API key missing required scope |
Validation Errors
| Code | Status | Description |
|---|---|---|
INVALID_INPUT | 400 | Request body is invalid JSON |
VALIDATION_ERROR | 422 | Request data fails validation |
MISSING_REQUIRED_FIELD | 422 | Required field not provided |
INVALID_DOCUMENT | 422 | Document data is corrupted or unsupported |
Resource Errors
| Code | Status | Description |
|---|---|---|
FLOW_NOT_FOUND | 404 | Flow ID doesn’t exist or isn’t accessible |
EXECUTION_NOT_FOUND | 404 | Execution ID doesn’t exist |
VERSION_NOT_FOUND | 404 | Requested flow version doesn’t exist |
GET /flows to list available flows.
Billing Errors
| Code | Status | Description |
|---|---|---|
INSUFFICIENT_CREDITS | 402 | Not enough credits for this operation |
SUBSCRIPTION_REQUIRED | 402 | Feature requires paid subscription |
Execution Errors
| Code | Status | Description |
|---|---|---|
EXECUTION_FAILED | 500 | Flow execution failed |
EXECUTION_TIMEOUT | 504 | Execution exceeded time limit |
ALREADY_CANCELLED | 409 | Execution was already cancelled |
NOT_CANCELLABLE | 409 | Execution already completed or failed |
Rate Limit Errors
| Code | Status | Description |
|---|---|---|
RATE_LIMITED | 429 | Too many requests |
CONCURRENT_LIMIT | 429 | Too many concurrent executions |
X-RateLimit-Reset header for when to retry.
Server Errors
| Code | Status | Description |
|---|---|---|
INTERNAL_ERROR | 500 | Unexpected server error |
SERVICE_UNAVAILABLE | 503 | Service temporarily unavailable |
PROVIDER_ERROR | 502 | Upstream provider (LLM/OCR) error |