Imagen 4: Access, Pricing and API Code (2026)
Unicorn API Team · · 11 min read
Imagen 4 is Google’s text-to-image model family. You describe a scene in plain language and it returns a photorealistic or stylised image, and it renders text inside images much more reliably than earlier Imagen versions. This post explains what the model is good at and how its tiers differ. It also covers where you can use it, what an image costs through an API, working code, and how it compares with Nano Banana, GPT Image and Flux on real jobs.
What is Imagen 4?
Google announced Imagen 4 at Google I/O in May 2025 and brought it to developers through the Gemini API in June 2025. It is a text-to-image model: a machine learning model that takes a natural-language prompt and produces an image that matches it.
Like most current image generators, Imagen is built on diffusion. A diffusion model starts from random noise and removes it step by step, guided by your prompt, until an image appears. A transformer-based language model encodes the prompt first, so the image model gets a detailed reading of what you asked for, including word order, relationships between objects and style instructions.
In practice, the model is known for three things:
- Photorealism and fine detail. Fur, fabric, skin, water and lighting come out convincingly, which makes it a good fit for product shots, lifestyle scenes and editorial images.
- Better text rendering. Google says text rendering is much better than in its earlier image models. Short headlines on posters, labels on packaging and shop signs are usually legible.
- Prompt adherence. It follows detailed descriptions well. If you name a camera angle, a time of day and a colour palette, you generally get all three.
It is a generator, not an editor. You give it words and it gives you a new image. If you want to change an existing photo, swap a background, or keep the same product consistent across ten shots, a model that accepts reference images is a better fit. The comparison section below covers those.
Imagen 4 Fast, Standard and Ultra: which variant?
Google ships the family in tiers. The names describe the trade-off between speed and quality:
- Fast is built for speed and volume. It is the tier for batch jobs, prototyping, thumbnails and anything where you generate many candidates and keep the best.
- Standard (usually just called Imagen 4) is the default balance of quality and speed.
- Ultra is the premium tier, aimed at maximum visual quality, text accuracy and polish for professional creative work.
For most product and content pipelines, the Fast tier is the practical starting point. You can generate several options per idea, pick a winner, and only pay more for a higher tier when an image needs to hold up at large sizes or in close inspection.
On Unicorn API the available variant is Imagen 4 Fast (model ID google-imagen4-fast). It costs 4 credits per image and accepts four input fields: prompt, aspect_ratio, seed and negative_prompt.

How to use Imagen 4: AI Studio, Gemini app or API
There are four common ways to reach the model. The right one depends on whether you are exploring prompts or building something.
| Route | Best for | What to expect |
|---|---|---|
| Google AI Studio | Trying prompts in a browser | Quick experiments with a Google account. Limits and available tiers change over time. |
| Gemini app | Casual, consumer use | Chat-style generation. Google decides which image model answers, and that changes between releases. |
| Gemini API / Google Cloud | Building directly on Google | Needs a Google project, billing setup and Google-specific SDKs. |
| Unicorn API | Apps that use several models | One key and one bill for Imagen 4 Fast plus other image, video, audio and chat models, priced in credits. |
One thing to plan for: model availability moves. Community threads regularly report Imagen models disappearing from one Google surface while they are still live on another, and Google retires and replaces versions on its own schedule. If you build a product on Imagen 4, keep the model ID in configuration rather than scattered through your code, so you can switch models with a one-line change if you need to.
If you only want to compare outputs before writing code, the browser playground runs the same models as the API, so you can test prompts side by side and copy the settings that work.
Calling Imagen 4 Fast with the Unicorn API (code)
Image generation on Unicorn API is asynchronous. You create a job (a queued generation request), get back a job ID, and poll until the job finishes. This avoids holding an HTTP connection open while the image renders, and every media model uses the same pattern.
Step-by-step
- Create a key on the API keys page and export it as
UNICORN_API_KEY. - Send
POST /v1/jobswith the model ID and aninputobject. - Poll
GET /v1/jobs/{id}untilstatusis"succeeded". - Read the image URL from
outputs[0].urland download the file.
Quick test with curl
export UNICORN_API_KEY="your-key-here"
# 1. Create the job
curl -X POST https://api.unicornapi.net/v1/jobs \
-H "Authorization: Bearer $UNICORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"google-imagen4-fast","input":{"prompt":"A red fox resting in a snowy forest at dawn, soft light, highly detailed","aspect_ratio":"1:1"}}'
# 2. Poll the job using the id from the response
curl https://api.unicornapi.net/v1/jobs/JOB_ID \
-H "Authorization: Bearer $UNICORN_API_KEY"
A complete Python script
This script creates a job, polls with a timeout, and saves the result to disk. It uses the requests library.
import os
import time
import requests
API = "https://api.unicornapi.net"
HEADERS = {"Authorization": f"Bearer {os.environ['UNICORN_API_KEY']}"}
MODEL = os.environ.get("IMAGE_MODEL", "google-imagen4-fast")
def generate(prompt, aspect_ratio="1:1", seed=None, negative_prompt=None, timeout_s=180):
body = {"model": MODEL, "input": {"prompt": prompt, "aspect_ratio": aspect_ratio}}
if seed is not None:
body["input"]["seed"] = seed
if negative_prompt:
body["input"]["negative_prompt"] = negative_prompt
r = requests.post(f"{API}/v1/jobs", json=body, headers=HEADERS, timeout=30)
r.raise_for_status()
job = r.json()
deadline = time.time() + timeout_s
while job["status"] != "succeeded":
if job["status"] == "failed":
raise RuntimeError(f"Job {job['id']} failed: {job}")
if time.time() > deadline:
raise TimeoutError(f"Job {job['id']} did not finish in {timeout_s}s")
time.sleep(2)
r = requests.get(f"{API}/v1/jobs/{job['id']}", headers=HEADERS, timeout=30)
r.raise_for_status()
job = r.json()
return job["outputs"][0]["url"]
if __name__ == "__main__":
url = generate(
"Studio product photo of a matte black ceramic coffee mug on a pale oak table, "
"morning window light from the left, shallow depth of field, the word \"BREW\" "
"printed in white on the mug",
aspect_ratio="1:1",
seed=42,
negative_prompt="blurry, extra handles, distorted text, watermark",
)
image = requests.get(url, timeout=60)
image.raise_for_status()
with open("mug.png", "wb") as f:
f.write(image.content)
print("Saved mug.png from", url)
What each input field does
prompt: the description of the image. This is the only field you strictly need.aspect_ratio: the shape of the image, written as width:height, such as"1:1"for a square. The model page lists the supported values.seed: a number that fixes the model’s starting noise. With the same prompt and seed you get closely matching results, which is useful for tweaking one word at a time.negative_prompt: things you do not want in the image, such as “watermark, blurry, extra fingers”. It steers the model away from them without cluttering the main prompt.
Two practical notes. First, POST /v1/models/price returns the exact price of a request before you run it, which is handy when you let users pick models and settings. Second, if you work in Cursor, Claude Code or another coding agent, the MCP integration lets the agent call the same models directly. The full request reference is in the API documentation.
What does Imagen 4 cost per image?
Imagen 4 Fast costs a flat 4 credits per image on Unicorn API. The dollar cost depends on how you bought the credits:
- Monthly plans give credits at $0.01 each, so one image costs $0.04.
- Top-up credits cost $0.015 each and never expire, so one image costs $0.06.
| Plan | Monthly price | Credits | Imagen 4 Fast images |
|---|---|---|---|
| Starter | $25 | 2,500 | 625 |
| Creator | $50 | 5,000 | 1,250 |
| Studio | $100 | 10,000 | 2,500 |
| Pro | $200 | 20,000 | 5,000 |
Worked example: a product catalog refresh
Say you need new hero images for 200 products and want three candidates per product to choose from. That is 600 images, or 2,400 credits. On a monthly plan that comes to $24, which fits inside Starter. Paid entirely with top-ups, the same batch is $36. If you only refresh the catalog a few times a year, top-ups can still make sense because unused credits never expire. If you generate images every week, a plan is cheaper per image. Current plan details are on the pricing page.
The same credits pay for every other model, so you can draft with Imagen 4 Fast, edit with a reference-image model, and turn the result into a video without opening a second account.

Imagen 4 vs Nano Banana, GPT Image and Flux
The most common question after “what is it” is how it stacks up against the alternatives, especially Imagen 4 vs Nano Banana. The short answer: they solve different problems. Here is how the image models on Unicorn API compare:
| Model | Credits per image | Reference images / editing | Notable options | Best at |
|---|---|---|---|---|
| Imagen 4 Fast | 4 | No, text-to-image only | Seed, negative prompt | Fresh photoreal images and short text from a prompt |
| Nano Banana 2 Lite | 4 | Yes, up to 10 reference images | Aspect ratios 16:9, 1:1, 9:16, 21:9, 4:3, 3:2, 2:3 | Cheap, fast 1K images and edits |
| GPT Image 1.5 | 3 low, 4 medium, 22 high | Yes, up to 4 reference images | Transparent background; 1:1, 3:2, 2:3 | Prompt adherence, legible text, cut-out assets |
| Flux 3 Klein Text to Image | 1.6 at 1K, 2.5 at 2K, 6.5 at 4K (rounded up per request) | No | Resolution up to 4K, multiple images per request, prompt enhancement | Low-cost volume and high-resolution output |
| Flux 3 Klein Edit Image | Same as Flux 3 Klein Text to Image | Yes, via image_urls | Resolution up to 4K | Editing existing images at a chosen resolution |
Imagen 4 vs Nano Banana
Nano Banana is Google’s Gemini image model family. It is built for conversation and editing: you can feed it reference photos and ask for changes in plain language. Nano Banana 2 Lite costs the same 4 credits as Imagen 4 Fast and takes up to 10 reference images, so it wins whenever you start from an existing picture, such as a product photo, a character or a brand style. Imagen 4 Fast is the better pick when you start from nothing and want a polished single image from a well-written prompt. Searchers also compare Imagen 4 vs Nano Banana Pro, the higher-end Gemini image model. The same split applies: Imagen is the dedicated generator, and Nano Banana is the editing and reasoning-heavy option. The Nano Banana API guide covers that family in detail.
When to choose something else
- You need a transparent PNG for a sticker, icon or product cut-out: GPT Image 1.5 supports a transparent background.
- You need many cheap drafts: Flux 3 Klein at 1K costs less per image than any other model here. Rounding happens on the whole request: one image at 1K is 1.6 credits rounded up to 2, and four images at 1K are 6.4 credits rounded up to 7. Batching with
num_imagesis cheaper. - You need 4K output: Flux 3 Klein offers a 4K resolution setting.
- You need photorealism specifically: the realistic AI image generator guide compares prompts and models for lifelike results.
The full list of image, video and audio models is in the model catalog.
Writing prompts that work well with Imagen 4
Because the model reads prompts closely, specific prompts beat clever ones. A reliable structure is:
- Subject: what the image is about. “A matte black ceramic mug.”
- Setting: where it is. “On a pale oak table by a window.”
- Lighting: the single biggest quality lever. “Soft morning light from the left.”
- Camera and composition: “Close-up, shallow depth of field, eye level.”
- Style: “Studio product photography” or “flat vector illustration” or “35mm film photo”.
- Text, if any: in quotation marks, with its placement. “The word \”BREW\” printed in white on the mug.”
Before and after
A weak prompt: “coffee mug ad”. You will get something plausible but generic, and every run will look different.
A strong prompt: “Studio product photo of a matte black ceramic coffee mug on a pale oak table, morning window light from the left, steam rising, shallow depth of field, the word “BREW” printed in white on the mug, minimal composition with empty space on the right for copy.” This tells the model what to show, how to light it, and where to leave room for your layout.
Using seed and negative prompt together
When you find an image you almost like, keep the seed and change one detail at a time: the lighting, then the background, then the text. Because the seed fixes the starting noise, each change is easier to judge. Put recurring problems, such as “watermark, distorted text, extra handles”, in negative_prompt instead of writing “no watermark” in the main prompt. Mentioning an object in the main prompt, even to exclude it, can pull it into the image.
Common mistakes and trade-offs
- Asking for paragraphs of text. Imagen 4 handles headlines and short labels well, but long sentences and small print still break. Generate the image with a short headline or empty space, then add body copy in your design tool.
- Expecting edits from a text-only model. Imagen 4 Fast has no image input. Sending it “make this photo brighter” without a photo produces a new, unrelated image. Use Nano Banana 2 Lite, GPT Image 1.5 or Flux 3 Klein Edit Image for edits.
- Not fixing the seed while iterating. Without a seed, every run starts from fresh noise, so you cannot tell whether your prompt change helped or you just got lucky.
- Polling without a timeout. Always cap the polling loop and handle a failed status, as the Python example does. Otherwise a stuck job can hang a worker.
- Hot-linking output URLs. Download each result and store it in your own storage or CDN. Your app then does not depend on a generation URL staying reachable.
- Hard-coding the model. Model versions change across the industry. Reading the model ID from configuration, as the script does with
IMAGE_MODEL, lets you move to a newer or cheaper model without a code release. - Ignoring rounding on fractional prices. Imagen 4 Fast is a flat 4 credits, but models priced in fractions, like Flux 3 Klein, round up per request. If you compare costs, compare whole batches, or check with the price endpoint first.
- Picking a model by reputation instead of by job. Run the same five prompts from your real use case through two or three models in the playground. At 2 to 4 credits per image, that test costs very little and settles the question for your content.
The main trade-off with Imagen 4 Fast is simple. You get strong photorealism and good short text at a flat, predictable price, but you give up editing and reference images. For most teams the best setup combines models: Imagen 4 Fast for fresh images, a reference-image model for edits and consistency, and a cheap Flux tier for bulk drafts, all on one key and one bill.
Frequently asked questions
Is Imagen 4 free to use?
Google has let people try Imagen models in Google AI Studio and the Gemini app, but free access, daily limits and which tier you get change over time. For anything automated or commercial you will pay per image. Through Unicorn API, Imagen 4 Fast costs 4 credits per image. That is about $0.04 on a monthly plan or $0.06 with top-up credits, and top-up credits never expire.
When was Imagen 4 released?
Google announced Imagen 4 at Google I/O in May 2025 and made it available to developers in the Gemini API in June 2025. The Fast variant listed on Unicorn API, model ID google-imagen4-fast, has a release date of 19 August 2025. Google updates and retires model versions on its own schedule, so keep the model ID in configuration rather than hard-coding it.
What is the difference between Imagen 4 and Nano Banana?
Imagen 4 is a dedicated text-to-image generator: you write a prompt and get a polished image back. Nano Banana is Google's Gemini image model family, built for conversational generation and editing with reference images. On Unicorn API, Nano Banana 2 Lite accepts up to 10 reference images, and Imagen 4 Fast takes only a prompt. Both cost 4 credits per image. Choose Imagen 4 for fresh images and Nano Banana for edits.
Can Imagen 4 edit an existing image?
Not through Unicorn API. Imagen 4 Fast accepts a prompt, aspect ratio, seed and negative prompt, and it has no image input. To edit a photo or keep a product consistent across shots, use Nano Banana 2 Lite (up to 10 reference images), GPT Image 1.5 (up to 4 reference images) or Flux 3 Klein Edit Image, which takes source images through its image_urls field.
Is Imagen 4 good at rendering text in images?
Yes. Google says Imagen 4 has much better text rendering than its earlier image models, and short headlines, labels and signage usually come out legible. It works best with a few words in quotation marks and a clear description of where they go. Long sentences and small body text are still unreliable, so add paragraphs of copy afterwards in a design tool.
How do I use Imagen 4 through an API?
On Unicorn API, create a key, then send POST /v1/jobs with the model google-imagen4-fast and an input object containing your prompt and aspect ratio. The response includes a job ID. Poll GET /v1/jobs/{id} until the status is succeeded, then read the image URL from outputs[0].url. The same key and request pattern also work for every other image, video and audio model in the catalog.