Skip to main content

Authentication Errors

// Missing API key (401)
{"detail": "API key is required."}

// Invalid API key (401)
{"detail": "Invalid API key. Please check your API key and try again."}

Validation Errors

// Missing messages (422)
{"detail": [{"loc": ["body","messages"], "msg": "field required"}]}

// Invalid image URL
{"type": "error", "message": "Invalid image URL: Unable to fetch image from provided URL"}

// Too many images
{"type": "error", "message": "Maximum 4 images allowed per request"}

Model Errors

// Model not found
{"type": "error", "message": "Model not found: invalid-model-name", "suggestion": "Did you mean 'nano-banana-pro'?"}

// Model unavailable
{"type": "error", "message": "Model temporarily unavailable: kling-3-0", "alternatives": ["kling-2-1"]}

// Generation failed
{"type": "error", "message": "Failed to generate image: Model returned error", "details": {"error_code": "CONTENT_FILTER"}}

Timeouts

OperationTimeout
HTTP connection30 seconds
HTTP request300 seconds
Streaming connection15 minutes idle
Image generation10–60 seconds
Video generation60–600 seconds
Workflow execution15 minutes
{
  "type": "error",
  "message": "Model execution timed out after 300 seconds",
  "error_code": "TIMEOUT",
  "suggestion": "For long-running operations, check execution status with the execution_id"
}

Rate Limiting

// Rate limit error (429)
{
  "detail": "Rate limit exceeded.",
  "error_code": "RATE_LIMITED",
  "retry_after": 30
}

Limits by Plan

PlanRequests/minConcurrent
Free102
Pro6010
Enterprise30050

Rate Limit Headers

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1708345678

Insufficient Balance

{
  "type": "error",
  "message": "Insufficient balance.",
  "error_code": "INSUFFICIENT_BALANCE",
  "details": {
    "current_balance": 0.10,
    "required_estimate": 0.50,
    "top_up_url": "https://eachlabs.ai/billing"
  }
}

NSFW Content Filtering

By default, NSFW content is filtered. To disable:
{
  "messages": [{"role": "user", "content": "..."}],
  "enable_safety_checker": false
}
Only certain models support NSFW generation (e.g., Wan, Seedream). Other models ignore enable_safety_checker: false.

Input Validation Limits

InputConstraint
ImagesMax 4 per request
Image formatsJPEG, PNG, WebP, GIF
Image sizeMax 20MB, 64–8192px
Video formatsMP4, WebM, MOV
Video sizeMax 500MB, 10 min
Audio formatsMP3, WAV, M4A, OGG
Audio sizeMax 50MB, 5 min
Prompt lengthMax 10,000 characters

Session Edge Cases

// Session busy (concurrent request)
{"type": "error", "message": "Session is currently processing another request", "error_code": "SESSION_BUSY"}

// Session memory limit
{"type": "error", "message": "Session memory limit reached. Maximum 50 messages per session."}

Streaming Error Handling

Errors during streaming are emitted as events before [DONE]:
data: {"type":"status","message":"Generating image..."}
data: {"type":"error","message":"Generation failed: Insufficient balance"}
data: [DONE]
The stream always terminates after an error event.
Last modified on March 3, 2026