Skip to main content
When an API request fails, the response includes an error object with a code and message.

Error Response Format

Some errors include additional details:

HTTP Status Codes

Error Codes Reference

Authentication Errors

Example:
Fix: Generate a new API key with the required scopes in the Dashboard.

Validation Errors

Example:
Fix: Check the request body matches the expected schema. Ensure documents are in supported formats.

Resource Errors

Example:
Fix: Verify the flow ID is correct. Use GET /flows to list available flows.

Billing Errors

Example:
Fix: Purchase more credits or upgrade your plan in the Dashboard.

Execution Errors

Example:

Rate Limit Errors

Example:
Fix: Implement exponential backoff. Check X-RateLimit-Reset header for when to retry.

Server Errors

Example:
Fix: Retry with exponential backoff. If persistent, check the status page.

Error Handling Best Practices

Retry Logic

Implement retries with exponential backoff for transient errors:

Idempotency

Use idempotency keys to safely retry failed requests:

Error Logging

Log errors with context for debugging:

Next Steps

Run Flow

Execute flows with proper error handling

SDK Client

Use the SDK for automatic retries