Skip to main content
POST

Authorizations

string
required
All API endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:
Single-image model: doubao-seedream-5-0-pro generates only 1 image per request. The following are rejected (HTTP 400, no task, no charge):
  • n > 1
  • sequential_image_generation: "auto" (group generation not supported)
  • more than 10 items in image_urls
The following are silently ignored: tools (web search), stream, optimize_prompt_options.

Body

string
default:"doubao-seedream-5-0-pro"
required
Image generation model name
  • doubao-seedream-5-0-pro (recommended)
  • Also accepted: doubao-seedream-5.0-pro
string
required
Text description for image generation
Tip: Keep it within 600 English words; overly long descriptions may lose detail.
string
default:"1K"
Resolution tier (lowercase accepted)
  • 1K (default)
  • 1.5K (same price as 1K, better quality — prefer 1.5K unless you have a reason not to)
  • 2K
Unsupported tiers such as 3K / 4K return 400.
When size is an exact pixel value (e.g. 2048x1024), this field is ignored and dimensions come only from size.
string
default:"auto"
Aspect ratio, auto, or exact pixels. Do not mix the two styles:

Style ①: tier + aspect ratio

Used with resolution. Supported ratios:
  • 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9
  • Also accepts 16x9-style x separators
  • auto (default): only the resolution tier is applied; final aspect ratio is chosen from the prompt / references
Ratios outside the list (e.g. 9:21) return 400 — no silent fallback to 1:1.Tier × ratio → output pixels:

Style ②: exact pixels

When size is widthxheight, pixels are used as-is and resolution does not apply. Accepts 2048X1024 / 2048×1024.
Limits apply to the product of width and height, not each edge alone. Example: 512×512 is too small (400); 2048×1024 is valid.
array
Reference image URL list for single / multi-reference image-to-image, up to 10Two formats:1. Public URL
  • http:// or https://
  • Example: https://example.com/image.jpg
2. Base64 (Data URI)
  • Format: data:image/<format>;base64,<data><format> must be lowercase
  • Example: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABg...
Per-image limits:
  • Formats: jpeg / png / webp / bmp / tiff / gif / heic / heif
  • Aspect ratio (w/h): [1/16, 16]
  • Each edge > 14 px
  • Size ≤ 30 MB
  • Total pixels ≤ 6000×6000 (36,000,000)
Billing: First reference image free; each additional image has a fixed surcharge.
string
default:"jpeg"
Output image format
  • jpeg (default)
  • png
Compatibility: response_format is equivalent to output_format; other values are treated as jpeg.
boolean
default:"false"
Whether to add an “AI generated” watermark at the bottom-right
  • true: add watermark
  • false: no watermark (default)

Request Examples

Text-to-image (tier + ratio)

Text-to-image (exact pixels)

Multi-reference

Billing Notes

Output is priced by actual total pixels (~2.61M = 2,601,124):
  • 1.5K costs the same as 1K ($0.045).
  • With exact-pixel size, billing uses actual output area; resolution is ignored (e.g. size: "2048x2048" → $0.09).
  • First reference image is free; each additional reference has a surcharge.
  • Failed tasks are fully refunded.

Common Errors

⏱️ Slower generation: ~90s for 1K, ~160s for 2K (quality first). Poll Get Task Status every 5–10 seconds; client timeout 5 minutes. Generated image links are valid for 72 hours; please save them promptly.

Response

integer
Response status code
array
Response data array