Getting started

Errors

Every failure uses a standard HTTP status code and the same JSON envelope — branch on success before you read anything else.

Two kinds of failure A request error (bad key, bad parameter, over quota) comes back synchronously as a non-2xx response with the envelope below. A generation failure happens later: the create call returns 200, then the asset ends at taskStatus: 3 — and its credits are refunded automatically. Read errorCategory / errorDetail on the asset to see why. See Async & polling.

Error envelope

error response
{
  "success": false,
  "error": {
    "code": 14001,
    "message": "Insufficient credit",
    "httpStatus": 402,
    "timestamp": "2026-08-05T09:12:00.000Z",
    "path": "/v1/models/from-text"
  }
}

There is no data on an error. error.code is a stable numeric identifier — switch on it, not on error.message, which is human-readable and may change.

error.details on some codes A few errors add an error.details object with the live numbers behind the failure — e.g. 13002 returns { "total": 15, "maxTotal": 15 }. Read those instead of hard-coding limits into your client.

HTTP status codes

StatusMeaning
400Validation — bad or missing parameter, unsupported engine/format, or an unreadable image.
401API key missing, invalid, or revoked.
402Insufficient credits to cover the job.
403Account not entitled to the API — no active subscription or completed credit purchase.
404Asset or collection not found, or not owned by your key.
413An uploaded file exceeded 20 MB.
429Rate limit (10003), too many concurrent generations in flight (13002), or an upstream engine's quota — exceeded. Back off and retry.
500 · 503 · 504Server error, maintenance, or an upstream engine timeout. Retry with backoff.

Error code catalog

The codes you're most likely to meet on /v1. The numeric code is stable across releases.

CodeHTTPWhen it happens
1001401API key missing, invalid, or revoked.
6014403Account has no active subscription or completed credit purchase — not entitled to the API.
14001402Wallet can't cover the job. Top up, or check GET /v1/credits.
2001400A field failed validation (type, range, or length).
2012400Prompt or image was blocked by the content policy.
7002413An upload exceeded the 20 MB limit.
7003400Unsupported upload format.
13001404Unknown asset id, or the asset isn't owned by your key.
13005400Remesh source must be an AI-generated model — uploads can't be re-meshed.
13008400Animate source isn't riggable — needs a clear humanoid or animal form.
10003429Over the per-IP or per-user rate limit.
13002429Too many generations already in flight — see concurrency limits. Nothing is charged; retry once a slot frees.
20001504A generation engine timed out. Safe to retry.
20002429An engine's capacity is momentarily full. Retry after a short wait.
20004400An engine rejected the input (e.g. an image it can't process).

Handling