Skip to content

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.

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

ItemValue
MethodPOST
Path/v1/images/generations
Base URLhttps://open.dieyuyun.com
ProtocolOpenAI Images API

Authentication

Bearer Token: Authorization: Bearer YOUR_API_KEY

Standard Request Fields

FieldTypeRequiredDefaultDescription
modelstringYesModel identifier: doubao-seedream-4.5
promptstringYesImage description text, supports Chinese and English, recommended under 300 Chinese characters
sizestringNo4096x4096Image size (width x height in pixels)
nintegerNo1Number of images to generate (max 15). When >1, multi-image mode is enabled
response_formatstringNourlResponse 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

SizeAspect Ratio
2048x20481:1
2304x17284:3
1728x23043:4
2848x160016:9
1600x28489:16
2496x16643:2
1664x24962:3
3136x134421:9

4K Resolution (Default)

SizeAspect Ratio
4096x40961:1
4704x35204:3
3520x47043:4
5504x304016:9
3040x55049:16
4992x33283:2
3328x49922:3
6240x265621:9

Extended Parameters

FieldTypeRequiredDefaultDescription
imagestring/arrayNoReference image URLs or Base64, up to 14
watermarkbooleanNofalseWhether to add an AI-generated watermark
sequential_image_generationstringNodisabledauto 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
  }
}
FieldTypeDescription
createdintegerUnix timestamp
modelstringModel identifier used
dataarrayArray of generated results
data[].urlstringImage URL
data[].sizestringActual generated image dimensions
usageobjectUsage statistics
usage.generated_imagesintegerNumber of images generated
usage.output_tokensintegerOutput token count
usage.total_tokensintegerTotal token count

Error Response

See Error Codes for details.

Seedream 4.0 vs Seedream 4.5

FeatureSeedream 4.0Seedream 4.5
Image QualityHighHigher
Minimum Resolution1K2K
Detail RenderingGoodExcellent
Chinese UnderstandingExcellentSuperior

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 n greater than 1 or enable sequential_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 image field to guide the model toward specific styles or content.

Rate Limits

See Rate Limits for details.