Seedream 4.0 Text-to-Image
Supported models include seedream-4-0-250828. This document covers Text-to-Image and Sequential Image Generation scenarios. Public fields include model, prompt, size, seed, sequential_image_generation, sequential_image_generation_options, response_format, and watermark.
Authorizations
Pass in the request header as Authorization: Bearer <token>.
Body
The name of the image generation model. Supported models include seedream-4-0-250828.
seedream-4-0-250828 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.
"Vibrant close-up editorial portrait, model with sharp eyes, wearing a sculptural hat, rich color blocking."
Specifies the size information of the generated image. Different models support different size configuration methods.
seedream-4-0-250828: 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: [
1280x720(921600),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:
1600x600Total pixel value 1600x600=960000, which meets the [921600, 16777216] range requirement; aspect ratio 1600/600=8/3, which meets the [1/16, 16] range requirement, so the example value is valid. - Invalid example:
800x800Total pixel value 800x800=640000, which does not meet the minimum requirement of 921600; aspect ratio 800/800=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:
1K,2K,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:
- Available values:
"2K"
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.
url, b64_json Random seed. Supported by some Seedream models. Value range: [-1, 2147483647].
-1 <= x <= 2147483647Controls 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.
auto, disabled 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.
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.