Skip to content
On this page

Errors

Error codes and handling for generations and assets.

Check the HTTP status first, then the error code. message is a readable description; details provides additional information, such as field errors or related resource IDs. Use code for programmatic handling and allow for unknown codes.

Generation request errors

Failed requests return an error object directly:

json
{
  "code": "invalid_parameter",
  "message": "Invalid parameter 'duration': must be a positive integer in seconds.",
  "details": { "duration": "must be a positive integer in seconds" }
}

code and message are strings. details is an optional object with string keys and values. Parameter errors typically use field paths as keys, such as duration or parts[1].image.assetId.

If a failed creation response includes details.generation_id, use it to retrieve the generation. Moderation errors may also include asset_id and field.

HTTPcodeCause and action
400invalid_requestInvalid JSON or request format. Correct the request.
400invalid_parameterMissing parameters, invalid types, or an unsupported combination. Check details.
400model_not_supportedUnsupported model. Check model.
400content_policy_violationContent did not pass moderation. Revise the prompt or image.
400invalid_imageInvalid image content, format, or dimensions. Use another image.
400image_too_largeImage exceeds the size limit. Reduce its size.
400invalid_image_urlURL does not meet the public HTTPS requirements. Correct the URL.
400image_unavailableImage could not be retrieved. Check the URL, access permissions, and expiration.
400insufficient_creditsInsufficient available credits. Add credits before submitting.
401invalid_api_keyMissing or invalid API key. Check the key and Authorization header.
403organization_bannedOrganization is suspended.
403permission_deniedOrganization does not have access to this model.
404asset_not_foundStarting image asset is missing, deleted, or belongs to another organization.
404generation_not_foundGeneration is missing, deleted, or belongs to another organization.
429rate_limit_exceededRequest rate exceeded. Reduce the request frequency.
500internal_errorInternal error. Follow the retry guidance.
503service_unavailableService is temporarily unavailable. Follow the retry guidance.

Unknown endpoints, unsupported methods, an Accept header that excludes JSON, and unsupported content types return 404, 405, 406, and 415, respectively, with code invalid_request. A 405 response includes Allow; a 401 response includes WWW-Authenticate: Bearer.

Generation failures

Retrieving a failed generation still returns HTTP 200. Its status is failed, and error contains the failure reason:

json
{
  "code": "generation_failed",
  "message": "Video generation failed."
}
error.codeMeaning
generation_failedVideo generation failed.
generation_timeoutGeneration exceeded the allowed processing time.
content_policy_violationInput or output did not pass moderation.
service_unavailableProcessing or moderation service is temporarily unavailable.
insufficient_creditsInsufficient credits during processing.

Polling does not restart a failed generation. To try again, address the cause and create a new generation.

Asset errors

json
{
  "code": "00200",
  "message": "Unknown file extension: gif",
  "details": null
}

Asset error codes are numeric strings; preserve their leading zeros. details is a nullable object with string keys and values. Moderation errors may include assetId and errorCode.

HTTPcodeCause and action
40000003Invalid parameters, filename, or path ID, or image moderation failed. Check the input.
40000200Unsupported file extension. Use a supported format.
40000202File is empty, cannot be decoded, or has invalid dimensions or duration. Use another file.
40000204Upload exceeds the size limit. Reduce the file size.
40100001Missing or invalid API key. Check authentication.
40300002Organization is suspended or cannot access the asset.
40400005Asset is missing or deleted.
42900009Request rate exceeded. Reduce the request frequency.
50000006Internal processing error.
50300006Service is temporarily unavailable.

An unsupported Content-Type may return 415 / 00003; an unsupported HTTP method returns 400 / 00010. See Upload an Asset for file requirements.

For troubleshooting, retain the endpoint, request time, HTTP status, error code, and generation or asset ID. Do not log API keys.