Image Series
Image Generation
Image generation API supports text-to-image, image-to-image, image editing and more
POST
Introduction
The image generation API supports text-to-image, image-to-image, image editing, and more. Through a unified API interface, you can call multiple mainstream image generation models including Gemini, Doubao Seedream, GPT Image, and Qwen.Authentication
Bearer Token, e.g.,Bearer sk-xxxxxxxxxx
Request Parameters
Model identifier, supported models include:
- Qwen series:
qwen-image-plus,qwen-image-edit-plus, etc. - GPT Image series:
gpt-image-1, etc. - Doubao Seedream series:
doubao-seedream-3-0-t2i-250415,doubao-seedream-4-0-250828,doubao-seedream-4-5-251128,doubao-seededit-3-0-i2i-250628, etc. - Gemini series:
gemini-2.5-flash-image(Nano Banana),gemini-3-pro-image-preview(Nano Banana Pro), etc.
Text-to-image prompt
Response format:
b64_json or urlNote: Different models have different support for response_format:- Qwen series: Supports both
b64_jsonandurl - GPT Image series: Only supports
b64_jsonformat - Doubao Seedream series: Usually returns URL links
- Gemini series: Only supports
b64_jsonformat
Multi-turn content for image-to-image or context conversations
Basic Examples
- Gemini
- Doubao Seedream
- GPT Image
- Qwen
- Text-to-Image
- Image-to-Image
Model-Specific Parameters
Doubao Seedream
Image size, depends on model version:
- doubao-seedream-4.0/4.5:
2048x2048,2304x1728, etc. (2K/4K) - doubao-seedream-3.0:
1024x1024,1152x864, etc.
Whether to add watermark
Random seed for controlling generation randomness. Range:
0 to 2147483647Guidance coefficient. Recommended range:
1.0-10.0, default: 2.5Sequential image generation switch:
"disabled" (default) or "auto"GPT Image
Image size:
1024x1024, 1024x1536, 1536x1024. Default: 1024x1024Image quality:
"high", "medium", "low"Number of images to generate. Range:
1-10Input fidelity for image-to-image:
"auto", "high", "medium", "low"Gemini
Aspect ratio:
1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9Image size:
1K (default), 2K, 4KOutput format:
image/png (default), image/jpegSupported Models
Gemini Series
| Model Name | Core Capabilities |
|---|---|
gemini-2.5-flash-image (Nano Banana) | Text-to-image, image-to-image, multi-image fusion |
gemini-3-pro-image-preview (Nano Banana Pro) | Higher quality output, text-to-image, image-to-image |
Doubao Seedream Series
| Model Name | Core Capabilities |
|---|---|
doubao-seedream-3-0-t2i-250415 | Text-to-image, seed control, guidance coefficient |
doubao-seedream-4-0-250828 | Text-to-image, image-to-image, multi-image fusion, 2K/4K |
doubao-seedream-4-5-251128 | Text-to-image, image-to-image, prompt optimization |
doubao-seededit-3-0-i2i-250628 | Image editing, style transfer |
GPT Image Series
| Model Name | Core Capabilities |
|---|---|
gpt-image-1 | Text-to-image, image-to-image, multi-image fusion |
gpt-image-1-mini | Lower cost, faster speed |
Qwen Series
| Model Name | Core Capabilities |
|---|---|
qwen-image-plus | Text-to-image, text rendering, prompt extension |
qwen-image-edit-plus | Image editing, style transfer |
FAQ
What image formats are supported?
What image formats are supported?
Different models support different formats:
- Qwen: JPEG, JPG, PNG, BMP, TIFF, WEBP, max 10MB
- GPT Image: JPEG, PNG, GIF, WEBP, max 10MB
- Doubao Seedream 4.x: JPEG, PNG, WEBP, BMP, TIFF, GIF, max 10MB
- Gemini: PNG, JPEG, JPG, WEBP, max 7MB
How long are generated images valid?
How long are generated images valid?
Image URLs are valid for approximately 24 hours. It is recommended to download and save immediately after receiving the response.
Can I generate multiple images at once?
Can I generate multiple images at once?
- GPT Image: Use
nparameter (1-10 images) - Doubao Seedream 4.x: Use sequential image generation (1-4 images)
- Qwen: 1 image per request, make multiple concurrent requests for more