Skip to main content

Error Response Format

All each::labs APIs return errors in a clean, consistent JSON format:

Prediction-Envelope Errors

Prediction-based products (including the Video API) report failures asynchronously. The submit call succeeds with a prediction ID, and the failure arrives when you poll: the prediction returns status: "error" and its output carries an error envelope with error_code and error_message fields — not the HTTP {"error": ...} shape above. For the full envelope and the catalog of error codes, see the Video API error catalog.

HTTP Status Codes

Common Errors

400: Bad Request

Causes:
  • Missing required parameters
  • Invalid parameter types or values
  • Malformed JSON body
  • Input validation failure

401: Unauthorized

Causes:
  • Authorization: Bearer YOUR_API_KEY header not included
  • API key is invalid or expired

402: Payment Required

Causes:
  • The requested model costs more than your current balance
  • The combined estimated cost of your in-flight predictions would exceed your balance — each running prediction reserves its estimated cost until it settles
Handling:
  • Top up your balance, or wait for an in-flight prediction to finish. A settled prediction releases the difference between its estimate and its real cost.

403: Forbidden

Causes:
  • Attempting to modify a locked workflow or version
  • Insufficient permissions for the requested operation

404: Not Found

Causes:
  • Invalid model slug
  • Non-existent prediction ID, workflow ID, or execution ID
  • Resource was deleted

429: Too Many Requests

There is no per-second request limit on predictions. A 429 means an account concurrency cap: while your balance is $10.00 or less, you may have 10 predictions in flight at once for a model with a fixed list price, and 2 for a model the platform cannot price before it runs (metered models, billed from the run itself). A rejected request creates no prediction and is never billed. Read details for the cap that was hit — it always names the number that applied. Handling:
  • Keep your balance above $10.00 — the cap does not apply above that threshold
  • Otherwise, wait for an in-flight prediction to reach a terminal status and resubmit; the slot frees when it settles
  • Retry with exponential backoff when details reports that too many executions were started at once — that variant is transient

500: Internal Server Error

Handling:
  • Retry with exponential backoff
  • If persistent, contact support

Product-Specific Errors

each::api: Prediction Errors

each::workflows: Execution Errors

each::sense: Agent Errors

Retry Strategy

We recommend exponential backoff for transient errors (429, 500). Here’s how to set that up:
Backoff alone does not clear a 429 concurrency cap: the slot frees when an in-flight prediction settles, so retry a bounded number of times and surface the details text rather than looping.
Last modified on August 17, 2026