Doubao Seedream 4.5 Image Generation
Upgraded version of ByteDance's Doubao Seedream series, with comprehensive improvements in image quality, detail rendering, and style diversity, supporting 2K/4K resolution and multi-image mode.
Try it Online
Quick Start
python
from openai import OpenAI
client = OpenAI(
base_url="https://open.dieyuyun.com/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="doubao-seedream-4.5",
prompt="A futuristic space station orbiting Earth, cinematic lighting, ultra-high definition",
size="4096x4096",
n=1
)
print(response.data[0].url)Endpoint
| Item | Value |
|---|---|
| Method | POST |
| Path | /v1/images/generations |
| Base URL | https://open.dieyuyun.com |
| Protocol | OpenAI Images API |
Authentication
Bearer Token: Authorization: Bearer YOUR_API_KEY
Standard Request Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | — | Model identifier: doubao-seedream-4.5 |
| prompt | string | Yes | — | Image description text, supports Chinese and English, recommended under 300 Chinese characters |
| size | string | No | 4096x4096 | Image size (width x height in pixels) |
| n | integer | No | 1 | Number of images to generate (max 15). When >1, multi-image mode is enabled |
| response_format | string | No | url | Response format: url or b64_json |
Supported Sizes
Doubao Seedream 4.5 provides two resolution tiers: 2K and 4K (default). The following recommended pixel values are available:
2K Resolution
| Size | Aspect Ratio |
|---|---|
2048x2048 | 1:1 |
2304x1728 | 4:3 |
1728x2304 | 3:4 |
2848x1600 | 16:9 |
1600x2848 | 9:16 |
2496x1664 | 3:2 |
1664x2496 | 2:3 |
3136x1344 | 21:9 |
4K Resolution (Default)
| Size | Aspect Ratio |
|---|---|
4096x4096 | 1:1 |
4704x3520 | 4:3 |
3520x4704 | 3:4 |
5504x3040 | 16:9 |
3040x5504 | 9:16 |
4992x3328 | 3:2 |
3328x4992 | 2:3 |
6240x2656 | 21:9 |
Extended Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| image | string/array | No | — | Reference image URLs or Base64, up to 14 |
| watermark | boolean | No | false | Whether to add an AI-generated watermark |
| sequential_image_generation | string | No | disabled | auto for multi-image mode / disabled for single image |
Request Examples
bash
curl https://open.dieyuyun.com/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-4.5",
"prompt": "A futuristic space station orbiting Earth, cinematic lighting, ultra-high definition",
"size": "2048x2048",
"n": 1
}'python
from openai import OpenAI
client = OpenAI(
base_url="https://open.dieyuyun.com/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="doubao-seedream-4.5",
prompt="A futuristic space station orbiting Earth, cinematic lighting, ultra-high definition",
size="2048x2048",
n=1
)
print(response.data[0].url)javascript
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://open.dieyuyun.com/v1',
apiKey: 'YOUR_API_KEY',
})
const response = await client.images.generate({
model: 'doubao-seedream-4.5',
prompt: 'A futuristic space station orbiting Earth, cinematic lighting, ultra-high definition',
size: '2048x2048',
n: 1,
})
console.log(response.data[0].url)Response Format
Success Response
json
{
"created": 1717000000,
"model": "doubao-seedream-4.5",
"data": [
{
"url": "https://...",
"size": "2048x2048"
}
],
"usage": {
"generated_images": 1,
"output_tokens": 16384,
"total_tokens": 16384
}
}| Field | Type | Description |
|---|---|---|
| created | integer | Unix timestamp |
| model | string | Model identifier used |
| data | array | Array of generated results |
| data[].url | string | Image URL |
| data[].size | string | Actual generated image dimensions |
| usage | object | Usage statistics |
| usage.generated_images | integer | Number of images generated |
| usage.output_tokens | integer | Output token count |
| usage.total_tokens | integer | Total token count |
Error Response
See Error Codes for details.
Seedream 4.0 vs Seedream 4.5
| Feature | Seedream 4.0 | Seedream 4.5 |
|---|---|---|
| Image Quality | High | Higher |
| Minimum Resolution | 1K | 2K |
| Detail Rendering | Good | Excellent |
| Chinese Understanding | Excellent | Superior |
Best Practices
- Upgrade preferred: If image quality is critical, choose Doubao Seedream 4.5 over Seedream 4.0 for superior results.
- High-resolution output: Supports 2K/4K resolution, ideal for print materials, advertising assets, and other high-fidelity scenarios.
- Multi-image mode: Set
ngreater than 1 or enablesequential_image_generation: "auto"to generate stylistically consistent images, perfect for sequential illustrations and storyboards. - Detail descriptions: Doubao Seedream 4.5 has stronger detail rendering capabilities. Include more detailed descriptions for refined, intricate images.
- Chinese scenarios: Excels with Chinese-language prompts, making it ideal for Chinese-style creative work and domestic business needs.
- Reference images: Provide up to 14 reference images via the
imagefield to guide the model toward specific styles or content.
Rate Limits
See Rate Limits for details.
Related Documentation
- Doubao Seedream 4.0 - Use the Doubao Seedream 4.0 version
- Doubao Seedream 5.0 Lite - Use the Doubao Seedream 5.0 Lite version
- Model List & Pricing - Browse available models and pricing
- Playground - Test image generation interactively