Grok AI Image Generator: Limits and API Code (2026)
Unicorn API Team · · 11 min read
The Grok AI image generator is the picture-making side of xAI’s Grok assistant, branded Grok Imagine, and it lives inside the X app, the standalone Grok apps and grok.com. You type a description, you get a handful of candidates back in a few seconds, and you can animate one of them into a short clip. It is genuinely good at photographic-looking scenes and it is fast. What it is not is a tool you can point a script at. This article covers what the generator does, where its free limits actually bite, how to use it properly by hand, and what to do instead when you need 200 images rather than two.
What the Grok AI image generator actually is
Grok started as a chatbot and picked up image generation later, alongside web search and a reasoning mode, as one feature among many in the assistant’s feature set. Image generation on X initially ran on an outside model before xAI shipped its own photorealistic generator, a history documented in the record of the Flux model that first powered it. Today the company behind Grok ships a family of language, image and video models under the same name, and Imagine is the image and video member of that family.
Under the hood it is a text-to-image model: a machine learning model that takes a natural language prompt and produces an image matching that description. That category includes Midjourney, Adobe Firefly, Ideogram, Canva’s built-in generator and the various freeware generators people find on perchance-style sites. They all take the same kind of input. What separates them is prompt adherence, text rendering, resolution, editing support, and whether you can call them from code.
Three things stand out about the Grok AI image generator in practice:
- Speed over deliberation. Results come back in a couple of seconds. You iterate by firing off another prompt rather than by writing a longer one.
- A photographic default look. Ask for a street scene and you get something that reads as a photo, not an illustration. That is useful for mockups and unhelpful when you wanted a flat vector.
- Stills that animate. Imagine’s distinguishing feature is turning a generated still into a short video with sound. For a single social post that is a real shortcut.
It is a consumer product with a chat interface. Every strength and every limitation below follows from that one fact.
Is the Grok AI image generator free, and what are the limits?
There is a free tier. Free accounts get a limited number of generations inside a rolling time window, and once you hit the cap you wait or you subscribe. Paid X and xAI tiers raise the ceiling. xAI has changed these numbers repeatedly, and they differ by region and by whether you are in the X app or the standalone one, so any specific figure you read on an SEO page claiming “unlimited free Grok images” is either out of date or wrong. Treat the free tier as a sandbox, not as capacity.
The limits that cause more trouble than the quota are the structural ones:
- No price per request. You pay a subscription for a quota you cannot measure in advance. Fine for personal use; impossible to put in a unit-cost model for a product feature.
- Coarse output control. You get what the interface offers for aspect ratio and resolution. There is no resolution parameter you can set to 4K for one job and 1K for the next.
- No reproducibility. The same prompt tomorrow may hit a different model version with no way to pin the old one.
- Manual only. There is no documented public image generation endpoint you can call the way you call a chat API. Scraping the web app breaks terms of service and breaks on the next UI change.
- Content filtering you cannot inspect. Refusals happen without a machine-readable reason, which is awkward if you are generating on behalf of users.
None of that matters if you want one image for a tweet. All of it matters the moment images become part of something you ship.

How to generate images in the Grok app, step by step
If you are here to use the product by hand, this is the whole workflow.
- Open Grok on grok.com, in the standalone app, or through the Grok tab in X. Sign in; image generation is not available to signed-out visitors.
- Switch to image or Imagine mode. In a plain chat you can also just ask for a picture, but the dedicated mode gives you the grid of candidates and the animate button.
- Write a prompt with a subject, a setting and a camera. “A ceramic coffee mug on a walnut desk, morning window light from the left, shallow depth of field, 50mm” beats “nice coffee mug photo” every time. Name the lighting direction and the lens; those two details do most of the work.
- Pick the closest candidate and refine in replies. Say what to change, not what you want overall: “same mug, move the light to the right, remove the notebook”. Reprompting from scratch loses the parts you liked.
- Download, then animate if you need motion. The video step takes the still you chose as its first frame, so getting the still right first is worth the extra round trip.
For product photography specifically, give it the real constraints: surface material, background colour, whether you want the product centred for a square crop. A generator will invent a plausible studio if you do not specify one, and plausible studios vary between generations, which is exactly what you do not want across a product grid.
Grok AI image generator vs calling an image model from code
Here is the honest comparison. The chat product wins on immediacy and on the image-to-video trick. An API wins on everything that involves more than one image.
| What you need | Grok AI image generator (chat app) | Image model via API |
|---|---|---|
| One image, right now | Best option. No setup. | Needs a key and three lines of code. |
| 200 product variants | 200 manual prompts | One loop |
| Known cost per image | No. Subscription quota. | Yes. Priced before the call. |
| Resolution control | Whatever the UI gives you | 1K, 2K or 4K as a parameter |
| Reference images for consistency | Limited | Up to 16, depending on the model |
| Editing an existing image | Conversational, hard to repeat | Dedicated edit and image-to-image models |
| Model choice | One family | Swap model ids freely |
| Fits in a backend or CI job | No | Yes |
Most people end up using both: the chat app to explore a look, then an API to produce the final set at the sizes they need. That is the pattern worth copying. Explore where iteration is cheap, produce where repetition is cheap.
The models you would reach for on the production side, all available through one Unicorn API key:
- Nano Banana 2.1, Google’s current image model, with a resolution switch for 1K, 2K or 4K and image input for edits. A sensible default.
- Nano Banana 2 Lite, the cheapest Gemini image model: fast 1K images and edits with up to 10 reference images.
- GPT Image 2.5 Flare, the faster GPT Image 2.5 variant for everyday generation and edits at 1K, 2K or 4K, with up to 16 reference images.
- GPT Image 2.5 Sunburst, the premium variant: tighter control and more polished output, slower than Flare, same price.
- GPT Image 1.5, strong prompt adherence and legible text, with low, medium and high quality tiers and an optional transparent background.
- Seedream 5.0 Flash Text To Image and Seedream 5.0 Flash Image to Image from ByteDance for fast text-to-image and image-to-image at 1K to 2K.
- Seedream 5.0 Flash Layer Decomposition, which splits an image into layers, useful when a designer has to touch the output afterwards.

Generating images from code with one API key
Every media model on Unicorn API uses the same three-step shape: submit a job, poll it, read the output URL. Create a key at /keys and export it as UNICORN_API_KEY.
Submit a job:
curl -X POST 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 ceramic coffee mug on a walnut desk, morning window light from the left, shallow depth of field, 50mm",
"resolution": "2K",
"aspect_ratio": "16:9"
}
}'
That returns a job with an id. Poll it until it finishes:
curl https://api.unicornapi.net/v1/jobs/JOB_ID \
-H "Authorization: Bearer $UNICORN_API_KEY"
When status is "succeeded", the file is at outputs[0].url. Here is the whole thing in Python, including the batch loop that the chat interface cannot give you:
import os, time, requests
BASE = "https://api.unicornapi.net"
HEADERS = {
"Authorization": f"Bearer {os.environ['UNICORN_API_KEY']}",
"Content-Type": "application/json",
}
def generate(model, payload):
job = requests.post(
f"{BASE}/v1/jobs",
headers=HEADERS,
json={"model": model, "input": payload},
).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"] == "failed":
raise RuntimeError(job.get("error", "job failed"))
time.sleep(2)
SCENES = [
"on a walnut desk, morning window light from the left",
"on white seamless paper, soft overhead studio light",
"held in two hands, outdoor cafe, warm late afternoon light",
]
for i, scene in enumerate(SCENES, start=1):
url = generate("nano-banana-2-1", {
"prompt": f"A matte black ceramic coffee mug {scene}, shallow depth of field, 50mm",
"resolution": "2K",
"aspect_ratio": "1:1",
})
img = requests.get(url).content
with open(f"mug_{i}.png", "wb") as f:
f.write(img)
print(f"mug_{i}.png")
Three scenes at 2K cost 6 credits each, so 18 credits, 18 cents on a monthly plan. Change SCENES to a list of 50 and the code does not change.
Keeping a product consistent across images
The reason a chat generator struggles with a product grid is that each generation reinvents the subject. Reference images fix that. Pass one or more photos of the real thing and the model matches them instead of inventing:
url = generate("gpt-image-2.5-flare", {
"prompt": "The same mug on a slate tile, hard side light, product catalogue style",
"ref_images": ["https://example.com/mug-front.png",
"https://example.com/mug-handle.png"],
"resolution": "2K",
"aspect_ratio": "1:1",
})
GPT Image 2.5 Flare takes up to 16 reference images, Nano Banana 2 Lite up to 10, and GPT Image 1.5 up to 4. If you want to edit an existing file rather than generate around it, Seedream 5.0 Flash Image to Image takes image_urls directly. There is more on choosing between them in our rundown of the best AI image editor models.
Checking the price before you spend anything
Send the exact request body you plan to run to the price endpoint and you get the cost back without generating:
curl -X POST https://api.unicornapi.net/v1/models/price \
-H "Authorization: Bearer $UNICORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-flare",
"input": {"prompt": "test", "resolution": "4K", "n": 4}
}'
This is the single biggest practical difference from a subscription product. You can put a real number in front of a feature before you build it. Full request shapes for every model are in the API docs, and you can try prompts without writing any code in the image playground.
What images cost in credits
Credits are $0.01 each on a monthly plan: Starter $25, Creator $50, Studio $100, Pro $200. Top-up credits cost $0.015 each and never expire. Full details are on the pricing page.
| Model | Setting | Credits per image | Cost on a plan |
|---|---|---|---|
| GPT Image 1.5 | quality low | 3 | $0.03 |
| GPT Image 1.5 | quality medium | 4 | $0.04 |
| GPT Image 1.5 | quality high | 15 | $0.15 |
| Nano Banana 2 Lite | 1K | 4 | $0.04 |
| Nano Banana 2.1 | 1K / 2K / 4K | 4 / 6 / 9 | $0.04 / $0.06 / $0.09 |
| Seedream 5.0 Flash (text or image to image) | 1K to 2K | 3.24, rounded up to 4 | $0.04 |
| GPT Image 2.5 Flare | 1K / 2K / 4K | 6 / 10 / 16 | $0.06 / $0.10 / $0.16 |
| GPT Image 2.5 Sunburst | 1K / 2K / 4K | 6 / 10 / 16 | $0.06 / $0.10 / $0.16 |
Prices are per output, so an n of 4 costs four times the single-image figure on the models that accept it. The practical consequence: draft at the cheap end, finish at the expensive end. A hundred 1K Nano Banana 2 Lite drafts cost $4. Ten 4K finals from GPT Image 2.5 Flare cost $1.60. Generating every draft at 4K would have cost $16 for work you were going to throw away.
Mistakes people make with the Grok AI image generator
Treating the free tier as infrastructure. People build a content workflow on free generations, hit the cap mid-batch, and discover there is no way to buy more capacity for that specific hour. If the output has a deadline, pay per image somewhere instead.
Reprompting instead of editing. When a result is 80% right, a fresh prompt resets all of it. Refine in replies in the chat app, or pass the file to an image-to-image model if you are working through an API.
Expecting clean typography. Legible text in images is a known weak spot across generators. If you need a readable label or a UI mockup with real words, use a model that advertises text handling, such as GPT Image 1.5, or add the text in a layout tool afterwards.
Asking one model for every job. The Grok AI image generator has a photographic house style. Flat illustration, transparent-background assets and layered files are different problems. Transparent backgrounds come from a background parameter; layered output comes from Seedream 5.0 Flash Layer Decomposition. Browse the full model catalog before you fight one model into a shape it does not want.
Generating at final resolution from the first attempt. See the cost table. Composition, lighting and framing are all visible at 1K. Decide there, then upscale the one you chose by regenerating at 4K.
Confusing “free” with “free to use commercially”. Check the terms of whichever service produced the image before it goes on a product page. That applies to the Grok AI image generator, to Canva’s generator, to Firefly, and to every freeware generator in the related searches. It is a licensing question, not a technical one. Our piece on what free tiers actually give you goes through how these offers are usually structured.
Which one should you use?
If you want a picture for a post in the next thirty seconds, open the app, write a prompt with a subject, a light direction and a lens, and animate it if you want motion. The Grok AI image generator is good at that and the friction is near zero.
If images are an input to something, a catalogue, a newsletter template, a user-facing feature, a test fixture, then the chat interface is the wrong tool no matter how good the model is, because the bottleneck is you typing prompts. Create a key, run the Python above against Nano Banana 2.1 at 1K while you tune the prompt, raise the resolution for the finals, and check the cost with the price endpoint before each batch. You can also drive the same API from Cursor or Claude Code through MCP, which means the loop that generates your images can be written by the agent that is already editing your code.
Frequently asked questions
Is the Grok AI image generator free?
There is a free tier, but it is rate limited. Free accounts get a small number of generations in a rolling window, and heavier use needs a paid X or xAI subscription. The limits change often and are not published as a stable number, so treat free access as something for casual experiments rather than for a pipeline you depend on.
How do I generate images with the Grok app?
Open Grok on the web or in the mobile app, select the image or Imagine mode, type a description of what you want, and submit. Grok returns a small set of candidates. Pick one, then refine it by replying with specific edits, such as a different camera angle, lighting or background. You can download the result or animate it into a short clip.
What are the limitations of Grok AI?
The main ones are rate limits on free accounts, no per-request price you can check in advance, limited control over resolution and aspect ratio compared with API models, and no stable programmatic interface for image generation. It also cannot be dropped into a build pipeline, so bulk jobs like 500 product variants mean 500 manual prompts.
How do I create my own AI images from code?
Pick a text-to-image model, send a prompt to its API, then download the returned file. With Unicorn API that is one POST to https://api.unicornapi.net/v1/jobs with a model id and a prompt, then polling GET /v1/jobs/{id} until status is "succeeded" and reading job.outputs[0].url. A 1K image from Nano Banana 2.1 costs 4 credits, or 4 cents on a monthly plan.
Can I use Grok Imagine for image to video?
Yes, Imagine's selling point is that a still it generated can be animated into a short clip with sound. That works well for social posts. If you need video in a repeatable pipeline rather than by hand, generate the still through an image API first, then feed its URL into an image-to-video model so both steps are scriptable.
What does an AI image cost through an API?
On Unicorn API, credits cost $0.01 each on a monthly plan. That puts a low-quality GPT Image 1.5 render at 3 credits, a 1K Nano Banana 2.1 image at 4 credits, a 2K image at 6, and a 4K image at 9. Call POST /v1/models/price with the exact request body to see the cost before you spend anything.