Nexus

Error codes

Errors use a consistent envelope:

{
  "error": {
    "code": "insufficient_credits",
    "message": "Available balance is lower than the estimated cost",
    "request_id": "req_…"
  }
}
HTTPCodeMeaning
400invalid_requestMalformed JSON or input failing the model schema
401invalid_api_keyMissing, malformed, unknown or revoked key
402insufficient_creditsAvailable balance below the estimated cost
402spend_limit_exceededDaily account or key spending limit reached
403insufficient_scopeThe key lacks the scope for this endpoint
403ip_not_allowedRequest IP is not in the key's allow-list
403account_suspendedThe account has been suspended
404model_not_found / task_not_foundUnknown or not-owned resource
409idempotency_conflictIdempotency key reused with a different body
409task_not_cancellableTask already submitted or finished
429rate_limitedPer-key rate limit exceeded
502upstream_errorThe provider returned an error; reservation released
503model_unavailableModel temporarily disabled or maintenance mode
500internal_errorUnexpected error; safe to retry with the same Idempotency-Key

A task that fails after it was accepted has status: "failed" and an error object. The reservation is always released, so failed tasks are never charged.

Task error codeMeaning
invalid_inputThe model rejected the parameters
content_policyThe request was blocked by the content policy
model_unavailableThe model is temporarily unavailable; retry later
timeoutGeneration did not finish in time
output_unavailableThe result could not be retrieved
generation_failedAny other generation failure