AI Image Generation API

Generate images with the model that suits the job, from photoreal to vector, through one OpenAI-style endpoint. Priced per image, paid per call, no account.

43 models from 10 providers: Black Forest Labs, xAI, Recraft, OpenAI, Google, ByteDance, Alibaba, Krea, GlianaAI, Bria.

Models

ModelProviderPrice
flux-2-pro-previewBlack Forest Labs$0.0540 First output megapixel
flux-2-maxBlack Forest Labs$0.1260 First output megapixel
flux-2-flexBlack Forest Labs$0.0900 First output megapixel
grok-imagine-image-qualityxAI$0.0600 Per image
grok-imagine-imagexAI$0.0240 Per image
recraftv4-proRecraft$0.4500 Per image
recraftv4-vectorRecraft$0.1440 Per image
recraftv4-pro-vectorRecraft$0.5400 Per image
recraftv4-1-vectorRecraft$0.1440 Per image
recraftv4-1-utility-vectorRecraft$0.1440 Per image
recraftv4-1-utility-proRecraft$0.4500 Per image
recraftv4-1-utility-pro-vectorRecraft$0.5400 Per image
recraftv4-1-pro-vectorRecraft$0.5400 Per image
recraftv4-1-utilityRecraft$0.0720 Per image
recraftv4-1Recraft$0.0720 Per image
recraftv4-1-proRecraft$0.4500 Per image
recraftv4Recraft$0.0720 Per image
recraftv3Recraft$0.0720 Per image
gpt-image-2OpenAI$0.2246 Per image (by quality)
nano-banana-proGoogle$0.1860 Per image
nano-bananaGoogle$0.0468 Per image
nano-banana-2Google$0.1140 Per image
imagen-4Google$0.0720 Per image
seedream-4.5ByteDance$0.0720 Per image
seedream-5-liteByteDance$0.0630 Per image
seedream-4.0ByteDance$0.0540 Per image
wan-2.6-imageAlibaba$0.0540 Per image
krea-2-medium-turboKrea$0.0180 Per image
krea-2-mediumKrea$0.0360 Per image
krea-2-largeKrea$0.0720 Per image
brainrot-characterGlianaAI$0.2000 Per image
seedream-5-proByteDance$0.0540 Per image
nano-banana-2-liteGoogle$0.0464 Per image
grok-imagine-image-2.0xAI$0.0480 Per image
flux-1-kontext-proBlack Forest Labs$0.0480 Per image
flux-1-kontext-maxBlack Forest Labs$0.0960 Per image
qwen-image-3.0-proAlibaba$0.0840 Per image (2K ceiling)
gpt-image-2.5-sunburstOpenAI$0.6739 Per image (by quality)
gpt-image-2.5-flareOpenAI$0.6739 Per image (by quality)
fibo-generate-1.5Bria$0.0360 Per image
nano-banana-2.1Google$0.0570 Per image
fibo-edit-1.5Bria$0.0360 Per image
remove-backgroundBria$0.0216 Per image

Call it

The first response is 402 with the exact price and every way to pay. Pay, repeat the request with the proof, and you get the result.

curl -X POST https://api.glianalabs.com/v1/images/generations \
  -H 'content-type: application/json' \
  -d '{"model":"flux-2-pro-preview","prompt":"a red apple on a wooden table, soft window light"}'

How it works

POST /v1/images/generations takes a model and a prompt; every other field (size, aspect ratio, seed, reference images) is the model’s own and is listed by GET /v1/schema?model=<id>. Fields a model does not declare are dropped, and out-of-range values are clamped, before the provider sees them.

Limits worth knowing

Each model has its own content policy and can refuse a prompt. Generated images are stored for 7 days at a stable URL; copy anything you want to keep. Edits that take a source image use /v1/images/edits.

Questions

How is image generation priced?

Per image, at each model’s rate. Models that bill by resolution or quality are priced from the options you send, and quoted before you pay.

Can I generate vector images?

Yes. Recraft’s vector models return SVG-style output; they are listed in the table on this page.

Can I edit an existing image?

Use POST /v1/images/edits with an image-to-image model and a source image URL.

Is there a free tier?

No. Every call is paid individually, with no plan or minimum. A request that fails validation is refused before it runs, so it is never charged.

Do I need an account or an API key?

No. The first response is HTTP 402 with the exact price; pay it with USDC from your own wallet and repeat the request. To prepay instead, top up a balance in rupiah and send a gk_ key.

More from the same API