Skip to content
Request
Response

Image Generation API ​

POST https://ark.cn-beijing.volces.com/api/v3/images/generations

This document describes the API for calling image generation models such as the Seedream series, including input/output parameters, value ranges, notes, and other information for reference when using the API.

Image Generation Capabilities ​

The following image generation models are available on the overseas platform:

  • Seedream 5.5 (new)
    • Native RGBA: Text-to-image can directly output images with an alpha channel; image-to-image supports up to 10 reference images without requiring alpha channels on inputs.
    • Layer Decomposition: Supports decomposing a single image into a base image (1) + multiple layers (up to 99 layers).
    • Interactive Editing: Supports specifying edit positions via coordinates, bounding boxes, arrows, and other methods to precisely edit images.
    • Rich-Text OCR: Recognizes and restores rich-text content in images.
    • Single Image Generation: Supports text-to-image, single-image-to-image, and multi-image-to-image.
  • Seedream 5.0 pro
    • Layer Decomposition: Supports decomposing a single image into a base image (1) + multiple layers (up to 16 layers).
    • Interactive Editing: Supports specifying edit positions via coordinates, bounding boxes, arrows, and other methods to precisely edit images.
    • Single Image Generation: Supports text-to-image, single-image-to-image, and multi-image-to-image.

Group image generation, web search, and streaming output are not supported by the above models.


Request Parameters ​

Request Body ​

model string (required) ​

The ID (Model ID) of the model you want to call. Available values: dola-seedream-5-5-261028, dola-seedream-5-0-pro-260628.

You can also call the model via Endpoint ID to obtain advanced capabilities such as rate limiting, billing type (pre-paid/post-paid), running status query, monitoring, and security.

prompt string (required) ​

The prompt used for image generation, supporting Chinese and English. (See Prompt Guide: Seedream Prompt Guide)

Prompt Language Support: All models support Chinese and English prompts; Seedream 5.5 / 5.0 pro additionally supports Russian, Arabic, Filipino, Thai, Turkish, Korean, Malay, Spanish, Portuguese, Indonesian, French, German, Vietnamese, and Japanese.

It is recommended not to exceed 300 Chinese characters or 600 English words. Excessive words may disperse information, causing the model to ignore details and focus only on key points, resulting in missing elements in the image.

Layer Decomposition Scenario (optional): When layer decomposition mode is enabled (layer_decomposition is true), prompt is optional and used to specify the layer decomposition intent. The model identifies and decomposes the specified elements based on the prompt intent. If no prompt is provided, the model will automatically identify all major elements in the image and decompose them into independent layers.

image string/array ​

The input image information, supporting URL or Base64 encoding. Seedream 5.5 / 5.0 pro supports single or multiple image inputs.

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

Image Generation Scenario (optional)

  • Image Format: jpeg, png, webp, bmp, tiff, gif, heic, heif
  • Aspect Ratio (width/height) Range: [1/16, 16]
  • Width/Height Length (px): > 14
  • Size: No more than 30MB
  • Total Pixels: No more than 6000×6000=36000000 px (Limit on the product of width and height pixels for a single image, not individual limits on width or height)
  • Reference Image Count: Up to 10 reference images.

Layer Decomposition Scenario (required, Seedream 5.5 / 5.0 pro only)

When layer decomposition mode is enabled (layer_decomposition is true), image is a required parameter and only a single image is supported (passing multiple images will trigger an error).

  • Image Format: png, jpeg
  • Aspect Ratio: [1/16, 16]
  • Size: No more than 30MB
  • Total Pixel (width×height) Range: [512×512 (262144), 6000×6000 (36 million)] (Limit on the product of width and height pixels for a single image, not individual limits on width or height)

layer_decomposition boolean default: false (new, Seedream 5.5 / 5.0 pro only) ​

Controls whether to enable layer decomposition. Layer decomposition automatically decomposes the subject, background, text, etc. of a single image into 1 base image and multiple independently editable layers (up to 99 for Seedream 5.5, up to 16 for Seedream 5.0 pro). Each layer is a PNG image with a transparent channel.

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

Notes

  • Only a single image to be decomposed is supported; passing multiple images will trigger an error.
  • If any layer fails to generate, the entire request fails; partial success is not supported.
  • If the number of decompositions requested by the prompt exceeds the limit, some layer information may be lost.
  • In the response data, each output layer's position and content information is returned, including layer order (z_index), bounding box (bounding_box), name (name), and description (description).

size string ​

  • Method 1 (Recommended) | Specify a resolution tier, and describe the aspect ratio, image shape, or image purpose in natural language in the prompt. The model ultimately determines the generated image size.
    • Default value: 2K
    • Available values: 1K、1.5K、2K
  • Method 2 | Specify the width and height pixel values of the generated image:
    • Total pixel range: [1280x720=921600, 2048x2048x1.1025=4624220]
    • Aspect ratio range: [1/16, 16]

Note

Pricing note: 1.5K is priced the same as 1K, with better image generation quality.

When using Method 2, both the total pixel range and the aspect ratio range must be satisfied. The total pixel is a limit on the product of the width and height of a single image, not a limit on the width or height individually.

  • Valid example:2048x1024
    Total pixel value 2048×1024=2097152, meets the [921600, 4624220] range; aspect ratio 2048/1024=2, meets the [1/16, 16] range, so this value is valid.
  • Invalid example:512x512
    Total pixel value 512×512=262144, below the minimum 921600, so this value is invalid.

Recommended width × height pixel values

ResolutionAspect ratioWidth × Height (px)
1K1:11024x1024
4:31152x864
3:4864x1152
16:91424x800
9:16800x1424
3:21248x832
2:3832x1248
21:91568x672
1.5K1:11536x1536
4:31792x1344
3:41344x1792
16:92048x1152
9:161152x2048
3:21872x1248
2:31248x1872
21:92352x1008
2K1:12048x2048
4:32368x1776
3:41776x2368
16:92816x1584
9:161584x2816
3:22496x1664
2:31664x2496
21:93136x1344

Layer Decomposition Scenario (Seedream 5.5 / 5.0 pro only): Only the resolution tier method is supported. size defaults to auto; available values are 1K, 1.5K, 2K, auto (output based on the input image's size and aspect ratio). Output rules: the base image resolution matches the size-specified resolution and keeps the original image's aspect ratio; each layer's resolution is close to the size-specified resolution and keeps its aspect ratio in the original image. Pricing note: 1.5K is priced the same as 1K.

output_format string ​

Specifies the file format of the generated image. Available values:

  • png
  • jpeg

Notes

  • Seedream 5.5 defaults to png; Seedream 5.0 pro defaults to jpeg.
  • In the layer decomposition scenario, output_format only controls the output format of the base image; layers are always output in png.

background string (new, Seedream 5.5 / 5.0 pro only) ​

Controls whether to generate images with an alpha channel. Available values:

  • transparent: Transparent background mode; outputs images with a transparent background.
  • opaque: Opaque background mode; generates regular images with a solid background.

Usage Limits

  • Seedream 5.5: Both text-to-image and image-to-image support transparent backgrounds; image-to-image supports up to 10 reference images without requiring alpha channels.
  • Seedream 5.0 pro: Only the image-to-image scenario is supported, and only 1 image with an alpha channel can be input.
  • In transparent background mode, the output image defaults to png. Configuring output_format as jpeg will trigger an error.
  • If a file format that does not support alpha channels (such as jpeg) is input, an error will be triggered.

response_format string default: url ​

Specifies the return format of the generated image. The following two return methods are supported:

  • url: Returns an image download link; the link is valid for 24 hours after image generation, so download the image promptly.
  • b64_json: Returns image data in JSON format as a Base64-encoded string.

watermark Boolean default: true ​

Whether to add a watermark to the generated image.

  • false: No watermark.
  • true: Adds an "AI generated" watermark in the bottom-right corner of the image.

optimize_prompt_options object ​

Configuration for the prompt optimization feature.

Properties

  • optimize_prompt_options.mode string default: standard Sets the mode used by the prompt optimization feature.
    • standard: Standard mode; higher quality generated content with longer processing time.
    • fast: Fast mode; shorter processing time with average quality. Only Seedream 5.0 pro supports this mode.

Response Parameters ​

Non-Streaming Response Parameters ​

model string ​

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

created integer ​

The Unix timestamp (seconds) when this request was created.

data array ​

Information about the output images. url, b64_json, size, and output_format are common return fields.

Notes

  • In the layer decomposition scenario (Seedream 5.5 / 5.0 pro only), each layer's stacking order (z_index), name (name), description (description), and bounding box coordinates (bounding_box) are additionally returned.

Image Information object Information about successfully generated images.

Properties

  • data.url string The image URL, returned when response_format is specified as url. This link expires 24 hours after generation; save the image promptly.
  • data.b64_json string The Base64 information of the image, returned when response_format is specified as b64_json.
  • data.size string The image width and height pixel values, in the format <width>x<height>, e.g. 2048x2048.
  • data.output_format string The output image format information (png or jpeg). In the layer decomposition scenario, output_format only controls the output format of the base image; layers are always png.

Layer Decomposition Scenario Fields (returned only by Seedream 5.5 / 5.0 pro)

  • data.z_index integer: The stacking order index of the layer. The base image is fixed at 0; layers start from 1 and increase, with larger values indicating higher layers.
  • data.name string: The name/label of the decomposed layer element. Automatically generated by the model based on the subject features of the layer, used to identify the subject content of the layer.
  • data.description string: A detailed description of the decomposed layer element. A semantic description generated by the model, providing richer layer features than name (such as color, state, material, etc.).
  • data.bounding_box object: The bounding box information of the output layer's region in the output base image coordinate system. Only layers return this field; the base image covers the entire canvas and does not return this field.
    • data.bounding_box.absolute array: The absolute pixel coordinates of the output layer's bounding box in the output base image coordinate system, in the format [left, top, right, bottom], with the top-left corner of the output base image at (0, 0). left/top are the distances from the layer's left/top boundary to the output base image's left/top boundary; right/bottom are the distances from the layer's right/bottom boundary to the output base image's left/top boundary.
    • data.bounding_box.normalized array: Normalized coordinates, converted from absolute coordinates to a discrete integer range of [0, 1000] based on the output base image's width and height, in the format [left, top, right, bottom]. 0 represents the leftmost/topmost of the base image, and 1000 represents the rightmost/bottommost.

usage object ​

Usage information for this request.

Properties

  • usage.generated_images integer The number of images successfully generated by the model, excluding failed images. Billing is based only on the number of successfully generated images.
  • usage.input_images integer The number of images input to the model.
  • usage.output_tokens integer The number of tokens spent on the images generated by the model. Calculation logic: calculate sum(image length × image width)/256, then round.
  • usage.total_tokens integer The total number of tokens consumed by this request. Input tokens are not currently calculated, so this value is the same as output_tokens.

error object ​

The corresponding error information if an error occurs in this request.

Properties

  • error.code string See Error Codes.
  • error.message string Error message