If you want to use Nano Banana, the short version is this: Nano Banana is Google's name for the image model inside Gemini, and the quickest way to use it is the Gemini app. Open Images, type what you want, and download the result, with no code and no paid plan needed to start. Google AI Studio is the second route, closer to the developer side and billed through an API key. And if you need images by the hundred, the API route at the end of this guide walks the full code loop.
How to use Nano Banana in the Gemini app
This is where most people start, and every step below comes from Google's own help page, Generate & edit images with Gemini Apps.
Before you start. You need to be signed in to Gemini, and the feature depends on the languages and countries Gemini supports. Google sets the age bar at 13 (or your country's applicable age) to generate images and 18 to edit them.
Create an image
- On a computer, go to gemini.google.com. On an Android phone, open the Gemini app or the same site in your browser.
- At the top left, open the menu and choose Images.
- Pick a template or type your prompt. Gemini generates it with Nano Banana 2.
Google's prompt tips are simple: start with a verb like draw, generate, or create, name the style (photorealistic, watercolor, cartoon illustration), and describe the subject, what it is doing, and the setting.
Edit your own photo
- Open the menu and choose Library, then tap the image you want to change. You can also upload a photo from your device.
- Under the image, tap Chat.
- Type the change you want in the box at the bottom and submit.
Google lists three kinds of edits: change an image Gemini made, upload a photo and ask for edits, or upload several images and ask Gemini to combine them into a new one.
Redo with Nano Banana Pro, and download
If you pay for a Google AI plan, you can regenerate an image with Nano Banana Pro: create it with Nano Banana 2 first, then tap More, then Redo with Pro. To save an image on the web, hover over it and choose Download full size; in the mobile app, touch and hold the image and tap Save.
What's free and what needs a plan
Image generation with Nano Banana 2 works without a Google AI plan. The differences Google lists: downloads are 1K without a plan and 2K with one, Redo with Pro needs a plan, and there is a daily quota of Nano Banana 2 images (Google's limits page describes paid plans as having higher limits than the standard ones, without publishing a per-day image count).
How to use Nano Banana in Google AI Studio
Google AI Studio is Google's browser workspace for its models, and the place to test prompts before you write any code. Google's Nano Banana 2 developer post links straight to a new AI Studio chat with the model already selected:
- Open the Nano Banana 2 chat link and sign in with your Google account.
- Type your prompt in the input box.
- Click Run to get the image.
One catch that the Gemini app doesn't have: Google's post says "a paid API key is required to use the model on Google AI Studio." If you only want to make pictures, the Gemini app is the cheaper place to do it; AI Studio earns its place when you are testing prompts you plan to run from code.
What Nano Banana actually is (30 seconds)
"Nano Banana" is a nickname, not a separate product. In Google's own words, "Nano Banana is the name for Gemini's native image generation capabilities." So when you use Nano Banana, you are using a Gemini image model under the hood. Google is the model maker here; the app or API you use is just how you reach it.
The Nano Banana family maps to concrete Gemini model IDs:
| Nano Banana name | Underlying Gemini model ID | Role |
|---|---|---|
| Nano Banana (base) | gemini-2.5-flash-image (legacy) |
Original fast creative model, superseded by 2 |
| Nano Banana 2 | gemini-3.1-flash-image |
Generalist workhorse, fast text-to-image |
| Nano Banana 2 Lite | gemini-3.1-flash-lite-image |
Cheapest/fastest, high-volume drafts |
| Nano Banana Pro | gemini-3-pro-image |
Highest fidelity, complex compositions |
In the Gemini app you pick the member indirectly, through the Gemini model setting: Flash-Lite gives you Nano Banana 2 Lite, Flash or Pro gives you Nano Banana 2, and Nano Banana Pro comes through Redo with Pro on a paid plan. In code you call Nano Banana 2 (gemini-3.1-flash-image), the balanced default, and the API section below uses it as the worked example.
Which family member should you call? A quick rule of thumb, taken from the models' own routing notes: default to Nano Banana 2 for general fast text-to-image; drop to Nano Banana 2 Lite when cost and throughput matter more than peak quality (high-volume batches, drafts, thumbnails); step up to Nano Banana Pro for high-quality stylized art and complex compositions. For strict, high-end photorealism, none of the Nano Banana models is the ideal tool. The model's own tips point to Google's Imagen 4 series, but Google has deprecated Imagen 4 on the Gemini API, so for new work weigh current options like Seedream or GPT Image instead (see our roundup of other text-to-image models). You do not have to commit up front: on a unified API the model is just a string in the URL path, so you can A/B two members with the same request body and compare.
How to use Nano Banana from code: official API or a unified API
Once you need images in bulk, inside an app or a batch job, clicking in the Gemini app stops scaling and the API takes over.
Official Gemini API vs a unified API
There are two legitimate access paths, and picking the right one matters more than any single line of code.
Path A: Google's official Gemini API. You call Google directly. The base host is generativelanguage.googleapis.com, you authenticate with a Gemini API key, and you request an image model such as gemini-3.1-flash-image. Billing is token-based: for Nano Banana 2, Google charges about $0.50 per 1M input tokens and $60 per 1M output-image tokens, which works out to roughly $0.045 to $0.151 per image depending on resolution.
Path B: a unified API (Modellix). Instead of integrating one provider at a time, you call one endpoint with one key and swap the model name in the path: Nano Banana today, a different image or video model tomorrow. Modellix is one such Model-as-a-Service layer; it is a distribution layer, not the model's maker. Billing here is quoted per image rather than per token, and the interface is a uniform async task for every model.
| Official Gemini API | Unified API (Modellix) | |
|---|---|---|
| You integrate | One provider (Google) | One key across many image/video models |
| Billing model | Per token (per-image equivalent) | Per image |
| Interface | Gemini SDK / API | Uniform submit-and-poll async task |
| Best when | You only need Google's models and want the source of truth | You want to compare or mix providers without re-integrating |
Both routes call the same Google model, so image quality is identical; which one is "better" depends only on whether you want a single provider or one key across many models, not on either platform being cheaper or exclusive. The steps below use the unified-API path because its request/response is fully documented and easy to reproduce; the same key-to-image logic applies to the official path.
Step by step: Nano Banana 2 via a unified API
Here is the full loop, from zero to a saved image.
Step 1: Get an API key. Log in to the Modellix console and open "API Key" to create one (on the official Google path, you generate a key from the Google AI Studio API key page instead). The key is displayed only once after creation, so copy and store it immediately.
Step 2: Pick the model and endpoint. Nano Banana 2 lives at POST /google/nano-banana-2. The full async submit URL is https://api.modellix.ai/api/v1/google/nano-banana-2/async.
Step 3: Set your parameters. Only prompt is required.
| Parameter | Type | Required | Values |
|---|---|---|---|
prompt |
string | Yes | Your image description |
aspectRatio |
string | No | 14 options: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9 |
imageSize |
string | No | 512, 1K, 2K, 4K |
The Nano Banana 2 model page on Modellix: the required prompt field plus optional aspectRatio (1:1 selected) and imageSize, next to the per-image price band $0.0403 to $0.1248.
Step 4: Submit the task. Because generation is asynchronous, a successful POST does not return an image. It returns a task_id and a URL to fetch the result later, with an initial status of pending.
Step 5: Poll for the result. Call GET /api/v1/tasks/{task_id} until the status is success, then read the image URL from data.result.resources[].url. If you would rather not poll, send an X-Webhook-URL header when you submit and Modellix will POST the result to your public HTTPS endpoint when the task finishes.
Step 6: Save the image. Generated results are only kept for 7 days, so download and store the asset promptly.
Here is the whole loop in curl, submit then poll:
# 1) Submit the generation task
curl --request POST \
--url https://api.modellix.ai/api/v1/google/nano-banana-2/async \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "A blue fiber-optic spool on a clean white studio backdrop, product photography",
"aspectRatio": "1:1",
"imageSize": "2K"
}'
# Response includes a task_id and a get_result URL:
# {
# "code": 0,
# "message": "success",
# "data": {
# "status": "pending",
# "task_id": "task-abc123",
# "get_result": {
# "method": "GET",
# "url": "https://api.modellix.ai/api/v1/tasks/task-abc123"
# }
# }
# }
# 2) Poll the task until status == "success"
# Replace task-abc123 below with the real task_id from the response above
curl --request GET \
--url https://api.modellix.ai/api/v1/tasks/task-abc123 \
--header 'Authorization: Bearer <YOUR_API_KEY>'
# On success, the image URL is in data.result.resources[].url
Modellix's REST API docs: the POST .../async submit call (top box) returns a task_id, here task-abc123 with status pending, exactly the submit-then-poll loop the code above follows.
To move this to a real service, wrap the two calls in a loop with exponential backoff on the poll (say 1s, then 2s, then 4s), or register a webhook and skip polling entirely. Swap nano-banana-2 in the path for nano-banana-2-lite or nano-banana-pro and the rest of the code is unchanged; that path swap is the whole point of a unified API, and it is how you run one prompt across several image models on one key to compare them.
Common gotchas and tips
- It's asynchronous, not instant. The single most common surprise: your POST returns a
task_id, not an image. You must poll the task URL or register a webhook. - A 400 means your prompt is missing or malformed.
promptis the only required field; a 400 is a parameter error you fix, not one you retry. - A 429 means you hit a rate or concurrency limit. Back off exponentially and check the
X-RateLimit-Resetheader for when to retry. 500 and 503 are also retryable with backoff; 401 (bad key) and 402 (insufficient balance) are not, so fix the cause first. - Store the key on creation. It's shown once. And top up before a batch run so you don't hit a 402 mid-job.
- Choose aspectRatio before you generate, so the composition matches its final channel, and iterate at 512 or 1K before spending on 2K/4K finals.
- Download within 7 days. Results are purged after that; treat the returned URL as temporary.
How much does it cost?
In the Gemini app, you can start without paying: Nano Banana 2 image generation is included without a Google AI plan, within a daily quota, and a plan raises the limits, lifts downloads from 1K to 2K, and adds Redo with Pro.
Through the API, you pay per image. On the unified path, Nano Banana 2 is billed $0.0403 at 512, $0.0575 at 1K, $0.0851 at 2K, and $0.1248 at 4K. On Google's official path the same model is billed per token, which comes out to roughly $0.045 / $0.067 / $0.101 / $0.151 per image across the same sizes.
API prices drift, and the full breakdown (every family member, batch discounts, size by size) belongs in the dedicated price write-ups. For the family overview see the Nano Banana price guide; for the "2" variant's live per-image band, the Nano Banana 2 model page is the source of truth.
FAQ
Can I use Nano Banana for free? Yes, in the Gemini app. Nano Banana 2 image generation works without a Google AI plan, with a daily quota and 1K downloads. Google AI Studio and the API are paid: Google says a paid API key is required to use Nano Banana 2 in AI Studio.
Do I need to code to use Nano Banana? No. In the Gemini app, open the menu, choose Images, and type a prompt. Code only comes in when you want to generate images automatically or in bulk.
Is Nano Banana the same as Gemini? Effectively yes. Nano Banana is Google's name for Gemini's native image generation, so you're always using a Gemini image model.
Do I need Google Cloud to use Nano Banana? No. In the app you only need a Google account. For code, you need an API key: either an official Gemini API key from Google, or a key from a unified API like Modellix that fronts the same model.
Why don't I get the image back immediately from the API? Image generation runs as an asynchronous task. The submit call returns a task_id; you then poll GET /tasks/{task_id} or receive a webhook when it's done.
What's the only required API parameter? prompt. Both aspectRatio (14 options) and imageSize (512/1K/2K/4K) are optional.
How long are generated images kept? On the unified API, results are stored for 7 days, so download and persist them promptly. In the Gemini app, your images sit in Library.
Build with the latest AI models
Explore image, video and audio models through one API.
Start building



