Skip to Content
Cheapest Imagen
Guides

Errors

Every HTTP status and error code the Cheapest Imagen API returns, what each one means, whether it was charged and what to do next.

Errors have the same shape as OpenAI's:

{
  "error": {
    "message": "Not enough credits for this request.",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_credits"
  }
}

Every response carries an x-request-id header. Include it when you contact support.

StatuscodeMeaningWhat to do
400missing_required_parameterA required field is missingAdd the field named in param
400invalid_valueA field has a value that is not acceptedFix the field named in param
400unsupported_parameterThe field is not available, or not on this model (for example svg on a model without SVG output)Remove the field or pick a model that has it
400model_not_foundThe model does not exist or is not openUse a model from GET /v1/models
400moderation_blockedThe prompt or image was refused by content checksChange the prompt. Not charged, except on the Nano Banana stable channels (-1k, -2k, -4k)
401invalid_api_keyThe key is missing or wrongCheck the Authorization header
402insufficient_creditsNot enough creditsTop up
403account_suspendedThe account or key is disabledContact support
409idempotency_key_in_useThe Idempotency-Key was already usedWait for the first request, or use a new key
413request_too_largeThe request or an image is too largeSend smaller or fewer images
429rate_limit_exceededMore than 300 requests in a minuteSlow down and retry
429concurrency_limit_exceededMore than 50 requests at the same timeWait for one to finish
429moderation_pausedMore than 10 refused requests in an hourWait an hour
502upstream_errorThe image could not be generatedRetry. Not charged
504upstream_timeoutGeneration took longer than 420 secondsRetry. Not charged

When you are charged

Only for images you receive. Failed, timed-out and refused requests cost nothing. The exception: the Nano Banana stable channels (-1k, -2k, -4k) charge for images refused for their content, because the provider charges for them.

On this page