Gemini AI Image Generator: API Pricing and Code (2026)
Unicorn API Team · · 9 min read
The Gemini AI image generator is Google’s text-to-image system: you describe a picture in words, or upload a photo and describe a change, and a model in the Gemini family returns a new image. Most people meet it inside the Gemini app, where it is free up to a daily cap. If you want the same models to run inside your own product, a cron job or a batch script, you need API access and a predictable per-image price. This article covers both, with the credit costs and working code for the second.
What the Gemini AI image generator is, and the three ways to reach it
Gemini is Google’s assistant brand. Image generation is handled by a separate family of image models that Google ships under the Gemini name, widely known by the nickname Nano Banana. Two terms worth pinning down before anything else:
- Text-to-image: the model receives only a written prompt and invents the whole picture.
- Image-to-image, also called editing or reference-guided generation: you supply one or more existing images plus a prompt, and the model produces a new image that keeps what you asked it to keep.
There are three practical routes to the Gemini AI image generator, and they suit different jobs:
- The Gemini app and web interface. Free with an account, no code, hard daily limits, and output you download by hand.
- Google’s own cloud platform. Programmatic access with project setup, service credentials, quota requests and per-token billing in a console that also bills twenty other services.
- A unified API such as Unicorn API. One key, one bill, one request shape for Google’s image models alongside OpenAI’s and ByteDance’s, with a flat credit price per image.
Route one is where the search traffic goes. Route three is where the work gets done once a picture has to be produced a hundred times a day without a human clicking anything. The models are the same underneath; what changes is the plumbing and the billing.
Gemini AI image generator free limits in the app
The free tier is real and it is generous for casual use. Google has listed free accounts in the Gemini app at up to 100 images per day; that figure has changed before and will change again, so treat it as the current shape rather than a contract. Paid Google subscription tiers raise the cap and get access to the newer image models first.
What the free app does not give you is any of the following:
- Access without an account. People search for a Gemini AI image generator free without login, and it does not exist. Generation is tied to a signed-in account because the cap is per account.
- A stable interface. Buttons, model versions and template features move. A workflow built on clicking is a workflow you rebuild every few months.
- Automation. No endpoint, no job IDs, no way to generate 400 product shots overnight and write the URLs into a database.
- Output guarantees. Google applies an invisible watermark to images from its models, and consumer surfaces may add visible badging. If your pipeline needs a clean file at a known resolution, you want the API response.
So the honest advice is: use the app to explore prompts, then move to an API once the task repeats. Our notes on what the free Nano Banana tiers actually include go deeper on where the caps bite.

Which models the Gemini AI image generator uses over an API
Through Unicorn API, two Google image models are available, and they sit at different points on the price and quality curve.
Nano Banana 2.1, released 7 October 2026, is the current generation. It generates at 1K, 2K or 4K, accepts input images for editing, and lets you set the aspect ratio and output format. Its input fields are prompt, resolution, image_input, aspect_ratio and output_format.
Nano Banana 2 Lite, released 1 July 2026, is the cheapest Gemini image model on the platform: fast 1K images and edits with up to 10 reference images. Its fields are n, prompt, ref_images and aspect_ratio, and it supports aspect ratios 16:9, 1:1, 9:16, 21:9, 4:3, 3:2 and 2:3. The n field is useful: ask for four variations in one request and pay four times the per-image rate.
| Model | Best for | Resolutions | Reference images | Batch with n |
|---|---|---|---|---|
| Nano Banana 2.1 | Final assets, large output, detailed edits | 1K, 2K, 4K | Yes (image_input) | No |
| Nano Banana 2 Lite | Drafts, high volume, cheap edits | 1K | Up to 10 (ref_images) | Yes |
A pattern that works well: draft with Lite at four variations per prompt, pick the winner, then regenerate that single prompt on 2.1 at 2K or 4K. You spend most of your credits on images you keep.
Gemini AI image generator pricing in credits
Unicorn API prices everything in credits. Monthly plans buy credits at $0.01 each: Starter $25, Creator $50, Studio $100 and Pro $200 per month. Top-up credits cost $0.015 each and never expire, which makes them the sane choice for spiky workloads. Full details sit on the pricing page.
| Model and option | Credits per image | On a monthly plan | With top-up credits |
|---|---|---|---|
| Nano Banana 2 Lite, 1K | 4 | $0.04 | $0.06 |
| Nano Banana 2.1, 1K | 4 | $0.04 | $0.06 |
| Nano Banana 2.1, 2K | 6 | $0.06 | $0.09 |
| Nano Banana 2.1, 4K | 9 | $0.09 | $0.135 |
Prices are per output image and rounded up to whole credits. On Lite, the cost is multiplied by n. If you leave resolution unset on 2.1, the request falls back to the 4 credit rate. Practical arithmetic: a Creator plan at $50 a month is 5,000 credits, which is 1,250 images at 1K or about 555 at 4K.
You never have to guess. Post the exact body you intend to run to /v1/models/price and the API returns the price for that combination before anything is generated:
curl -s https://api.unicornapi.net/v1/models/price \
-H "Authorization: Bearer $UNICORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2-1",
"input": { "prompt": "studio shot of a ceramic mug", "resolution": "4K" }
}'
Wire that call into any batch job and you can refuse to start work that would cost more than your budget allows.
How to call the Gemini AI image generator from code
Every media model on the platform uses the same two-step shape: create a job, then poll it. Image generation takes seconds, not milliseconds, so the API hands you a job ID instead of holding the connection open.
First, create a key at /keys and export it as UNICORN_API_KEY. Then submit the job:
curl -s https://api.unicornapi.net/v1/jobs \
-H "Authorization: Bearer $UNICORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2-1",
"input": {
"prompt": "A red fox resting in a snowy forest at dawn, soft light, highly detailed",
"resolution": "2K",
"aspect_ratio": "16:9"
}
}'
The response contains an id. Poll it until the status settles:
curl -s https://api.unicornapi.net/v1/jobs/JOB_ID \
-H "Authorization: Bearer $UNICORN_API_KEY"
When status is "succeeded", the image URL is at outputs[0].url. Here is the whole thing in Python, including the wait loop and the download:
import os, time, requests
BASE = "https://api.unicornapi.net"
HEADERS = {"Authorization": f"Bearer {os.environ['UNICORN_API_KEY']}"}
def generate(prompt, resolution="2K", aspect_ratio="16:9"):
job = requests.post(
f"{BASE}/v1/jobs",
headers=HEADERS,
json={
"model": "nano-banana-2-1",
"input": {
"prompt": prompt,
"resolution": resolution,
"aspect_ratio": aspect_ratio,
},
},
).json()
job_id = job["id"]
while True:
job = requests.get(f"{BASE}/v1/jobs/{job_id}", headers=HEADERS).json()
if job["status"] == "succeeded":
return job["outputs"][0]["url"]
if job["status"] in ("failed", "canceled"):
raise RuntimeError(f"job {job_id}: {job.get('error', job['status'])}")
time.sleep(2)
url = generate("A red fox resting in a snowy forest at dawn, soft light, highly detailed")
open("fox.png", "wb").write(requests.get(url).content)
print(url)
Two details that save grief later. Poll every two seconds rather than in a tight loop. And always handle the failed branch: a prompt rejected by a safety filter is a normal outcome, not an exception you can ignore. The API documentation lists the full job object, and the image playground lets you test a prompt in the browser before you write any code. If you work in Cursor or Claude Code, the MCP integration lets the agent run these calls for you.

Editing a photo with reference images
The editing half of the Gemini AI image generator is what most people actually want: keep this product, change that background. You pass image URLs alongside the prompt. On Nano Banana 2.1 the field is image_input; on Nano Banana 2 Lite it is ref_images, which takes up to 10 images, enough to pin down a character, a product and a style in one request.
const res = await fetch("https://api.unicornapi.net/v1/jobs", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.UNICORN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "nano-banana-2-lite",
input: {
prompt:
"Place this mug on a pale oak table beside a window, morning light, keep the logo unchanged",
ref_images: ["https://example.com/mug.png"],
aspect_ratio: "4:3",
n: 4,
},
}),
});
const { id } = await res.json();
let job;
do {
await new Promise((r) => setTimeout(r, 2000));
job = await fetch(`https://api.unicornapi.net/v1/jobs/${id}`, {
headers: { Authorization: `Bearer ${process.env.UNICORN_API_KEY}` },
}).then((r) => r.json());
} while (job.status === "queued" || job.status === "running");
if (job.status !== "succeeded") throw new Error(job.error ?? job.status);
console.log(job.outputs.map((o) => o.url));
That request returns four variations for 16 credits. Write the edit instruction the way you would brief a retoucher: name what changes, then name what must not change. “Keep the logo unchanged” does more work than three sentences of mood. Our guide to writing Nano Banana prompts has worked examples of both directions.
Gemini AI image generator vs GPT Image and Seedream
Google’s models are not the only option behind a single key, and some jobs are better served elsewhere. Rough guidance based on what each model is built for:
| Model | Maker | Price per image | Notable strength |
|---|---|---|---|
| Nano Banana 2.1 | 4 at 1K, 6 at 2K, 9 at 4K | High-resolution output and prompt-driven photo edits | |
| Nano Banana 2 Lite | 4 credits | Cheapest Gemini model, up to 10 reference images | |
| GPT Image 1.5 | OpenAI | 3 low, 4 medium, 15 high | Legible text in images, transparent backgrounds |
| GPT Image 2.5 Flare | OpenAI | 6 at 1K, 10 at 2K, 16 at 4K | Fast everyday generation, up to 16 reference images |
| GPT Image 2.5 Sunburst | OpenAI | Same as Flare | Tighter control, more polished, slower |
| Seedream 5.0 Flash Text To Image | ByteDance | 4 credits | Cheap text-to-image at 1K to 2K |
| Seedream 5.0 Flash Image to Image | ByteDance | 4 credits | Cheap edits from an existing image |
| Seedream 5.0 Flash Layer Decomposition | ByteDance | 4 credits | Splits an image into layers |
Choose by task, not by brand. Need a poster with a readable headline? Start with GPT Image. Need to separate a subject from its background as layers? Seedream’s layer decomposition is the only model here built for it. Need 4K and strong photo editing from a plain-language instruction? That is where the Gemini AI image generator earns its place. Because the request shape is identical across all of them, swapping the model string is the entire migration, which also makes A/B testing cheap. We compare the editing models in more depth in the AI image editor roundup, and the Grok image generator post covers another contender. The full catalog lists everything.
Mistakes people make with the Gemini AI image generator
Patterns that cost people credits and afternoons:
- Generating finals at 4K during exploration. Each 4K image on Nano Banana 2.1 is 9 credits against 4 at 1K. Explore at 1K, upscale the decision, not the search.
- Forgetting that resolution is a billing field. Omitting
resolutiongives you the 4 credit default. If your spreadsheet assumed 4K pricing, your forecast is wrong in the expensive direction. - Treating editing as layer editing. The model returns a flat new image. If you need separable elements, use layer decomposition instead of asking a prompt to do it.
- Writing mood instead of instructions. “Cinematic, stunning, 8k, masterpiece” adds nothing. Subject, setting, lighting, lens, framing and what to preserve: those words change the output.
- No retry path. Jobs fail. A single failed status without a retry turns one blocked image into a stalled batch of 500.
- Polling too aggressively. Hammering the job endpoint every 100ms gets you nothing faster. Two seconds is plenty.
- Ignoring rights and likeness. Uploading someone’s photo to generate new pictures of them needs their consent, whatever the tooling allows.
If one prompt gives you an unusable image twice, the prompt is the problem. If every prompt gives you unusable images, the model choice is.
The short version: the Gemini app is the easiest place to try the Gemini AI image generator, and the worst place to depend on it. Once the task repeats, a key and nine lines of JSON give you the same models at 4 credits an image, with the price visible before you spend it.
Frequently asked questions
Is the Gemini AI image generator free?
The Gemini app includes image generation at no cost once you sign in, with a daily cap that Google has listed at up to 100 images a day for free accounts. Caps move over time and there is no free path without an account. Programmatic access is always paid: through Unicorn API, Nano Banana 2.1 costs 4 credits for a 1K image, which is $0.04 on a monthly plan.
What is Nano Banana, and how does it relate to Gemini?
Nano Banana is the nickname that stuck to Google's Gemini image models, and Google now uses it in product naming. When you generate a picture in the Gemini app, a Nano Banana model does the work. Through an API you pick the version directly: Nano Banana 2.1 for 1K to 4K output, or Nano Banana 2 Lite for cheap, fast 1K images and edits.
Can the Gemini AI image generator edit a photo I upload?
Yes. Both Google image models on Unicorn API accept input images alongside the prompt: Nano Banana 2.1 takes image_input, and Nano Banana 2 Lite takes up to 10 reference images in ref_images. You describe the change in plain language, such as replacing a background or changing the lighting, and the model returns a new image rather than a layered editable file.
What resolution and aspect ratios can I get?
Nano Banana 2.1 generates at 1K, 2K or 4K, priced at 4, 6 and 9 credits per image. Nano Banana 2 Lite produces 1K images at 4 credits and supports aspect ratios 16:9, 1:1, 9:16, 21:9, 4:3, 3:2 and 2:3. If you leave resolution unset on 2.1, the request is billed at the 4 credit default rate.
How do I know the exact cost before I generate an image?
Post the same body you plan to run to /v1/models/price and the API returns the credit cost for that exact combination of model and options. This matters when a field changes the price, as resolution does on Nano Banana 2.1, and it lets a batch job check its total spend before sending a single generation request.
Does Unicorn API watermark Gemini images?
Unicorn API returns the model's output as it comes back from the provider and adds nothing of its own. Google applies an invisible watermark to images produced by its own models, which is a provider-side behaviour rather than something the API layer controls. Visible app-style badges that appear in consumer products are not part of the API response.