Skip to main content

Error Response Format

All each::labs APIs return errors in a clean, consistent JSON format:
{
  "error": "Human-readable error message"
}

HTTP Status Codes

StatusMeaningDescription
400Bad RequestInvalid request parameters or body
401UnauthorizedMissing or invalid API key
403ForbiddenOperation not allowed (e.g., locked resource)
404Not FoundResource does not exist
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected server error

Common Errors

400: Bad Request

{
  "error": "slug parameter is required"
}
Causes:
  • Missing required parameters
  • Invalid parameter types or values
  • Malformed JSON body
  • Input validation failure

401: Unauthorized

{
  "error": "Invalid or missing API key"
}
Causes:
  • X-API-Key header not included
  • API key is invalid or expired

403: Forbidden

{
  "error": "Workflow is locked and cannot be modified"
}
Causes:
  • Attempting to modify a locked workflow or version
  • Insufficient permissions for the requested operation

404: Not Found

{
  "error": "Failed to fetch model: model not found"
}
Causes:
  • Invalid model slug
  • Non-existent prediction ID, workflow ID, or execution ID
  • Resource was deleted

429: Rate Limited

{
  "error": "Rate limit exceeded. Please retry after 60 seconds."
}
Handling:
  • Implement exponential backoff
  • Check the Retry-After header when available
  • Consider reducing request frequency

500: Internal Server Error

{
  "error": "Failed to fetch models: internal error"
}
Handling:
  • Retry with exponential backoff
  • If persistent, contact support

Product-Specific Errors

each::api: Prediction Errors

ErrorDescription
"Prediction not found"Invalid prediction ID
"Model not found"Invalid model slug
"Invalid input"Input doesn’t match model’s request schema

each::workflows: Execution Errors

ErrorDescription
"Workflow not found"Invalid workflow ID or slug
"Version not found"Invalid version ID
"Workflow is locked"Attempting to modify a locked workflow
"ExecutionFailed"A workflow step failed during execution
"invalid input: missing required field"Trigger input doesn’t match workflow input schema

each::sense: Agent Errors

ErrorDescription
"Session not found"Invalid session ID
"Model execution failed"Underlying model execution error
"Workflow execution timeout"Execution exceeded 15-minute limit

Retry Strategy

We recommend exponential backoff for transient errors (429, 500). Here’s how to set that up:
import time
import requests

def request_with_retry(url, headers, json=None, max_retries=3):
    for attempt in range(max_retries):
        response = requests.post(url, headers=headers, json=json)
        if response.status_code in (429, 500):
            wait = 2 ** attempt
            time.sleep(wait)
            continue
        return response
    return response
Last modified on March 6, 2026