Choose an available specification
Output sizes come from live model discovery. A listed model is a configured option, not a guarantee of immediate availability. This workflow does not accept reference images or editing inputs.
Explore the Nano Banana family. Tune a prompt, generate an image, and use the same request in your app.
Developer guide
Generate one image from a text prompt through our independent API service. Sign in to discover the model specifications enabled for your account and see the credit cost before running a request.
Output sizes come from live model discovery. A listed model is a configured option, not a guarantee of immediate availability. This workflow does not accept reference images or editing inputs.
Your request key and parameters are saved before submission. After an interruption, resume the same request. Once a task is acknowledged, only its original task is checked.
Successful results are delivered through an authenticated download. Task media expires 30 days after creation, so save the files you need to keep.
Nano Banana 2 costs 1K: 9 credits (≈ $0.04); 2K: 11 credits (≈ $0.049); 4K: 14 credits (≈ $0.063). USD figures use the Pro plan rate ($44.90 for 10,000 credits); other plans price a credit differently, and there is no monthly minimum.
Yes. At the Pro plan rate: 1K $0.04 vs $0.067 (40% less); 2K $0.049 vs $0.101 (51% less); 4K $0.063 vs $0.151 (58% less). Replicate list prices were checked on 2026-09-15. Your actual rate depends on the credit plan you buy.
Nano Banana 2 supports 1K, 2K, 4K output, one image per request. The sizes enabled for your account are returned by GET /api/ai/models, together with the credit cost of each size.
Send POST /api/ai/image/generate with your API key as a Bearer token, an Idempotency-Key header, and a JSON body with provider "ai-relay", model "nano-banana-2", prompt and resolution. The response returns a task ID. Poll GET /api/ai/tasks/TASK_ID, waiting at least 5 seconds between checks, until status is 1 (completed) or 2 (failed), then download the image. The playground above shows cURL, JavaScript and Python code for your exact request.
No. Credits are reserved when the task is accepted and refunded automatically, once, if the task fails. Retrying with the same Idempotency-Key and body returns the original task instead of charging again. If the upstream outcome cannot be confirmed, the task is held for manual review rather than regenerated.
Not yet. The Nano Banana 2 API accepts a text prompt of up to 8,000 characters. Reference images, masks, seeds and callbacks are rejected with a validation error, so you are never billed for an input the API cannot use.
New accounts receive 20 signup credits. The smallest Nano Banana 2 image costs 9 credits, so you can run a test generation before buying credits. You can read the code examples and docs without an account.
No. Nano Banana API is an independent service and is not operated by Google. Requests use the model ID "nano-banana-2" on our asynchronous REST API with your project API key, not a Google AI Studio or Gemini API key.