Troubleshooting

🍌 Nano Banana

Match error codes and messages to troubleshoot Nano Banana models, sizes, reference images, and delivery.

Let AI read the docs πŸ₯ΊπŸ‘‰

Common Top 10

Based on service data, ranked by share of Nano Banana failure records. These percentages are not the image generation failure rate. Quotes show common user-visible messages; the same code can have other messages.

Studio jobs describe errors using error.code, type, and message. Gemini Native uses a numeric HTTP status for error.code; also check error.status and message. Studio codes are labeled separately below.

Incorrect model name

22.8%

Studio INVALID_ARGUMENT Β· HTTP 400

Unsupported Gemini image model: nano-banana-pro

Nano Banana is a product name, not a request model ID. Use gemini-3-pro-image for Nano Banana Pro or gemini-3.1-flash-image for Nano Banana 2. Add google/ in Studio.

Image service temporarily unavailable

22.0%

Studio 502 Β· type: INTERNAL; Gemini Native 502 / UNAVAILABLE

Upstream service temporarily unavailable

Try again later. Check the final state of an accepted Studio job first. Widespread incidents and recovery updates are announced in the .

Unsupported image size

18.9%

Studio 400 Β· HTTP 500; Gemini Native 500 / INTERNAL

Unsupported image size. Supported image sizes: 512px, 1K, 2K, 4K.

In Studio, use resolution: "1K", "2K", or "4K". In Gemini Native, use generationConfig.imageConfig.imageSize. Values are case-sensitive; availability depends on the selected model.

Insufficient balance

15.0%

Studio 403; Gemini Native 403 / PERMISSION_DENIED

Insufficient account balance

Top up before submitting again. PERMISSION_DENIED can also have other causes; only treat it as a balance issue when the message says so.

Low balance? Top up

Content or parameters rejected

4.7%

Studio 422 Β· HTTP 500; Gemini Native 500 / INTERNAL

The request may have been blocked due to copyright protection. Invalid request parameters or prompt. Please check your request parameters or revise the prompt, then try again.

Check parameters and revise the prompt and reference images. Do not repeatedly submit identical content. This message identifies a possible copyright check; not every 500 is a moderation rejection.

Wrong Studio size fields

3.9%

Studio invalid_value Β· HTTP 400

size is not supported for Gemini Studio requests

Remove size and use resolution with aspect_ratio. A size field set to null is still rejected.

Key belongs to the wrong group

3.1%

Gemini Native 400 / INVALID_ARGUMENT

API key group platform is not gemini

Use a key from a 🍌 Nano Banana group. A 🎨 GPT Image group key cannot serve this Google image request.

Need a key? Create oneChoose the 🍌 Nano Banana group when creating your key.

Model temporarily unavailable

2.4%

Studio model_temporarily_unavailable Β· HTTP 500; Gemini Native 500 / INTERNAL

The model is temporarily unavailable.

Try later, or explicitly choose another available model or group.

Key identity and concurrency lookup failed

2.4%

Gemini Native 502 / UNAVAILABLE

Unable to resolve image request identity and concurrency

Image service rate limit

1.6%

Gemini Native 429 / RESOURCE_EXHAUSTED

Upstream rate limit exceeded, please retry later

Wait before submitting again. Reduce simultaneous tasks when a concurrency limit is identified. For urgent work, you can explicitly switch to another available group.

Reference: static errors

These errors come from request validation, job handling, or image processing. String codes in the table apply to Studio. Gemini Native returns a numeric code, a status, and the corresponding safe message. Native-only errors are labeled with their numeric status.

Authentication, models, and parameters

Studio code or native statusCommon messageResolution
missing_bearer_tokenMissing bearer tokenSend a complete Bearer header to Studio.
invalid_bearer_tokenInvalid bearer tokenUse a valid 🍌 Nano Banana group key.
Native 401 / UNAUTHENTICATEDAPI key is required / API key is invalidSupply a valid key as shown in the Gemini guide.
missing_credentialAPI key is requiredSupply a key.
identity_resolution_failed / Native 502 / UNAVAILABLEUnable to resolve image request identity and concurrency
invalid_modelmodel must use openai/<model> or google/<model>Use google/gemini-3.1-flash-image or google/gemini-3-pro-image in Studio.
INVALID_ARGUMENT / Native 400 / INVALID_ARGUMENTUnsupported Gemini image model: …Use the full Gemini model ID, not a product name such as nano-banana-pro.
invalid_valuesize is not supported for Gemini Studio requestsRemove size; use resolution and aspect_ratio.
invalid_valueprompt must be a non-empty string / resolution must be a string / aspect_ratio must be a stringCheck the value and type of the field named by param.
invalid_content_typeStudio image submissions require application/jsonSubmit JSON with the matching Content-Type.
invalid_json / Native 400 / INVALID_ARGUMENTRequest body is not valid JSON / Request JSON body must be an objectSend a valid JSON object rather than an array or string.
request_too_large / Native 413 / INVALID_ARGUMENTRequest body is too largeReduce the request body below 512 MiB; individual image limits still apply.
Native 400 / INVALID_ARGUMENTUnsupported Gemini image action: …Use the documented POST paths for generateContent or streamGenerateContent.
Native 404 / NOT_FOUNDUnsupported Gemini Files endpoint: …Use the supported image inputs and media endpoints instead of a Files upload API.
method_not_allowedMethod Not AllowedUse the HTTP method documented for the endpoint.
not_found / Native 404 / NOT_FOUNDResource not found / Job not found / Media was not foundCheck the path and jobId; use the original key for Studio jobs.

Reference images

Studio code or native statusCommon messageResolution
edit_image_requiredAt least one image is required for editsSupply at least one reference through Studio's public images field.
invalid_value / Native 400 / INVALID_ARGUMENTimage Data URL is invalidUse a full Data URL for Studio dataUrl, and bare Base64 for Gemini inlineData.data.
invalid_image / Native 400 / INVALID_ARGUMENTimage is empty / image input could not be resolvedCheck that the image opens; do not send web pages or empty files.
image_too_large / Native 400 / INVALID_ARGUMENTimage exceeds maximum allowed sizeKeep each input within 80 MiB; model-specific limits still apply.
invalid_image_url / Native 400 / INVALID_ARGUMENTimage URL is not allowedUse a publicly downloadable HTTPS image URL.
image_download_failed / Native 400 / INVALID_ARGUMENTimage URL could not be downloadedCheck access and expiry, or use Base64 image input.

Idempotency, jobs, and results

Studio code or native statusCommon messageResolution
invalid_idempotency_key / Native 400 / INVALID_ARGUMENTIdempotency-Key must be 1-255 visible ASCII bytesUse 1 to 255 visible ASCII characters, such as a UUID.
idempotency_key_conflict / Native 409 / ALREADY_EXISTSIdempotency-Key is already bound to a different requestKeep the same request for recovery; use a new value for a new task.
Native 400 / INVALID_ARGUMENTIdempotency-Key is not supported for streaming requestsOmit the key for streamGenerateContent, or use non-streaming or Studio for recovery.
job_not_finishedJob is not finishedWait for completed before fetching the result.
cancelledJob was cancelled / Image generation was cancelledStop polling; explicitly create a new task if needed.
result_expired / Native 410 / NOT_FOUNDResult has expired / Media has expiredThe result has been removed. Download future images before expiry.
media_unavailable / Native 500 / INTERNALResult media is unavailable / Media is unavailable
submission_failedFailed to submit image requestThe submission outcome may be unknown. Recover with the same key, idempotency value, and request if you used one.
generation_interruptedImage generation was interrupted
generation_error / Native 500 / INTERNALImage generation failed
internal_errorInternal server error

Studio images and results are retained for 72 hours. See Studio Unified and Timeouts, billing, and recovery.

Generation connections and image delivery

Studio code or native statusCommon message
upstream_transport_error / Native 502 / UNAVAILABLEUpstream image request failed
upstream_errorUpstream image generation failed
UNAVAILABLE / Native 502 / UNAVAILABLEUpstream Gemini response is not valid JSON / Upstream Gemini response must be a JSON object
upstream_response_too_large / Native 502 / UNAVAILABLEUpstream response is too large
invalid_upstream_image / Native 502 / UNAVAILABLEupstream image base64 is invalid / upstream image could not be located
upstream_image_too_large / Native 502 / UNAVAILABLEupstream image exceeds maximum allowed size
upstream_image_download_failed / Native 502 / UNAVAILABLEupstream image could not be downloaded
media_delivery_failed / Native 502 / UNAVAILABLEupstream image could not be stored

Reference: dynamic errors

Only wrapped errors and message excerpts actually visible to users are included, without raw upstream responses. The same numeric code can have different causes. Studio job codes are not necessarily the same as the HTTP status.

Public code or statusUser-visible message or excerptResolution when the cause is explicit
Studio 400 / Native 400 / INVALID_ARGUMENTAPI key group platform is not geminiUse a 🍌 Nano Banana group key.
Studio 400 (HTTP 500) / Native 500 / INTERNALUnsupported image size. Supported image sizes: 512px, 1K, 2K, 4K.Set resolution or imageSize to a value supported by the model.
Studio 403 / Native 403 / PERMISSION_DENIEDInsufficient account balanceLow balance? Top up
Studio 404 / Native 404 / NOT_FOUNDModel "gemini-3.1-flash-image" is not supported by any configured account in this groupCheck the model name and key group.
Studio 422 (HTTP 500) / Native 500 / INTERNALThe request may have been blocked due to copyright protection. Invalid request parameters or prompt.Check parameters and revise the prompt and reference images.
Studio 429 / Native 429 / RESOURCE_EXHAUSTEDUpstream rate limit exceeded, please retry laterWait before submitting again; reduce concurrency when that limit is identified.
Studio 502 Β· type: INTERNAL / Native 502 / UNAVAILABLEUpstream service temporarily unavailableTry again later.
Studio model_temporarily_unavailable / Native 500 / INTERNALThe model is temporarily unavailable.Try later or select another available model.
Studio upstream_transport_error / Native 502 / UNAVAILABLEUpstream image request failed

Do not repeatedly submit unchanged content after an explicit moderation rejection. See Frequently asked questions for billing and persistent failures.

On this page