Quick Answer
- Call the async image task API with model=doubao-seedream-5-5.
- size accepts 1K/1.5K/2K tiers or explicit WxH pixels within 921,600-4,624,220 total pixels.
- metadata.background=transparent returns RGBA PNG. For layers, max_images limits total outputs including the base: 2-100, default 30.
Key Parameters
- model | string | required | doubao-seedream-5-5 | - | Use doubao-seedream-5-5 as the exact model id.
- prompt | string | optional | - | - | Required for generation and editing; optional when layer_decomposition=true.
- size | string | optional | - | 1K | 1.5K | 2K | WIDTHxHEIGHT | Uses the model default for generation and auto for layers. Tiers do not fix the aspect ratio; explicit dimensions must total 921,600-4,624,220 pixels.
- image_urls | string[] | optional | - | 0-10 | Supply 1-10 JPEG, PNG, or WEBP reference images through image_urls. Upload local files first, then use the returned URLs.
- n | integer | optional | 1 | 1 | Use 1 or omit it. Ordinary generation returns one image; this does not set the layer count.
- layer_decomposition | boolean | optional | false | - | Keep off for ordinary generation. Requires exactly one reference and no metadata.background. Returns a base and transparent PNG layers; layer_decomposition_options.max_images limits total outputs.
- layer_decomposition_options.max_images | integer | optional | 30 | 2-100 | Total output limit for layer decomposition, including the base. It is not a guaranteed count; the model determines how many outputs are needed.
- layer_decomposition_options.text_recognition | boolean | optional | - | - | Controls text recognition during layer decomposition. Task results include text_recognition metadata only when the provider returns it.
- metadata.output_format | string | optional | - | png | jpeg | When omitted, uses the upstream default; transparency selects png. For layers, controls only the base image; other layers are always PNG.
- metadata.background | string | optional | - | auto | opaque | transparent | Generation and editing only. Omit when layer_decomposition=true, even opaque. transparent returns RGBA PNG and cannot use jpeg.
- metadata.watermark | boolean | optional | - | - | Set false to disable the visible watermark.
- metadata.response_format | string | optional | url | url | b64_json | Result delivery form; url is recommended.
Common Errors
- 400 invalid_input: trigger=size pixels out of range, more than 10 reference images, or layer_decomposition without exactly one input image.; fix=Validate size, image_urls count, and layer_decomposition input constraints against docs.; retry=Retry only after correcting the payload.
- 429 rate_limit_exceeded: trigger=Request rate, concurrency, or quota hits rate limiting.; fix=Apply exponential backoff, then review request pacing and quota usage.; retry=Use 1s/2s/4s backoff with jitter.










