Image Generation
Image Generation
Generate images using a variety of models through a single unified endpoint.
POST /v2/images/generate
Submit a prompt to generate images. The request returns immediately with a job ID — poll the Jobs endpoint or use webhooks to get the result.
Common request body
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | The image description (1–2,000 characters) |
model | string | Yes | The model identifier (see available models below) |
webhookUrl | string | No | URL to receive webhook notifications |
webhookEvents | string[] | No | Events to subscribe to: "progress", "completed", "failed" |
Each model also accepts its own parameters object — see the individual model pages for details.
Idempotency
Include an Idempotency-Key header to prevent duplicate jobs if the same request is sent multiple times.
Response
Status: 202 Accepted
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "QUEUED"
}Available models
| Model | Identifier | Description |
|---|---|---|
| Midjourney | "midjourney" | High-quality image generation from text prompts |
| Nano Banana | "nano-banana" | Fast generation with image-to-image support |
| Nano Banana Pro | "nano-banana-pro" | Professional-grade with accurate text, up to 4K |
| Nano Banana 2 | "nano-banana-2" | High-efficiency with Google Search grounding, up to 4K |
| Flux 1.1 Pro | "flux-1.1-pro" | Fast, high-quality generation with excellent prompt adherence |
| Flux 1.1 Pro Ultra | "flux-1.1-pro-ultra" | High-resolution (up to 4MP) with raw mode |
| Flux 2 Pro | "flux-2-pro" | Image generation and editing with multi-reference support |
| Flux 2 Dev | "flux-2-dev" | Open-weight generation and editing, optimized for speed |
| Flux 2 Flex | "flux-2-flex" | Specialized for typography and fine detail |
| Flux 2 Max | "flux-2-max" | Highest fidelity model with best editing consistency |
| Seedream 3 | "seedream-3" | High-resolution (2K) text-to-image by ByteDance |
| Seedream 3.1 | "seedream-3.1" | Cinematic-quality with style control (Dreamina 3.1) |
| Seedream 4 | "seedream-4" | Generation and editing with multi-reference, up to 4K |
| Seedream 4.5 | "seedream-4.5" | Stronger spatial understanding, up to 4K |
| Seedream 5 Lite | "seedream-5-lite" | Latest model with reasoning and example-based editing |
| Ideogram V2 | "ideogram-v2" | High-quality generation with superior text rendering |
| Ideogram V2 Turbo | "ideogram-v2-turbo" | Faster V2 variant optimized for speed |
| Ideogram V2a | "ideogram-v2a" | Cost-efficient generation with strong text rendering |
| Ideogram V2a Turbo | "ideogram-v2a-turbo" | Fastest and most affordable Ideogram model |
| Ideogram V3 Balanced | "ideogram-v3-balanced" | Balanced quality/speed with style presets and references |
| Ideogram V3 Turbo | "ideogram-v3-turbo" | Fast V3 with style presets and references |
| Ideogram V3 Quality | "ideogram-v3-quality" | Highest-quality V3 for production-ready images |
| Ideogram Character | "ideogram-character" | Character-consistent generation with reference images |
| Imagen 3 | "imagen-3" | Google's highest quality text-to-image with rich lighting and detail |
| Imagen 3 Fast | "imagen-3-fast" | Faster, cheaper Imagen 3 for speed-sensitive use cases |
| Imagen 4 | "imagen-4" | Google's flagship Imagen 4 with superior typography and detail |
| Imagen 4 Ultra | "imagen-4-ultra" | Ultra quality Imagen 4 for maximum fidelity |
| Imagen 4 Fast | "imagen-4-fast" | Fast Imagen 4 optimized for speed and cost |
| DALL-E 3 | "dall-e-3" | OpenAI's latest with improved detail, text rendering, and prompt adherence |
| DALL-E 2 | "dall-e-2" | OpenAI's classic image generation from text descriptions |
| GPT Image 1.5 | "gpt-image-1.5" | OpenAI's latest with tiered quality, editing, and multi-image output |
| Kling Image | "kling-image" | Kling's image generation with reference images and multi-image output |
| Qwen Image | "qwen-image" | Qwen v1 with text-to-image, image-to-image, and image editing |
| Qwen Image 2 | "qwen-image-2" | Qwen v2 unified generation and editing model |
| Qwen Image 2 Pro | "qwen-image-2-pro" | Qwen v2 Pro with higher fidelity output |
| Wan Image 2.6 | "wan-image-2.6" | Alibaba's Wan 2.6 image generation and editing model |
| Wan Image 2.7 | "wan-image-2.7" | Alibaba's Wan 2.7 image generation and editing with thinking mode |
| Wan Image 2.7 Pro | "wan-image-2.7-pro" | Wan 2.7 Pro with higher fidelity output |
| Grok Imagine Image | "grok-imagine-image" | xAI's fast image generation with strong creative control and text rendering |
| Reve Create | "reve-create" | High-quality generation with stunning aesthetics and text rendering |
Error responses
| Status | Error | Meaning |
|---|---|---|
400 | Validation error | Invalid parameters — check details |
401 | Unauthorized | Missing or invalid API key |
402 | Insufficient credits | Not enough credits to run this model |
503 | Service unavailable | Job queue is temporarily down |