Beta ByteDance Seedream Images API
POSThttps://api.yxai-tech.top/seedream/images

ByteDance Seedream image generation API allows you to input text to generate images.

Agent integrations

Related Products

SeeDream - AI 聚合|元宪智能
SeeDream image generation platform, directly interfaces with this API, high-speed and stable availability.

Request Headers

acceptstring
Specify the format of the response returned by the server. If not specified, the default format is `application/json`.
Please select
authorizationstring
Bearer token

Request Body

modelstringRequired parameter
Full model IDs. 5.5, 5.0 Pro, and 5.0 Flash support single-image generation, editing, transparent backgrounds, and layer separation. 5.0 Lite supports single images, image groups, streaming output, and web search.
promptstring
Image generation or editing prompt. This can be omitted in layer separation mode; if omitted, the main elements will be automatically identified and separated.
imagestring | array
Reference images support a single URL/Base64 string or an array of strings. Models 5.5, 5.0 Pro, and 5.0 Flash support a maximum of 10 images in standard mode and exactly 1 image for layer separation. Models 5.0 Lite/4.x support a maximum of 14 images. The maximum size per image is 30 MB.
sizestring
5.5, 5.0 Pro, and 5.0 Flash support 1K/1.5K/2K or valid pixel values in standard mode, and auto/1K/1.5K/2K in layer separation mode. 5.0 Lite supports 2K/3K/4K or valid pixel values.
layer_decompositionboolean
Supports 5.5, 5.0 Pro, and 5.0 Flash. Input one PNG/JPEG and return one background image, along with up to 99 transparent PNG layers for 5.5 or up to 16 for 5.0 Pro/Flash. The prompt can be omitted.
Please select
backgroundstring
5.5 Supports auto, transparent, and opaque, and can output transparent images using text-to-image or image-to-image generation. The transparent mode in 5.0 Pro/Flash requires a reference image with an alpha channel. Transparent output uses PNG.
Please select
layer_decomposition_optionsobject
5.5 Layer decomposition options, only valid when layer_decomposition=true.
max_imagesinteger
Maximum number of output images, including the background image. The range is 2 to 100, with a default of 30.
text_recognitionboolean
Return text and styles for recognizable, regular text layers. Disabled by default.
Please select
sequential_image_generationstring
The default value is `disabled`. Setting it to `auto` allows the model to generate a set of stylistically coherent related images (multi-image consistency, sharing characters, styles, and details across frames). Only `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0` are supported.
Please select
sequential_image_generation_optionsobject
Adjustable parameters for batch image generation. Effective only when `sequential_image_generation=auto`. Only supports `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0`.
max_imagesinteger
The maximum number of images that can be generated in this request is in the range of [1, 15]. Note: `(the number of reference images in 'image') + (the number of images generated this time)` must not exceed 15.
streamboolean
Whether to return all images in a streaming manner, default is `false`. Only supports `doubao-seedream-5.0-lite`, `doubao-seedream-4.5`, and `doubao-seedream-4.0`.
Please select
response_formatstring
Response format: Defaults to URL, but also supports b64_json. The layer-splitting results for 5.5 and 5.0 Flash use URLs.
Please select
watermarkboolean
Whether to add AI-generated watermark, default is `true`.
Please select
output_formatstring
The supported output formats are JPEG and PNG. Version 5.5 defaults to PNG, while 5.0 Pro, 5.0 Flash, and 5.0 Lite default to JPEG. Split layers are always in PNG format.
Please select
toolsarray
List of tools that can be called by the model. Currently, only `web_search` is supported. Applicable only to `doubao-seedream-5.0-lite`.
optimize_prompt_optionsobject
Prompt Optimization Configuration. 5.0 Pro and 4.0 support standard/fast. 5.5, 5.0 Flash, 5.0 Lite, and 4.5 support standard.
modestring
Prompt optimization mode. `standard` has higher quality but is slower; `fast` is faster but has relatively lower quality.
Please select
callback_urlstring
The callback URL after image generation is completed, which must be accessible from the public network. Once specified, the interface will return immediately, and the generation result will be asynchronously pushed to this callback address when ready.
asyncboolean
Is it processed in asynchronous mode? When set to `true`, the interface immediately returns `task_id`, without the need to provide `callback_url`, and then the result can be obtained by polling `/seedream/tasks`; if `callback_url` is also provided, the result will be pushed to that callback address.
Please select

Response

Integration guide

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.

ByteDance Seedream Image Generation
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.