Skip to content

Image generation API · Pay per use

One API for every model

76 image and video models behind one endpoint. Pay per image. No subscription, and no signup with a wallet.

From $0.003 per image · REST · JSON

curl https://imference.com/generate \
  -H "Authorization: Bearer $KEY" \
  -d '{"model": "z-image-turbo",
       "prompt": "a night train in the snow"}'

# {"request_id": "7f3c…", "kind": "image"}

curl "https://imference.com/status?request_id=7f3c…" \
  -H "Authorization: Bearer $KEY"

# {"data": {"URL": "https://blob.imference.com/…webp"}}
import requests, time

API = "https://imference.com"
auth = {"Authorization": "Bearer YOUR_KEY"}

r = requests.post(f"{API}/generate", headers=auth, json={
    "model": "z-image-turbo",
    "prompt": "a night train in the snow",
})
rid = r.json()["request_id"]

while (s := requests.get(f"{API}/status", headers=auth,
        params={"request_id": rid})).status_code == 404:
    time.sleep(1)
print(s.json()["data"]["URL"])
const API = "https://imference.com";
const auth = { Authorization: "Bearer YOUR_KEY" };

const { request_id } = await (await fetch(`${API}/generate`, {
  method: "POST",
  headers: { ...auth, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "z-image-turbo",
                         prompt: "a night train in the snow" }),
})).json();

let s;
while ((s = await fetch(`${API}/status?request_id=${request_id}`,
       { headers: auth })).status === 404) await new Promise(r => setTimeout(r, 1000));
console.log((await s.json()).data.URL);
An image returned by the API, made with Z-Image Turbo
Z-Image Turbo$0.005
76
models
$0.003
per image, from
50
requests a minute
0
signup with x402

How it works

Send, poll, done

POST /generate
{ "model", "prompt" }

1

Send a prompt

Pick any model by its code. Defaults are tuned per model.

GET /status?request_id=…
404 … 404 … 200

2

Poll the status

404 while it runs, 422 if it failed, 200 when it's ready.

3

Get a URL

A WebP image or an MP4 video, ready to use.

Paying

A key, or no account at all

Credits

Prepaid, with an API key

$5 buys 5,000 credits. Pay by card or USDC. The key also works in the app and in Claude.

POST /generate
Authorization: Bearer YOUR_KEY
Buy credits

x402

Pay per call, no signup

Your wallet signs a USDC payment on Base for each call. Same prices, no key, no account.

POST /ondemand/generate
402 → sign → 200
x402 quickstart

Models

Switch models with one field

All 76 models

Endpoints

Small on purpose

  • POST /generateImage or video, any model
  • GET /statusPoll a request
  • GET /media/allYour past generations
  • GET /credits/balanceCredits left
  • POST /ondemand/generateSame, paid with x402
  • GET /ondemand/statusPoll, no auth
  • GET /api/modelsCatalog with prices
  • GET /api/lorasCurated LoRAs
  • Full API reference

FAQ

Questions

Do I need an account?

No. Buying credits gives you an API key without a sign-up form. With x402 you don't even need a key: your wallet pays each call.

How much does an image cost?

Each model has its own price, from $0.003 per image. It is listed on every model page and in GET /api/models. No subscription, no minimum.

Images and video?

Both, through the same endpoint. The model you pick decides the media kind, and the response tells you which one you got.

Are there rate limits?

50 requests a minute per key or per wallet. Need more? Write to contact@imference.com.

Building an AI agent?

Use the MCP server. It wraps this API with model cards, so Claude or Cursor can pick a model and prompt it well.

Ship your first image today