Sign in

Errors

All errors share the same shape and a small, predictable set of codes.

Error format

All errors follow the same JSON shape. The HTTP status code matches the code below.

JSON
{
  "error": {
    "code": "validation_error",
    "message": "endUserEmail must be a valid email address",
    "fields": {
      "endUserEmail": "must be a valid email address"
    }
  }
}

Error codes

CodeHTTPDescription
validation_error400The request body or query parameters did not pass validation (missing required field, wrong type, value out of range). Inspect the message — it tells you what to fix.
unauthorized401Missing or invalid `Authorization` header. Check that you sent `Bearer xm_live_…` and that the key has not been revoked.
account_blocked401Your xMode account has been blocked. Existing dashboard access continues but `/v1/*` endpoints are refused. Contact support to resolve.
forbidden403The key is valid but does not have permission for this endpoint or resource.
not_found404The requested resource (request id, image id, end-user email) does not exist or does not belong to you.
payment_required402Your xTokens balance is insufficient for this request. Top up your balance in the dashboard.
conflict409Operation refused because of current state. Currently returned by `DELETE /v1/end-users/{email}` when the end-user has queued or processing generations — block first, wait for them to finish, then retry.
content_policy422The prompt or reference images were rejected by our content filter. Rephrase the prompt or use different references.
rate_limited429Too many requests in a short window. Back off and retry — check the `Retry-After` header for the suggested wait.
provider_timeout500Our upstream generation provider timed out. Safe to retry the same request. If it persists, contact support.
provider_error500Our upstream provider returned an error we could not handle. Safe to retry.
internal_error500Unexpected server error on our side. Contact support if this persists.
storage_failed200Per-image marker (returned inside `images[].error`, not as a top-level error). The model produced the image but our storage layer failed to persist it. The request as a whole is `succeeded`; only the affected image is unavailable. Safe to re-run the prompt.