Skip to main content
POST

Authorizations

Authorization
string
header
required

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

Body

application/json
model
enum<string>
required

The name of the image generation model. Supported models include seedream-5-0-260128.

Available options:
seedream-5-0-260128
prompt
string
required

The prompt for generating images. Supports both Chinese and English. It is recommended not to exceed 300 Chinese characters or 600 English words. If the prompt is too long, the information may be diluted, causing the model to ignore details and focus only on key points, resulting in missing elements in the image.

Example:

"Vibrant close-up editorial portrait, model with sharp eyes, wearing a sculptural hat, rich color blocking."

image

The input image information. Supports URL or Base64 encoding. seedream 5.0/4.5/4.0 supports single image or multi-image input.

  • Image URL: Please ensure the image URL is accessible.
  • Base64 encoding: Please follow the format data:image/<format>;base64,<base64_encoded>. Note: <format> must be lowercase, e.g., data:image/png;base64,<base64_image>.

Description:

  • Single image requirements:
    • Image format: jpeg, png (seedream 5.0/4.5/4.0 additionally supports webp, bmp, tiff, gif, heic, heif formats)
    • Aspect ratio (width/height) range: [1/16, 16] (applicable model: seedream 5.0/4.5/4.0)
    • Width and height (px) > 14
    • Size: no more than 30MB
    • Total pixels: no more than 6000×6000 = 36000000 px (restriction on the product of width and height pixels for a single image, not a restriction on individual width or height values)
  • seedream 5.0/4.5/4.0 supports up to 14 reference images.
size
string
default:2K

Specifies the size information of the generated image. Different models support different size configuration methods.

seedream-5-0-260128: Specifies the size information of the generated image. Supports the following two methods, which cannot be mixed.

  • Method 1 | Specify the pixel width and height of the generated image:

    • Default value: 2048x2048

    • Total pixel value range: [2560x1440 (3686400), 4096x4096 (16777216)]

    • Aspect ratio range: [1/16, 16]

    Note: When using Method 1, both the total pixel value range and the aspect ratio range must be satisfied simultaneously. The total pixel value is the product of the width and height pixels of a single image, not a restriction on individual width or height values.

    • Valid example: 3750x1250 Total pixel value 3750x1250=4687500, which meets the [3686400, 16777216] range requirement; aspect ratio 3750/1250=3, which meets the [1/16, 16] range requirement, so the example value is valid.
    • Invalid example: 1500x1500 Total pixel value 1500x1500=2250000, which does not meet the minimum requirement of 3686400; aspect ratio 1500/1500=1, although it meets the [1/16, 16] range requirement, the two restrictions are not satisfied simultaneously, so the example value is invalid.
  • Method 2 | Specify the resolution of the generated image, and describe the image aspect ratio, shape, or purpose in natural language within the prompt, allowing the model to determine the size of the generated image.

    • Available values: 2K, 3K, 4K

    Note: When using Method 2 and describing a specific aspect ratio in the prompt, the reference pixel dimensions actually mapped by the model are:

Example:

"2048x2048"

response_format
enum<string>
default:url

Specifies the return format of the generated image. Supports the following two return methods:

  • url: Returns an image download link; the link is valid for 24 hours after image generation, please download the image promptly.
  • b64_json: Returns image data in JSON format as a Base64-encoded string.
Available options:
url,
b64_json
seed
integer
default:-1

Random seed. Supported by some Seedream models. Value range: [-1, 2147483647].

Required range: -1 <= x <= 2147483647
sequential_image_generation
enum<string>
default:disabled

Controls whether to disable the sequential image generation feature.

  • auto: Automatic determination mode. The model will autonomously decide whether to return a set of images and the number of images based on the user's prompt.
  • disabled: Disable the sequential image generation feature. The model will only generate one image.

Only seedream 5.0/4.5/4.0 support this parameter.

Available options:
auto,
disabled
sequential_image_generation_options
object

Configuration for the sequential image generation feature. Only takes effect when sequential_image_generation is set to auto.

Only seedream 5.0/4.5/4.0 support this parameter.

watermark
boolean
default:true

Whether to add a watermark to the generated image.

  • false: No watermark added.
  • true: Adds an "AIGeneration" watermark in the bottom right corner of the image.

Response

Success, returns the image generation result.

created
integer<int64>

Unix timestamp (seconds) of the creation time.

data
object[]

List of generated images. May contain multiple images in sequential image generation scenarios.