Skip to content

OmnAPI Error Codes

Every error follows the same envelope:

{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Not enough credits to start this task.",
"details": { /* optional, context-specific */ }
}
}

Every response — error or success — carries X-Request-Id in the headers. Always include this in support tickets; it’s the single fastest way for us to trace the problem.

Errors come in two flavors:

WhereWhat it means
HTTP status 4xx / 5xx on the original POSTSubmission was rejected; no task was created
status: "FAILED" on a polled task descriptorSubmission accepted but generation failed downstream

The first kind does not charge credits. The second usually refunds eligible credits automatically; partial-output cases may keep a smaller final charge.

This is the curated, human-readable view of the platform error codes. Module-specific codes, such as the MV_* family for the Music Video API, are documented in their module guide rather than repeated here. For request and response schemas, see the Interactive API Reference.

CodeHTTPRecovery
UNAUTHORIZED401Include the x-api-key header.
INVALID_API_KEY401Confirm the key value or rotate to a new active key.
API_KEY_EXPIRED401Key past its expiry. Create a new one from the dashboard.
API_KEY_DISABLED403Key was disabled. Use a different active key.
FORBIDDEN403Key valid but not authorized for this resource or plan tier.
CodeHTTPRecovery
BAD_REQUEST400Fix malformed JSON or a structurally missing required field.
VALIDATION_ERROR400Field present but invalid (range, length, enum). details.errors lists each.
MISSING_REQUIRED_FIELD400The named field is required.
INVALID_MODEL400Use a documented model path or omit the model override.
INVALID_FEATURE400Use a feature supported by the selected model and endpoint.
FEATURE_NOT_SUPPORTED400Upgrade plan access or remove the unsupported feature.
CodeHTTPRecovery
INSUFFICIENT_CREDITS402Add credits from the dashboard, or raise maxCredits when the error details show an MV budget cap was exceeded.
BALANCE_NOT_INITIALIZED402Account balance is not ready yet. Open the dashboard once, then retry.
CREDIT_DEDUCTION_FAILED500Credits were not actually charged. Safe to retry.
CREDIT_REFUND_FAILED500File a ticket with X-Request-Id.
CodeHTTPRecovery
TASK_NOT_FOUND404Confirm the task id and that the task is still available.
TASK_ALREADY_EXISTS409Idempotency collision (rare). Re-poll the original id.
CONFLICT409Generic state/idempotency conflict (e.g. competing edit). Re-poll or reconcile, then retry.
TASK_CREATION_FAILED500Transient — retry.
TASK_EXECUTION_FAILED500 / (task status)Generation failed after the task was accepted. Inspect errorMessage; eligible credits are refunded unless partial output was billable.
TASK_TIMEOUT408 / (task status)Soft timeout (10 min default). Eligible credits are refunded. Resubmit a fresh task.
TASK_CANCELLED409 / (task status)Cancelled before completion. Contact support if unexpected.
CodeHTTPRecovery
PROVIDER_ERROR502The selected generation service rejected the call. Inspect errorMessage; eligible credits are refunded if surfaced on a task.
PROVIDER_NOT_FOUND404Use a documented model path or omit the model override.
PROVIDER_TIMEOUT504The selected generation service did not respond in time. Retry with backoff.
PROVIDER_RATE_LIMITED429Temporary capacity or rate limit at the selected generation service. Retry after exponential backoff.
NO_AVAILABLE_ACCOUNT503No generation capacity is currently available. Transient — retry.
SERVICE_UNAVAILABLE503Gateway in maintenance / shedding load. Retry with backoff.
CodeHTTPRecovery
RATE_LIMITED429Respect the Retry-After header. See Rate Limits.
CodeHTTPRecovery
INTERNAL_SERVER_ERROR500Unexpected platform error. Capture X-Request-Id and file a ticket.
NOT_FOUND404Confirm the HTTP method and URL.
ClassRetry?Notes
Auth / validation (4xx, VALIDATION_ERROR)NoFix the request and re-submit.
INSUFFICIENT_CREDITSNoTop up first, or adjust maxCredits if the request was rejected by your own spend cap.
RATE_LIMITEDYes, after Retry-AfterHonor the header.
Generation-service transient (PROVIDER_TIMEOUT, PROVIDER_RATE_LIMITED, NO_AVAILABLE_ACCOUNT)Yes, with backoff1s → 2s → 4s → 8s → cap 30s, max 5 tries.
Server error (INTERNAL_SERVER_ERROR, CREDIT_DEDUCTION_FAILED)Yes, with backoffSame schedule.
TASK_TIMEOUT (on task)Resubmit, don’t retry the same idThe previous task is already final.