Doubao Seedream
Doubao Seedream supports text-to-image, single-image reference, and multi-image reference generation; Lite and 4.5 also support sequential image sets. The platform uses the async task protocol: create a task to receive a taskId, then query the task or use a callback to retrieve results.
Model
| Model Name | Output | Mode |
|---|---|---|
doubao-seedream-5.0-pro | Image URLs | Text-to-image, single/multi-image reference; always one output image |
doubao-seedream-5.0-lite | Image URLs | Text-to-image, image references, sequential generation, web search |
doubao-seedream-4.5 | Image URLs | Text-to-image, image references, sequential generation |
Pricing
Pro settles from the upstream's actual output pixels and input-image usage. Lite and 4.5 are priced by successfully generated images.
| Model | Credits |
|---|---|
doubao-seedream-5.0-pro | 15 credits at ≤2,360,000 pixels; 30 credits above 2,360,000 pixels; first reference image free, then 1 credit each |
doubao-seedream-5.0-lite | 15 credits/image |
doubao-seedream-4.5 | 15 credits/image |
Create Task
curl -X POST https://api.aivideoapi.ai/v1/images/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5.0-pro",
"callback_url": "https://your-server.com/webhook",
"input": {
"prompt": "An orange cat reading beside a window, watercolor illustration, soft morning light",
"size": "1K",
"watermark": false
}
}'
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | doubao-seedream-5.0-pro, doubao-seedream-5.0-lite, or doubao-seedream-4.5 |
input | object | Yes | Generation parameters, see below |
callback_url | string | No | Optional callback URL for completion/failure notifications |
Input Parameters
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Image generation prompt. Chinese and English are supported. |
image_urls | string[] | No | Public HTTP(S) reference image URLs. Base64 input is not supported. Pro accepts up to 10; other models accept up to 14. |
size | string | No | Output size. Pro defaults to 1024x1024; other models default to 2048x2048. See Size & Resolution. |
sequential_image_generation | string | No | Sequential generation mode, defaults to disabled. One of: disabled, auto. |
sequential_image_generation_options | object | No | Sequential generation options. Only used when sequential_image_generation=auto. |
tools | array | No | Only supported by doubao-seedream-5.0-lite. Use [{ "type": "web_search" }]. |
stream | boolean | No | Lite/4.5 accept this field. Pro only accepts the compatibility value false and does not stream. |
output_format | string | No | Supported by Pro and Lite. One of: jpeg, png. Defaults to jpeg. |
watermark | boolean | No | Whether to add a watermark, defaults to true. |
optimize_prompt_options | object | No | Pro supports standard and fast; other models support standard. |
Pro does not support sequential generation, web search, or streaming. It accepts and ignores the compatibility values sequential_image_generation: "disabled" and stream: false, but rejects attempts to enable those features. The platform always requests URL output, so response_format and Base64 output are not accepted. doubao-seedream-4.5 does not support 3K, tools, or output_format.
Reference Image Limits
| Limit | Requirement |
|---|---|
| Image formats | jpeg, png, webp, bmp, tiff, gif, heic, heif |
| File size | Up to 30 MB per image |
| Total pixels | Up to 6000×6000 per image |
| Width and height | Both must be greater than 14 px |
| Aspect ratio | [1/16, 16] |
| Multi-image reference | Up to 10 images for Pro; up to 14 for Lite/4.5 |
When sequential generation is enabled, reference image count plus generated image count must not exceed 15.
Size & Resolution
size can be a resolution tier or a pixel size such as 2048x2048. Pro exact sizes must contain 921,600–4,624,220 total pixels; Lite/4.5 use the existing 2560x1440–4096x4096 range. All models require an aspect ratio between [1/16, 16].
| Model | Supported Tiers | Default |
|---|---|---|
doubao-seedream-5.0-pro | 1K, 2K | 1024x1024 |
doubao-seedream-5.0-lite | 2K, 3K, 4K | 2048x2048 |
doubao-seedream-4.5 | 2K, 4K | 2048x2048 |
Pro tier reference sizes (the model's returned size is authoritative):
| Resolution | Aspect Ratio | Pixel Size |
|---|---|---|
1K | 1:1 | 1024x1024 |
1K | 4:3 | 1152x864 |
1K | 3:4 | 864x1152 |
1K | 16:9 | 1424x800 |
1K | 9:16 | 800x1424 |
1K | 3:2 | 1248x832 |
1K | 2:3 | 832x1248 |
1K | 21:9 | 1568x672 |
2K | 1:1 | 2048x2048 |
2K | 4:3 | 2368x1776 |
2K | 3:4 | 1776x2368 |
2K | 16:9 | 2816x1584 |
2K | 9:16 | 1584x2816 |
2K | 3:2 | 2496x1664 |
2K | 2:3 | 1664x2496 |
2K | 21:9 | 3136x1344 |
Common Lite/4.5 sizes:
| Resolution | Aspect Ratio | Pixel Size |
|---|---|---|
2K | 1:1 | 2048x2048 |
2K | 4:3 | 2304x1728 |
2K | 3:4 | 1728x2304 |
2K | 16:9 | 2848x1600 |
2K | 9:16 | 1600x2848 |
2K | 3:2 | 2496x1664 |
2K | 2:3 | 1664x2496 |
2K | 21:9 | 3136x1344 |
3K | 1:1 | 3072x3072 |
3K | 4:3 | 3456x2592 |
3K | 3:4 | 2592x3456 |
3K | 16:9 | 4096x2304 |
3K | 9:16 | 2304x4096 |
3K | 3:2 | 3744x2496 |
3K | 2:3 | 2496x3744 |
3K | 21:9 | 4704x2016 |
4K | 1:1 | 4096x4096 |
4K | 4:3 | 4704x3520 |
4K | 3:4 | 3520x4704 |
4K | 16:9 | 5504x3040 |
4K | 9:16 | 3040x5504 |
4K | 3:2 | 4992x3328 |
4K | 2:3 | 3328x4992 |
4K | 21:9 | 6240x2656 |
For Pro, combine 1K/2K with an aspect-ratio or use-case description in the prompt and the model chooses the final dimensions. Billing always uses the dimensions returned by the upstream. 3K is only supported by doubao-seedream-5.0-lite.
Sequential Generation (Lite/4.5)
sequential_image_generation controls whether to generate an image set:
| Value | Description |
|---|---|
disabled | Disable sequential generation and generate one image. |
auto | Let the model decide whether to return an image set and how many images to generate. |
sequential_image_generation_options supports:
| Field | Type | Required | Description |
|---|---|---|---|
max_images | integer | No | Maximum generated images, 1-15. |
Example: Text-to-Image
curl -X POST https://api.aivideoapi.ai/v1/images/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5.0-pro",
"callback_url": "https://your-server.com/webhook",
"input": {
"prompt": "A cinematic night city poster with neon reflections on a rainy street",
"size": "1K",
"watermark": false
}
}'
Example: Multi-Image Reference
curl -X POST https://api.aivideoapi.ai/v1/images/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5.0-pro",
"callback_url": "https://your-server.com/webhook",
"input": {
"prompt": "Use the subject and colors from the two references to create a clean premium product poster",
"image_urls": [
"https://example.com/reference-1.png",
"https://example.com/reference-2.png"
],
"size": "2048x2048",
"optimize_prompt_options": { "mode": "standard" }
}
}'
Example: Sequential Generation With Web Search
curl -X POST https://api.aivideoapi.ai/v1/images/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5.0-lite",
"callback_url": "https://your-server.com/webhook",
"input": {
"prompt": "Generate a set of ecommerce detail-page images for summer camping gear, including a tent, lantern, folding chair, and outdoor table",
"size": "3K",
"sequential_image_generation": "auto",
"sequential_image_generation_options": {
"max_images": 6
},
"tools": [
{ "type": "web_search" }
],
"output_format": "png"
}
}'
Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "397ce9f2-c04e-4244-ac33-3af19a7cc297"
}
}
Query Task
curl https://api.aivideoapi.ai/v1/tasks/{taskId} \
-H "Authorization: Bearer sk-your-api-key"
Status flow: pending -> processing -> completed or failed.
Completed
{
"id": "397ce9f2-c04e-4244-ac33-3af19a7cc297",
"status": "completed",
"model": "doubao-seedream-5.0-pro",
"credits_consumed": 30,
"created_at": 1775383908,
"completed_at": 1775383925,
"output": {
"urls": [
"https://file.aivideoapi.ai/images/2026/07/04/abc123.png"
],
"metadata": {
"model": "doubao-seedream-5.0-pro",
"generated_images": 1,
"requested_image_count": 1,
"output_format": "png",
"image_sizes": ["2048x2048"],
"partial_errors": [],
"usage": {
"input_images": 0,
"generated_images": 1,
"output_tokens": 16384,
"total_tokens": 16384
}
}
}
}
Partial Sequential Failure (Lite/4.5)
If at least one image succeeds, the task is marked completed. Successful images are returned normally and failed images are recorded in metadata.partial_errors. Billing is based only on successful images.
{
"id": "397ce9f2-c04e-4244-ac33-3af19a7cc297",
"status": "completed",
"model": "doubao-seedream-5.0-lite",
"output": {
"urls": [
"https://file.aivideoapi.ai/images/2026/07/04/abc123.png"
],
"metadata": {
"generated_images": 1,
"requested_image_count": 2,
"partial_errors": [
{
"index": 1,
"code": "image_generation_failed",
"message": "Some images failed to generate. Adjust parameters and retry."
}
]
}
}
}
Failed
{
"id": "57c8772c-f834-46f3-9b7d-81f92e104050",
"status": "failed",
"model": "doubao-seedream-5.0-lite",
"created_at": 1775383908,
"error": {
"code": "upstream_error",
"message": "Image generation failed"
}
}
Failed tasks are automatically refunded.
Callback Notifications
Pass callback_url when creating the task. When the task completes or fails, we send a POST request whose payload matches the GET /v1/tasks/{taskId} response.
Error Codes
When a request fails, the API returns a JSON error response:
{
"error": {
"code": "insufficient_credits",
"message": "Your credit balance is too low. Please top up.",
"type": "billing_error"
}
}
Error Reference
| HTTP Status | Code | Type | Description |
|---|---|---|---|
| 400 | invalid_request | invalid_request_error | Missing or invalid parameters |
| 401 | invalid_api_key | authentication_error | API key is invalid, disabled, or deleted |
| 402 | insufficient_credits | billing_error | Credit balance too low, please top up |
| 403 | ip_not_allowed | permission_error | Request IP not in the key's allowlist |
| 404 | model_not_found | invalid_request_error | Model does not exist or is inactive |
| 404 | task_not_found | invalid_request_error | Task ID does not exist |
| 429 | rate_limit_exceeded | rate_limit_error | Too many requests, please slow down |
| 429 | spend_limit_exceeded | billing_error | Key spend limit reached (hourly/daily/total) |
| 500 | internal_error | api_error | Unexpected server error |
| 503 | upstream_error | upstream_error | Upstream AI provider returned an error |
Common Scenarios
invalid_request (400)
Returned when required fields are missing or invalid.
{
"error": {
"code": "invalid_request",
"message": "'model' is required.",
"type": "invalid_request_error"
}
}
insufficient_credits (402)
Your balance is too low. Check your balance with GET /v1/credits and top up in Dashboard > Billing.
invalid_api_key (401)
Possible causes:
- The key does not start with
sk- - The key has been disabled or deleted
- The user account has been banned
upstream_error (503)
The upstream AI provider returned an error. This may happen when:
- The input contains sensitive or prohibited content
- The provider is temporarily unavailable
- The request parameters are not supported by the provider
Credits are automatically refunded when a task fails due to upstream errors.