Skip to main content
POST

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Body

application/json
model
enum<string>
required

Image generation model name. Supported models include dola-seedream-5-0-pro-260628 (Seedream 5.0 pro, supports interactive editing and layer decomposition, does not support sequential image generation).

Available options:
dola-seedream-5-0-pro-260628
prompt
string
required

Prompt for image generation or intended layer decomposition, supports Chinese and English. It is recommended not to exceed 300 Chinese characters or 600 English words. Too many words may disperse information, causing the model to ignore details and focus only on key points, resulting in missing elements in the image.

  • Image generation scenario (Required): Describes the content to generate.
  • Layer decomposition scenario (Optional): Specifies the intended layer decomposition. If omitted, the model automatically decomposes all major elements into separate layers.
Example:

"Dynamic close-up editorial portrait with sharp gaze, sculptural hat, rich color blocking."

image
required

Input image information, supports URL or Base64 encoding.

  • Image URL: Ensure the image URL is accessible.
  • Base64 encoding: Follow the format data:image/<image_format>;base64,<Base64_encoded>. Note that <image_format> must be lowercase, e.g., data:image/png;base64,<base64_image>.

Image generation scenario (Optional):

  • Seedream 5.0 pro supports up to 10 reference images.
  • Single-image input requirements:
    • Format: jpeg, png, webp, bmp, tiff, gif, heic, or heif
    • Aspect ratio (width / height): [1/16, 16]
    • Width and height (px): > 14
    • Size: Up to 30 MB
    • Total pixels: [196, 6000×6000 (36,000,000)]. Limit on the product of width and height.

Layer decomposition scenario (Required):

  • When layer decomposition is enabled (layer_decomposition is true), image is required and supports only a single image. Passing multiple images causes an error.
  • Single-image input requirements:
    • Format: png or jpeg
    • Aspect ratio: [1/16, 16]
    • Size: Up to 30 MB
    • Total pixels: [512×512 (262,144), 6000×6000 (36,000,000)].
size
string
default:auto

Specifies the dimensions of the generated image. Configuration methods and options vary by scenario:

Image generation scenario Two methods are available, but they cannot be used at the same time:

  • Method 1 (Recommended): Specify the resolution level of the generated image, and describe its aspect ratio, shape, or purpose in the prompt using natural language. The model determines the final image size.

    • Default: auto
    • Available values: 1K, 1.5K, 2K
    • Pricing note: 1.5K has the same price as 1K while providing better image generation quality.
  • Method 2: Specify the width and height of the generated image in pixels (widthxheight):

    • Total pixels range: [1280x720 (921,600), 2048x2048x1.1025 (4,624,220)]
    • Aspect ratio range: [1/16, 16]
    • Note: When using Method 2, both the total pixel range and aspect ratio range must be satisfied. The total pixel limit applies to the product of width and height.
      • Valid example: 2048x1024 (Total pixels 2048x1024=2,097,152; aspect ratio 2)
      • Invalid example: 512x512 (Total pixels 512x512=262,144, below 921,600 minimum)

Resolution to Pixel Reference Values (Method 1):

Layer decomposition scenario Only resolution levels are supported:

  • Base image: Output resolution is consistent with the resolution specified by size, keeping the original aspect ratio.
  • Layers: Each output layer resolution is close to the resolution specified by size, keeping the aspect ratio of its region.
  • Default: auto
  • Supported values: 1K, 1.5K, 2K, auto
  • auto adaptation rules:
    • If original dimensions of base image and each layer are between [1280x720 (921,600), 2048x2048x1.1025 (4,624,220)], output at original dimensions.
    • If smaller than 1K, output at 1K.
    • If larger than 2K, output at 2K.
Example:

"auto"

background
enum<string>
default:opaque

Controls whether to generate an image with an alpha channel. Valid values:

  • opaque: Opaque background mode (default). The output image has a standard, opaque background.
  • transparent: Transparent background mode. The output image has a transparent background.

Usage restrictions:

  • Supported only for image-to-image generation with exactly one input image that has an alpha channel.
  • In transparent background mode, the output image format defaults to png. If output_format is set to jpeg, the request returns an error.
  • If the input image uses a format that does not support an alpha channel (such as jpeg), the request returns an error.

Supported model: dola-seedream-5-0-pro-260628 (Seedream 5.0 pro).

Available options:
opaque,
transparent
layer_decomposition
boolean
default:false

Controls whether to enable layer decomposition. Layer decomposition automatically decomposes subjects, backgrounds, text, and other content in a single image into one base image and up to 16 independently editable layers. Each layer is a PNG image with an alpha channel.

  • true: Layer decomposition mode. The model decomposes the input image into one base image and multiple layers.
  • false: Image generation mode (default). Layer decomposition is not performed.

Usage notes:

  • Only one image to be decomposed is supported. Passing multiple images causes an error.
  • If any layer fails to generate, the entire request fails. Partial success is not supported.
  • If the prompt requests more layers than the upper limit (16), some layer information may be lost.
  • The data response object returns the position and content information of each output layer, including layer order (z_index), bounding box information (bounding_box), name (name), and description (description).

Supported model: dola-seedream-5-0-pro-260628 (Seedream 5.0 pro).

response_format
enum<string>
default:url

Specifies how generated images are returned. Supported options:

  • url: Returns a download URL for the image; valid for 24 hours after generation.
  • b64_json: Returns image data as a Base64-encoded string in JSON.
Available options:
url,
b64_json
watermark
boolean
default:true

Controls whether to add a watermark to the generated image.

  • false: Does not add a watermark.
  • true: Adds an "AI-generated" watermark in the lower-right corner of the image.

Response

Success, returns the image generation result.

model
string

Model ID (model name-version) used for this request.

created
integer<int64>

Unix timestamp (seconds) of creation.

data
object[]

List of generated images. In layer decomposition, includes base image and decomposed layers.

usage
object

Usage information for this request.