π Nano Banana
Match error codes and messages to troubleshoot Nano Banana models, sizes, reference images, and delivery.
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.
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.
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 status | Common message | Resolution |
|---|---|---|
missing_bearer_token | Missing bearer token | Send a complete Bearer header to Studio. |
invalid_bearer_token | Invalid bearer token | Use a valid π Nano Banana group key. |
Native 401 / UNAUTHENTICATED | API key is required / API key is invalid | Supply a valid key as shown in the Gemini guide. |
missing_credential | API key is required | Supply a key. |
identity_resolution_failed / Native 502 / UNAVAILABLE | Unable to resolve image request identity and concurrency | |
invalid_model | model 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_ARGUMENT | Unsupported Gemini image model: β¦ | Use the full Gemini model ID, not a product name such as nano-banana-pro. |
invalid_value | size is not supported for Gemini Studio requests | Remove size; use resolution and aspect_ratio. |
invalid_value | prompt must be a non-empty string / resolution must be a string / aspect_ratio must be a string | Check the value and type of the field named by param. |
invalid_content_type | Studio image submissions require application/json | Submit JSON with the matching Content-Type. |
invalid_json / Native 400 / INVALID_ARGUMENT | Request body is not valid JSON / Request JSON body must be an object | Send a valid JSON object rather than an array or string. |
request_too_large / Native 413 / INVALID_ARGUMENT | Request body is too large | Reduce the request body below 512 MiB; individual image limits still apply. |
Native 400 / INVALID_ARGUMENT | Unsupported Gemini image action: β¦ | Use the documented POST paths for generateContent or streamGenerateContent. |
Native 404 / NOT_FOUND | Unsupported Gemini Files endpoint: β¦ | Use the supported image inputs and media endpoints instead of a Files upload API. |
method_not_allowed | Method Not Allowed | Use the HTTP method documented for the endpoint. |
not_found / Native 404 / NOT_FOUND | Resource not found / Job not found / Media was not found | Check the path and jobId; use the original key for Studio jobs. |
Reference images
| Studio code or native status | Common message | Resolution |
|---|---|---|
edit_image_required | At least one image is required for edits | Supply at least one reference through Studio's public images field. |
invalid_value / Native 400 / INVALID_ARGUMENT | image Data URL is invalid | Use a full Data URL for Studio dataUrl, and bare Base64 for Gemini inlineData.data. |
invalid_image / Native 400 / INVALID_ARGUMENT | image is empty / image input could not be resolved | Check that the image opens; do not send web pages or empty files. |
image_too_large / Native 400 / INVALID_ARGUMENT | image exceeds maximum allowed size | Keep each input within 80 MiB; model-specific limits still apply. |
invalid_image_url / Native 400 / INVALID_ARGUMENT | image URL is not allowed | Use a publicly downloadable HTTPS image URL. |
image_download_failed / Native 400 / INVALID_ARGUMENT | image URL could not be downloaded | Check access and expiry, or use Base64 image input. |
Idempotency, jobs, and results
| Studio code or native status | Common message | Resolution |
|---|---|---|
invalid_idempotency_key / Native 400 / INVALID_ARGUMENT | Idempotency-Key must be 1-255 visible ASCII bytes | Use 1 to 255 visible ASCII characters, such as a UUID. |
idempotency_key_conflict / Native 409 / ALREADY_EXISTS | Idempotency-Key is already bound to a different request | Keep the same request for recovery; use a new value for a new task. |
Native 400 / INVALID_ARGUMENT | Idempotency-Key is not supported for streaming requests | Omit the key for streamGenerateContent, or use non-streaming or Studio for recovery. |
job_not_finished | Job is not finished | Wait for completed before fetching the result. |
cancelled | Job was cancelled / Image generation was cancelled | Stop polling; explicitly create a new task if needed. |
result_expired / Native 410 / NOT_FOUND | Result has expired / Media has expired | The result has been removed. Download future images before expiry. |
media_unavailable / Native 500 / INTERNAL | Result media is unavailable / Media is unavailable | |
submission_failed | Failed to submit image request | The submission outcome may be unknown. Recover with the same key, idempotency value, and request if you used one. |
generation_interrupted | Image generation was interrupted | |
generation_error / Native 500 / INTERNAL | Image generation failed | |
internal_error | Internal 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 status | Common message |
|---|---|
upstream_transport_error / Native 502 / UNAVAILABLE | Upstream image request failed |
upstream_error | Upstream image generation failed |
UNAVAILABLE / Native 502 / UNAVAILABLE | Upstream Gemini response is not valid JSON / Upstream Gemini response must be a JSON object |
upstream_response_too_large / Native 502 / UNAVAILABLE | Upstream response is too large |
invalid_upstream_image / Native 502 / UNAVAILABLE | upstream image base64 is invalid / upstream image could not be located |
upstream_image_too_large / Native 502 / UNAVAILABLE | upstream image exceeds maximum allowed size |
upstream_image_download_failed / Native 502 / UNAVAILABLE | upstream image could not be downloaded |
media_delivery_failed / Native 502 / UNAVAILABLE | upstream 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 status | User-visible message or excerpt | Resolution when the cause is explicit |
|---|---|---|
Studio 400 / Native 400 / INVALID_ARGUMENT | API key group platform is not gemini | Use a π Nano Banana group key. |
Studio 400 (HTTP 500) / Native 500 / INTERNAL | Unsupported 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_DENIED | Insufficient account balance | Low balance? Top up |
Studio 404 / Native 404 / NOT_FOUND | Model "gemini-3.1-flash-image" is not supported by any configured account in this group | Check the model name and key group. |
Studio 422 (HTTP 500) / Native 500 / INTERNAL | The 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_EXHAUSTED | Upstream rate limit exceeded, please retry later | Wait before submitting again; reduce concurrency when that limit is identified. |
Studio 502 Β· type: INTERNAL / Native 502 / UNAVAILABLE | Upstream service temporarily unavailable | Try again later. |
Studio model_temporarily_unavailable / Native 500 / INTERNAL | The model is temporarily unavailable. | Try later or select another available model. |
Studio upstream_transport_error / Native 502 / UNAVAILABLE | Upstream image request failed |
Do not repeatedly submit unchanged content after an explicit moderation rejection. See Frequently asked questions for billing and persistent failures.