Image Generation
Doubao Seedream image generation API
Doubao Seedream image generation uses /v1/images/generations. It supports text-to-image generation, reference-image generation, multi-image blending, and image-set generation.
curl -X POST "https://api.routescope.ai/v1/images/generations" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o-mini", "prompt": "The ability to describe this API gateway in plain Chinese." }'{
"created": 1,
"data": {}
}Authorization
BearerAuth
Model relay interface recognition. Request heading: Autoration: Bearer .
In: header
Request Body
application/json
Picture model name.
Inverted words. Range: 1 to 200000 characters, with a specific upper limit based on the model official interface.
Returns the number of pictures. Creates the number of candidates. Scope: 1 to 10; specific ceilings are based on the model official interface.
1 <= value <= 10Generates dimensions, such as FD_PROTEC_0.
Generates a quality slot.
Generates style.
Picture returns format, e. g. FD_PROTEC_0 or FD_PROTEC_1__.
End-user identification.
Response Body
application/json
Model Selection
| Model ID | Typical Use |
|---|---|
doubao-seedream-3-0-t2i-250415 | Chinese/English text-to-image generation, general illustration, product images, poster drafts, and concept visuals. |
doubao-seedream-4-0-250828 | High-quality text-to-image generation, reference-image generation, multi-image blending, and image-set generation. |
doubao-seedream-4-5-251128 | High-quality reference-image generation, multi-image blending, and high-consistency image generation. |
doubao-seedream-5-0-260128 | High-quality reference-image generation, multi-image blending, and complex visual generation. |
doubao-seedream-5-0-lite-260128 | Lightweight generation, low latency, and batch sketch iteration. |
Common Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | None | Seedream model ID. |
prompt | string | Yes | None | Generation prompt. Clearly describe subject, scene, composition, text, style, and expected output. |
image | string or string[] | No | None | Reference image URL or Base64. Recommended maximum is 14 images, with reference and generated images totaling no more than 15. Seedream 3.0 does not support this. |
size | string | No | See differences | Output size. |
response_format | string | No | url | Response format, supporting url or b64_json. |
watermark | boolean | No | true | Whether to add an AI-generated watermark. |
sequential_image_generation | string | No | disabled | Image-set mode. Supports disabled or auto. Seedream 3.0 does not support this. |
sequential_image_generation_options.max_images | integer | No | 1 | Maximum image-set output count, from 1 to 15. |
stream | boolean | No | false | Whether to enable streaming output. |
user | string | No | None | End-user identifier. |
Model-Specific Parameters
| Field | Applicable Models | Default / Range | Description |
|---|---|---|---|
n | doubao-seedream-3-0-t2i-250415 | Default 1; gateway common range 1 to 10; actual upstream limits apply | Listed only for Seedream 3.0. |
guidance_scale | doubao-seedream-3-0-t2i-250415 | Default 2.5, range 1 to 10 | Supported by Seedream 3.0. Do not send it to 4.0 or later. |
size | doubao-seedream-3-0-t2i-250415 | Default 1024x1024 | Format such as 1024x1024. |
size | Seedream 4.0 / 4.5 / 5.0 / 5.0 Lite | Default 2K | Supports 1K, 2K, 4K, or <width>x<height>. Recommended aspect ratio is 1:16 to 16:1. |
stream | Seedream 3.0 / 4.0 / 4.5 / 5.0 | Default false | Seedream 5.0 Lite does not list stream. |
Example Code
curl https://api.routescope.ai/v1/images/generations \
-H "Authorization: Bearer $ROUTESCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5-0-260128",
"prompt": "Generate three consistent SaaS homepage hero illustrations, blue-purple gradient, glassmorphism",
"size": "2K",
"sequential_image_generation": "auto",
"sequential_image_generation_options": { "max_images": 3 },
"response_format": "url"
}'import requests
response = requests.post(
"https://api.routescope.ai/v1/images/generations",
headers={"Authorization": "Bearer YOUR_ROUTESCOPE_API_KEY"},
json={
"model": "doubao-seedream-5-0-260128",
"prompt": "Generate three consistent SaaS homepage hero illustrations, blue-purple gradient, glassmorphism",
"size": "2K",
"sequential_image_generation": "auto",
"sequential_image_generation_options": {"max_images": 3},
"response_format": "url",
},
)
print(response.json())Response Example
{
"created": 1777432320,
"data": [
{
"url": "https://api.routescope.ai/assets/images/seedream-5-0.png",
"b64_json": null,
"revised_prompt": "Three consistent SaaS homepage hero illustrations, blue-purple gradient, glassmorphism."
}
]
}Notes
- Billing follows the model and channel ratios configured in the Routescope backend.
guidance_scaleis not recommended for Seedream 4.0 or later.- Larger
sizevalues and more batch outputs increase latency and cost.
How is this guide?
Last updated on