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 で RGBA PNG を生成します. レイヤーの max_images はベースを含め 2-100, 既定値は 30.
Key Parameters
- model | string | required | doubao-seedream-5-5 | - | Use doubao-seedream-5-5 as the exact model id.
- prompt | string | optional | - | - | 通常の生成と編集では必須です. layer_decomposition=true では省略可能です.
- size | string | optional | - | 1K | 1.5K | 2K | WIDTHxHEIGHT | 通常生成はモデルの既定解像度, レイヤー分解は auto. 区分は比率を固定せず, 指定寸法の総画素数は 921600-4624220.
- image_urls | string[] | optional | - | 0-10 | image_urls に JPEG, PNG, WEBP の参照画像を 1-10 枚指定します. ローカルファイルは先にアップロードし, 返された URL を使用します.
- n | integer | optional | 1 | 1 | 1 を指定するか省略します. 通常生成は 1 枚で, レイヤー数の指定ではありません.
- layer_decomposition | boolean | optional | false | - | 通常生成では無効にします. 参照画像は 1 枚のみで metadata.background は省略します. ベースと透過 PNG レイヤーを返し, 総数の上限は layer_decomposition_options.max_images で指定します.
- layer_decomposition_options.max_images | integer | optional | 30 | 2-100 | ベースを含むレイヤー分解の総出力数の上限です. 指定数の生成を保証するものではなく, 実際の数はモデルが決定します.
- layer_decomposition_options.text_recognition | boolean | optional | - | - | レイヤー分解時の文字認識を制御します. プロバイダーが返した場合のみ, 結果に text_recognition 情報を含みます.
- metadata.output_format | string | optional | - | png | jpeg | 省略時は上流の既定形式, 透過背景は png. 分解時はベースのみを指定し, 他のレイヤーは常に PNG.
- metadata.background | string | optional | - | auto | opaque | transparent | 通常の生成と編集のみ. layer_decomposition=true では opaque も含め省略必須. transparent は RGBA PNG で 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.










