AI image generator API: pick a model, send a prompt, pay per image
An AI image generator API turns a prompt, or a prompt plus your own photos, into pictures your app can use. Revana puts Nano Banana Pro, GPT Image 2, Seedream, FLUX, Ideogram, Recraft and Midjourney behind one API key, priced per image. This guide covers which model to pick, the request, editing your own pictures, several pictures at once, getting the result, and what 1,000 images cost.
Which image model to use
Every model below takes the same request. The price is the lowest each one lists:
| Model | Made by | Best at | From |
|---|---|---|---|
| Nano Banana Pro | Words in pictures, edits with up to 14 reference pictures, 4K | $0.04 an image | |
| GPT Image 2 | OpenAI | Long, detailed prompts; edits with up to 16 reference pictures | $0.03 an image |
| Seedream 5.5 | ByteDance | Photoreal pictures at a low price, wide and tall shapes | $0.02 an image |
| FLUX.2 Pro | Black Forest Labs | Product and lifestyle shots, 1 to 4 megapixels | $0.03 an image |
| FLUX 3 Klein | Black Forest Labs | The lowest price per picture: drafts, thumbnails, variants | $0.01 an image |
| Ideogram V3 | Ideogram | Posters, logos and typography | $0.03 an image |
| Recraft V4.1 | Recraft | Illustrations and brand design | $0.05 an image |
| Midjourney V7 | Midjourney | Art-directed, painterly pictures | $0.06 a request of 4 |
Not sure? Start with Nano Banana Pro for quality or Seedream 5.5 for price, and test the others with the same prompt. The cheapest image API guide lists every image model by price.
Your first request: text to image
Send POST /v1/generations with a model id and an input that holds the prompt and that model’s settings. It answers at once with a generation id; poll that id until the picture is ready:
export REVANA_API_KEY="sr_live_..."
# One Idempotency-Key per job, made once: resend with the same $KEY after a timeout, a 429 or a 5xx
KEY=$(uuidgen)
# 1. Submit the job (returns 202 with the generation id). max_cost_usd is your cap: the most it may cost.
curl https://api.revana.si/v1/generations \
-H "Authorization: Bearer $REVANA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $KEY" \
-d '{
"model": "nano-banana-pro",
"input": {
"prompt": "A minimalist poster for a jazz night, the words BLUE NOTE FRIDAY in bold serif, deep blue and cream.",
"resolution": "1K",
"aspect_ratio": "3:4"
},
"max_cost_usd": 0.1
}'
# 2. Poll with the id from step 1 until status is "succeeded" or "failed".
# A failed job is free; make a new KEY before you submit it again.
curl https://api.revana.si/v1/generations/gen_01JC4M2R8D \
-H "Authorization: Bearer $REVANA_API_KEY"This request costs $0.04. The finished job has the picture links in output.urls and the charge in cost_usd.
Image to image: edit your own pictures
Add your pictures as public links, image_url for one or image_urls for several, and say in the prompt what to change and what to keep. Send the body to POST /v1/generations with an Idempotency-Key, as above. Nano Banana Pro takes up to 14 pictures, GPT Image 2 up to 16, Seedream 5.5 and FLUX 3 up to 10, and FLUX.2 Pro up to 8:
{
"model": "gpt-image-2",
"input": {
"prompt": "Put this mug on a marble kitchen counter by a window. Keep the logo exactly as it is.",
"image_urls": ["https://example.com/mug.png"],
"resolution": "1K"
},
"max_cost_usd": 0.1
}The image editing API guide covers product shots, background swaps and keeping one face across many pictures.
Several pictures from one request
Set num_images (or n) to get up to 4 pictures from one prompt. Each delivered picture is billed at the model’s price, so four Seedream 5.5 pictures at 1K cost $0.08. Midjourney V7 already returns four pictures per request.
Getting the result
Poll GET /v1/generations/{id} every few seconds until status is succeeded or failed. Download the pictures from output.urls and store them yourself. If you would rather be called back, the queue API sends signed completion webhooks. A failed job releases its hold, so you can retry it with a new Idempotency-Key at no cost.
What 1,000 images cost
The same 1,000 pictures on each model at its smallest standard size. Midjourney returns four pictures per request, so its row is 250 requests:
| Model | Setting | Per image | 1,000 images |
|---|---|---|---|
| FLUX 3 Klein | resolution: 1K | $0.01 | $10.00 |
| Midjourney V7 | quality: relax | $0.015 | $15.00 |
| Seedream 5.5 | resolution: 1K | $0.02 | $20.00 |
| GPT Image 2 | resolution: 1K | $0.03 | $30.00 |
| FLUX.2 Pro | resolution: 1MP | $0.03 | $30.00 |
| Ideogram V3 | quality: turbo | $0.03 | $30.00 |
| Nano Banana Pro | resolution: 1K | $0.04 | $40.00 |
| Recraft V4.1 | resolution: 1K | $0.05 | $50.00 |
Bigger sizes cost more on most models: Nano Banana Pro is $0.08 at 4K and Seedream 5.5 is $0.055 at 2K. Failed images are never charged.
A complete example in Python
Submit, poll, and save two pictures to disk, with a cap on the whole request:
import os
import time
import uuid
import requests
API = "https://api.revana.si/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['REVANA_API_KEY']}"}
# One Idempotency-Key per job, made once: resend with the same key after a timeout,
# a 429 or a 5xx and you get the same job back, never a second charge.
key = str(uuid.uuid4())
resp = requests.post(f"{API}/generations", headers={**HEADERS, "Idempotency-Key": key}, json={
"model": "seedream-5.5",
"input": {
"prompt": "A running shoe on pale concrete, hard noon shadows, catalog photo.",
"resolution": "2K",
"aspect_ratio": "4:3",
"num_images": 2,
},
"max_cost_usd": 0.2, # your cap for the whole request
})
resp.raise_for_status()
gen_id = resp.json()["id"]
job = requests.get(f"{API}/generations/{gen_id}", headers=HEADERS).json()
while job["status"] in ("queued", "running"):
time.sleep(3)
job = requests.get(f"{API}/generations/{gen_id}", headers=HEADERS).json()
if job["status"] == "succeeded":
for i, url in enumerate(job["output"]["urls"]):
ext = os.path.splitext(url.split("?")[0])[1] or ".png"
with open(f"shoe-{i}{ext}", "wb") as f:
f.write(requests.get(url).content)
print("saved", len(job["output"]["urls"]), "pictures, cost", job["cost_usd"])
else:
print("failed (free):", job["error"])A setting a model does not list (a resolution, a length, an aspect ratio) comes back straight away as 422 invalid_input, with the values it does take, and nothing is charged.
See every image model with its live price on the models page, top up on the pricing page, read the request reference in the docs, or get an API key.
Frequently asked questions
What is the best AI image generator API?
There is no single best. Nano Banana Pro is the strongest all-rounder for words in pictures and edits, GPT Image 2 follows long prompts closely, Seedream 5.5 and FLUX 3 Klein have the lowest prices, and Ideogram is the typography specialist. On one API key you can test them all with the same prompt.
How much does an AI image generator API cost?
From $0.01 a picture with FLUX 3 Klein up to $0.08 for Nano Banana Pro at 4K, in November 2026. 1,000 Seedream 5.5 pictures at 1K cost $20.00.
Can the API edit my own photos?
Yes. Nano Banana Pro, GPT Image 2, Seedream 5.5, FLUX.2 Pro, FLUX 3, Ideogram V3 and Midjourney V7 take reference pictures. Send them as links in image_url or image_urls, with a prompt that says what to change.
How many pictures can one request make?
Up to 4 on most models: set num_images (or n). Each delivered picture is billed at the model's price. Midjourney V7 returns four pictures per request.
Do I need a subscription?
No. You pay per picture from prepaid credit, starting with a $10 top-up, and the same key works for every image and video model.
Am I charged for a failed image?
No. The price is held when you submit and released if the job fails, so a failed image costs nothing.
Try it first: run Nano Banana Pro free or GPT Image 2 free in your browser. Your first request is free once you save a card at sign-up (saving it charges nothing).
Add an image generator to your app today
One API key for Nano Banana Pro, GPT Image 2, Seedream, FLUX, Ideogram, Recraft and Midjourney. Prepaid credit from $10, charged only for images that are delivered.