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, quality first. The following parameters are not supported and will be rejected (returns 400) if passed:
  • n > 1 (batch image count)

Body

string
default:"doubao-seedream-5-0-pro"
required
Image generation model nameSupported models: doubao-seedream-5-0-proExample: "doubao-seedream-5-0-pro"
string
required
Text description for image generation
Tip: Keep it within 600 English words; overly long descriptions may cause loss of detail.
string
default:"1:1"
Image aspect ratioSupported aspect ratios:
  • 1:1 - Square (default)
  • 4:3 - Landscape 4:3
  • 3:4 - Portrait 3:4
  • 16:9 - Landscape widescreen
  • 9:16 - Portrait vertical
  • 3:2 - Landscape 3:2
  • 2:3 - Portrait 2:3
  • 21:9 - Ultra-wide
  • auto - The model automatically determines the aspect ratio based on the prompt / reference image
Note: Custom pixel values are not supported; values outside the list (such as 9:21) will be directly rejected with a 400.
string
default:"2K"
Image resolutionSupported resolutions:
  • 1K - Standard resolution
  • 2K - High definition (default)
Note: doubao-seedream-5-0-pro only supports 1K and 2K; passing 3K / 4K or other tiers will return a 400.
Resolution reference sizes:
When size: "auto", only the resolution tier (1K / 2K) is sent, and the final aspect ratio is automatically determined by the model.
array
Reference image URL list for single-image / multi-reference image-to-image generation, up to 10 imagesTwo formats are supported:1. Full image URL
  • Publicly accessible image URL (http:// or https://)
  • Example: https://example.com/image.jpg
2. Base64 encoded format
  • Must use the full Data URI format
  • Format: data:image/{format};base64,{base64data}
  • Example: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABg...
  • ⚠️ Note: Must include the data:image/jpeg;base64, prefix
Per-image limitations:
  • Image formats: jpeg, png, webp, bmp, tiff, gif, heic, heif
  • Aspect ratio (width/height) range: [1/16, 16]
  • Width and height (px) > 14
  • Size: not exceeding 30MB per image
  • Total pixels: not exceeding 6000×6000 px
Billing: Within a single request, the first reference image is free; each additional reference image is billed separately.
string
default:"jpeg"
Output image format
  • jpeg: JPEG format (default)
  • png: PNG format, suitable for transparent backgrounds and similar use cases
Compatibility: response_format is equivalent to output_format; other values are handled as jpeg.
boolean
default:"false"
Whether to add an “AI generated” watermark to the bottom-right corner of the generated image
  • true: Add watermark
  • false: No watermark (default)
⏱️ Slower generation: 1K about 90 seconds, 2K about 160 seconds (the Pro model prioritizes quality). After submitting, poll GET /v1/tasks/{task_id} every 5–10 seconds; we recommend setting the client polling timeout to 5 minutes. Failed tasks are automatically fully refunded.

Response

integer
Response status code
array
Response data array