AI Image Generation API
UnificAlly serves 31 image generation models from Alibaba, Black Forest Labs, ByteDance, Google, Kling, OpenAI and xAI through one REST API and one API key. Rates start at $0.01 per image (Grok Imagine 1.0 Image) or $0.0098/megapixel (Flux.2 Klein 4B), depending on how each model bills, and you pay per generation from a prepaid balance with no subscription. Every model below uses the same two calls: POST /v1/tasks to start a job and GET /v1/tasks/{task_id} to fetch the result.
All 31 image generation models on UnificAlly
| Model | Provider | Starting rate |
|---|---|---|
| GPT Image 2.5 API OpenAI Flare for speed, Sunburst for edit precision: 1K/2K/4K, 15 aspect ratios, 16 reference images, transparent output. | OpenAI | from $0.03 per image |
| Grok Imagine 2.0 Image API xAI Quality-focused xAI text-to-image and reference editing with up to 5 input images. | xAI | $0.025 per image |
| SeeDream 5.0 Pro API ByteDance Up to 10 reference images, 8 aspect ratios, 1K/1.5K/2K output, one image per call. | ByteDance | from $0.03 per image |
| Wan 2.7 Image API Alibaba T2I or editing up to 2K, thinking mode for better quality, up to 9 reference images. | Alibaba | $0.021 per image |
| Wan 2.7 Image Pro API Alibaba T2I or editing up to 4K, thinking mode for better quality, up to 9 reference images. | Alibaba | $0.0525 per image |
| Nano Banana 2 API Gemini image gen with 1K, 2K, or 4K resolution control and 10 aspect ratios. | from $0.034 per image | |
| Nano Banana 2 Lite API Sub-2s generation, 14 aspect ratios, 1K output, up to 14 reference images. | $0.02 per image | |
| Nano Banana 2.1 API Nano Banana 2.1: 1K, 2K, or 4K output, 5 aspect ratios plus auto, up to 10 references. | from $0.02 per image | |
| Flux.2 Flex API Black Forest Labs Steps, guidance, seed, and prompt upsampling controls, 7 aspect ratios up to 4 MP. | Black Forest Labs | $0.035/megapixel |
| Flux.2 Max API Black Forest Labs Maximum quality Flux.2 output, 7 aspect ratios, 0.6-4 MP, up to 10 reference images. | Black Forest Labs | $0.049/megapixel |
| Flux.2 Pro API Black Forest Labs Balanced production runs, 7 aspect ratios, 0.6-4 MP, up to 10 reference images. | Black Forest Labs | $0.021/megapixel |
| Grok Imagine 1.0 Image API xAI Fast xAI text-to-image and reference editing with up to 5 images. | xAI | $0.01 per image |
| GPT Image 2 API OpenAI T2I or reference editing, 5 aspect ratios, 1K, 2K, or 4K resolution control. | OpenAI | from $0.03 per image |
| Nano Banana Pro API Gemini 3 image gen with 1K, 2K, or 4K, 10 aspect ratios, and reference image support. | from $0.07 per image | |
| Flux.2 Klein 4B API Black Forest Labs 4B Flux.2 Klein, smallest in the line, 7 aspect ratios up to 4MP, reference image support. | Black Forest Labs | $0.0098/megapixel |
| Flux.2 Klein 9B API Black Forest Labs 9B Flux.2 Klein, 7 aspect ratios up to 4MP, reference image support. | Black Forest Labs | $0.0105/megapixel |
| SeeDream 4.0 API ByteDance Up to 6 reference images, 8 aspect ratios, 2K or 4K, returns 4 images per call. | ByteDance | $0.024 per image |
| SeeDream 4.5 API ByteDance Up to 6 reference images, 8 aspect ratios, 2K or 4K, returns 4 images per call. | ByteDance | $0.032 per image |
| Kling 3.0 Omni Image API Kling T2I or editing with up to 10 reference images, 9 aspect ratios incl. auto, and 1K to 4K. | Kling | from $0.01 per image |
| Kling O1 Image API Kling Reasoning image gen with up to 10 reference images, 9 aspect ratios, and 1K or 2K output. | Kling | $0.01 per image |
| SeeDream 5.0 Lite API ByteDance Up to 6 reference images, 8 aspect ratios, 2K or 4K, returns 4 images per call. | ByteDance | $0.028 per image |
| Qwen Image 2.0 API Alibaba T2I plus multi-image fusion editing, 5 aspect ratios, smart prompt rewriting on by default. | Alibaba | $0.0245 per image |
| Qwen Image 2.0 Pro API Alibaba Text rendering, multi-image fusion editing, 5 aspect ratios, highest output in the line. | Alibaba | $0.0525 per image |
| Qwen Image API Alibaba T2I plus reference editing, 5 aspect ratios, smart prompt rewriting, negative prompts. | Alibaba | from $0.0245 per image |
| Qwen Image Max API Alibaba Photoreal T2I plus reference editing, 5 aspect ratios, fewest synthetic artifacts in line. | Alibaba | $0.0525 per image |
| Qwen Image Plus API Alibaba Stylistic T2I plus reference editing, 5 aspect ratios, fast sampling for design exploration. | Alibaba | $0.021 per image |
| Z-Image Turbo API Alibaba T2I with Chinese and English text rendering, 7 aspect ratios. No editing. | Alibaba | from $0.0105 per image |
| Wan 2.6 Image API Alibaba T2I, editing, or style transfer with 1–4 reference images and 7 aspect ratios. | Alibaba | $0.021 per image |
| Wan 2.5 Image API Alibaba T2I or editing with 1–3 reference images, 7 aspect ratios, prompt extend on by default. | Alibaba | $0.021 per image |
| Wan 2.2 Image API Alibaba Text-to-image only, 5 aspect ratios, negative prompts and seeds for reproducible output. | Alibaba | $0.035 per image |
| Wan 2.2 Image Flash API Alibaba Cheapest T2I in the Wan line, 5 aspect ratios, negative prompts and seeds. No editing. | Alibaba | $0.0175 per image |
How to call the AI Image Generation API
Every model takes the same request: a model ID and an input object. This example uses google/nano-banana-2; swap in any model ID from the table and the input fields from its model page.
# 1. Start a task
curl -X POST https://api.unifically.com/v1/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "google/nano-banana-2",
"input": {
"prompt": "A photorealistic portrait in golden hour lighting",
"aspect_ratio": "3:4"
}
}'
# 2. Read the result with the task_id from step 1
curl https://api.unifically.com/v1/tasks/TASK_ID \
-H "Authorization: Bearer YOUR_API_KEY"AI Image Generation API FAQ
- How much does the AI Image Generation API cost?
- Each model has its own rate, shown in the table above and on the pricing page. The lowest listed rates right now are $0.01 per image (Grok Imagine 1.0 Image) and $0.0098/megapixel (Flux.2 Klein 4B). You pay per generation from a prepaid balance: no subscription, no monthly minimum, and the balance does not expire. Failed generations are not charged, and a request with dry_run set to true returns the exact price without running the job.
- How do I call these image generation models from code?
- Send POST https://api.unifically.com/v1/tasks with your API key, a model ID (for example google/nano-banana-2) and an input object. The response holds a task_id: poll GET /v1/tasks/{task_id} until the status is completed, or pass a callback_url to receive the result by webhook. The request shape is the same for every model; only the model ID and the input fields change.
- Can these models edit existing images too?
- Yes. 28 of these 31 models also take input images for edits and reference-guided generation. The full list is on the Image Editing API page with starting rates.
- Can I try the image generation models before topping up?
- Yes. A new UnificAlly account starts with a $0.50 signup balance, and every model page has a browser playground that runs on it, so you can compare outputs before writing any code.