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 Image Generation model name.

Supported models:

  • dola-seedream-5-0-pro-260628 (Seedream 5.0 pro, newest recommended, supports interactive editing)
  • seedream-5-0-260128 (Seedream 5.0, supports sequential images, web search, streaming output)
  • seedream-4-5-251128 (Seedream 4.5, supports 4K and strong text rendering)
  • seedream-4-0-250828 (Seedream 4.0, maintenance status, most economical 4K option)
Available options:
dola-seedream-5-0-pro-260628,
seedream-5-0-260128,
seedream-4-5-251128,
seedream-4-0-250828
Example:

"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. Supports single image or multiple image input.

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

Notes:

  • Requirements for passing a single image:
    • Image formats: jpeg, png, webp, bmp, tiff, gif, heic, heif
    • Aspect ratio (width/height) range: [1/16, 16]
    • Width and height (px) > 14
    • File size: no more than 30MB
    • Total pixels: no more than 6000×6000 = 36000000 px (this is a limit on the pixel product of width and height for a single image, not a limit on individual width or height values)
  • Seedream 5.0 pro supports up to 10 reference images; Seedream 5.0/4.5/4.0 supports up to 14 reference images.
size
string
default:2048x2048

Specifies the size information of the generated image. Different models support different size methods. Please expand the corresponding model descriptions below for details.

dola-seedream-5-0-pro-260628 (Seedream 5.0 pro) Supports the following two methods for specifying the generated image size. They cannot be used together.

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

    • Default: 2K
    • Available values: 1K, 2K
  • Method 2: Specify the pixel width and height of the generated image (widthxheight).

    • Total pixel range: [1280x720 (921600), 2048x2048×1.1025 (4624220)]
    • 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 is a limit on the product of width and height of a single image, not a limit on individual width or height values.

  • Valid example: 2048x1024 Total pixel value 2048x1024=2097152, within the [921600, 4624220] range; aspect ratio 2048/1024=2, within the [1/16, 16] range. Therefore, this example value is valid.
  • Invalid example: 512x512 Total pixel value 512x512=262144, does not meet the minimum requirement of 921600. Therefore, this example value is invalid.

When using Method 1, the actual pixel width and height mapped by the model are as follows (not limited to these standard values, common ones listed):

seedream-5-0-260128 (Seedream 5.0) Supports the following two methods for specifying the generated image size. They cannot be used together.

  • Method 1: Specify the resolution of the generated image, and describe the aspect ratio, image shape, or image purpose in the prompt using natural language. The model will determine the final image size.

    • Available values: 2K, 3K, 4K
  • Method 2: Specify the pixel width and height of the generated image.

    • Default: 2048x2048
    • Total pixel range: [2560x1440 (3686400), 4096x4096 (16777216)]
    • 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 is a limit on the product of width and height of a single image, not a limit on individual width or height values.

  • Valid example: 3750x1250 Total pixel value 3750x1250=4687500, within the [3686400, 16777216] range; aspect ratio 3750/1250=3, within the [1/16, 16] range. Therefore, this example value is valid.
  • Invalid example: 1500x1500 Total pixel value 1500x1500=2250000, does not meet the minimum requirement of 3686400; aspect ratio 1500/1500=1, although within the [1/16, 16] range, it does not satisfy both constraints simultaneously. Therefore, this example value is invalid.

When using Method 1, the actual pixel width and height mapped by the model are as follows:

seedream-4-5-251128 (Seedream 4.5) Supports the following two methods for specifying the generated image size. They cannot be used together.

  • Method 1: Specify the resolution of the generated image, and describe the aspect ratio, image shape, or image purpose in the prompt using natural language. The model will determine the final image size.

    • Available values: 2K, 4K
  • Method 2: Specify the pixel width and height of the generated image.

    • Default: 2048x2048
    • Total pixel range: [2560x1440 (3686400), 4096x4096 (16777216)]
    • 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 is a limit on the product of width and height of a single image, not a limit on individual width or height values.

  • Valid example: 3750x1250 Total pixel value 3750x1250=4687500, within the [3686400, 16777216] range; aspect ratio 3750/1250=3, within the [1/16, 16] range. Therefore, this example value is valid.
  • Invalid example: 1500x1500 Total pixel value 1500x1500=2250000, does not meet the minimum requirement of 3686400; aspect ratio 1500/1500=1, although within the [1/16, 16] range, it does not satisfy both constraints simultaneously. Therefore, this example value is invalid.

When using Method 1, the actual pixel width and height mapped by the model are as follows:

seedream-4-0-250828 (Seedream 4.0) Supports the following two methods for specifying the generated image size. They cannot be used together.

  • Method 1: Specify the resolution of the generated image, and describe the aspect ratio, image shape, or image purpose in the prompt using natural language. The model will determine the final image size.

    • Available values: 1K, 2K, 4K
  • Method 2: Specify the pixel width and height of the generated image.

    • Default: 2048x2048
    • Total pixel range: [1280x720 (921600), 4096x4096 (16777216)]
    • 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 is a limit on the product of width and height of a single image, not a limit on individual width or height values.

  • Valid example: 1600x600 Total pixel value 1600x600=960000, within the [921600, 16777216] range; aspect ratio 1600/600=8/3, within the [1/16, 16] range. Therefore, this example value is valid.
  • Invalid example: 800x800 Total pixel value 800x800=640000, does not meet the minimum requirement of 921600; aspect ratio 800/800=1, although within the [1/16, 16] range, it does not satisfy both constraints simultaneously. Therefore, this example value is invalid.

When using Method 1, the actual pixel width and height mapped by the model are as follows:

Example:

"2K"

sequential_image_generation
enum<string>
default:disabled

Controls whether to enable sequential image generation.

  • auto: Auto-judgment mode. The model autonomously determines whether to return sequential images and how many images to include based on the user's prompt.
  • disabled: Disable sequential image generation. The model will only generate a single image.

Only Seedream 5.0/4.5/4.0 support this parameter. Seedream 5.0 pro does not support sequential image generation.

Available options:
auto,
disabled
sequential_image_generation_options
object

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

Only Seedream 5.0/4.5/4.0 support this parameter.

tools
object[]

Configures the tools to be called by the model.

Only seedream-5-0-260128 (Seedream 5.0) supports this parameter. Seedream 5.0 pro does not support web search.

Example:
stream
boolean
default:false

Controls whether to enable streaming output mode.

  • false: Non-streaming output mode. Wait for all images to be generated before returning all information at once.
  • true: Streaming output mode. Returns the result of each image in real time. This mode is effective for both single image generation and sequential image generation scenarios.

Only Seedream 5.0/4.5/4.0 support streaming response. Seedream 5.0 pro does not support streaming output. See the "Streaming Response" documentation for details.

guidance_scale
number

Controls the consistency between the model output and the prompt, i.e., the freedom of the generated image. Also known as text weight. The larger the value, the lower the model freedom and the stronger the correlation with the user's input prompt.

  • Value range: [1, 10]

Seedream 5.0/4.5/4.0 do not support this parameter.

Required range: 1 <= x <= 10
Example:

5

output_format
enum<string>
default:jpeg

Specifies the file format of the generated image.

  • Supported values: png, jpeg
  • Only seedream-5-0-260128 (Seedream 5.0) supports this parameter.
  • For Seedream 5.0 pro/4.5/4.0 models, the generated image format defaults to jpeg and cannot be customized.
Available options:
jpeg,
png
response_format
enum<string>
default:url

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

  • url: Returns the image download link. The link is valid for 24 hours after image generation. Please download the image in time.
  • b64_json: Returns image data as a Base64-encoded string in JSON format.
Available options:
url,
b64_json
watermark
boolean
default:true

Whether to add a watermark to the generated image.

  • false: Do not add a watermark.
  • true: Add an "AI Generated" watermark identifier at the bottom right corner of the image.
optimize_prompt_options
object

Configuration for prompt optimization.

Only Seedream 5.0/4.5/4.0 support this parameter.

Response

Success, returns the image generation result.

model
string

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

created
integer<int64>

The Unix timestamp (seconds) of the creation time for this request.

data
object[]

Output image information.

Note: In the sequential image generation scenario with Seedream 5.0/4.5/4.0 models, when an image fails during sequential image generation:

  • If the failure reason is content moderation rejection: It will continue to request the next image generation task, meaning it does not affect the generation flow of other images within the same request.
  • If the failure reason is an internal service error (500): It will not continue to request the next image generation task.
tools
object[]

Configured model tools for this request.

usage
object

Usage information for this request.

error
object

Error information for this request, if an error occurred.