The Seedream image generation model can generate high-quality images based on user input text or reference images, supporting multi-image grouping and streaming output.
The Seedream series models can be widely applied in e-commerce, gaming, film and television, animation, and design industries, profoundly transforming traditional content production methods and significantly improving the efficiency of visual content production.
Details | Caution and prerequisites |
|---|---|
Costs | Before calling an operator, you need to understand the model invocation costs associated with using the operator. For details, see Large model invocation billing. |
Authentication (API Key) | Before calling an operator, you need to generate an API Key for operator invocation. It is recommended to configure the API Key as an environment variable to ensure safer operator calls. For details, see Obtain and configure API Key. |
BaseURL | Before calling an operator, you need to determine the BaseURL for operator invocation based on the region where your current LAS service is deployed. This is used to configure the path parameter values for operator calls. |
POST https://operator.las.ap-southeast-1.volces.com/api/v1/online/images/generations
Invoke the Seedream image generation model to perform text-to-image, image-to-image, or image set generation (non-streaming).
Parameter name | Type | Required | Example | Description |
|---|---|---|---|---|
model | string | Yes | doubao-seedream-4-5-251128 | Model ID used in this request. Supported values: doubao-seedream-5-0-lite-260128, doubao-seedream-5-0-260128, doubao-seedream-4-5-251128, doubao-seedream-4-0-250828, doubao-seedream-3-0-t2i-250415. |
prompt | string | Yes | An orange cat wearing sunglasses, sitting by the sea at sunset, ultra-realistic. | Prompt used to generate the image. Supports both Chinese and English. Recommended length: no more than 300 Chinese characters or 600 English words. |
tools | array of tools_item | No | Supported only by doubao-seedream-5.0-lite ( doubao-seedream-5-0-lite-260128 / doubao-seedream-5-0-260128). Used to configure tools for the model.
| |
image | string / array | No | Input image information. Supports URL or Base64 encoding.
| |
size | string | No | 2048x2048 | Specifies the output image size.
|
seed | integer | No | -1 | Supported only by doubao-seedream-3.0-t2i. Random seed. Valid range: [-1, 2147483647]. |
sequential_image_generation | string | No | disabled | Supported only by doubao-seedream-5.0-lite/4.5/4.0. auto means the model decides whether to return an image set; disabled means only one image is generated. |
sequential_image_generation_options | sequential_image_generation_options | No | Supported only by doubao-seedream-5.0-lite/4.5/4.0. Effective only when sequential_image_generation=auto. | |
guidance_scale | float | No | 2.5 | Not supported by doubao-seedream-5.0-lite/4.5/4.0; default value for doubao-seedream-3.0-t2i is 2.5. Valid range: [1, 10]. |
response_format | string | No | url | Specifies the return format of the generated image. Supported values: url: returns an image download link. The link is valid for 24 hours after generation, so please download the image in time.b64_json: returns the image data as a Base64-encoded JSON string. |
output_format | string | No | jpeg | Supported only by doubao-seedream-5.0-lite ( doubao-seedream-5-0-lite-260128 / doubao-seedream-5-0-260128). Specifies the output file format of the generated image. Supported values: png, jpeg; default is jpeg.Note: images generated by doubao-seedream-4.5/4.0 and doubao-seedream-3.0-t2i/seededit-3.0-i2i are always in jpeg format and do not support custom configuration. |
watermark | boolean | No | true | Whether to add an “AI-generated” watermark. false means no watermark; true means watermark added. |
optimize_prompt_options | optimize_prompt_options | No | Supported only by doubao-seedream-5.0-lite/4.5 (currently standard mode only) and doubao-seedream-4.0. |
Parameter name | Type | Example | Description |
|---|---|---|---|
model | string | doubao-seedream-4-5-251128 | Model ID used in this request ( model-name-version). |
created | integer | 1589478378 | Unix timestamp (seconds) when the request was created. |
data | list of data_item | List of generated image outputs. | |
tools | list of tools_item | Tool configuration used in this request (returned only when tools is configured). | |
usage | usage | Usage information for this request. | |
error | error_info | Request-level error information. |
curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/images/generations" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "model": "doubao-seedream-4-5-251128", "prompt": "", "size": "2048x2048", "response_format": "url", "watermark": true }'
{ "model": "doubao-seedream-4-5-251128", "created": 1764041608, "data": [ { "url": "<image_url>", "size": "2048x2048" } ], "usage": { "generated_images": 1, "output_tokens": 16384, "total_tokens": 16384 } }
POST https://operator.las.ap-southeast-1.volces.com/api/v1/online/images/generations
Invoke the Seedream image generation model to perform text-to-image, image-to-image, or image set generation (streaming SSE).
Parameter name | Type | Required | Example | Description |
|---|---|---|---|---|
model | string | Yes | doubao-seedream-4-5-251128 | Model ID used in this request. Supported values: doubao-seedream-5-0-lite-260128, doubao-seedream-5-0-260128, doubao-seedream-4-5-251128, doubao-seedream-4-0-250828, doubao-seedream-3-0-t2i-250415. |
prompt | string | Yes | An orange cat wearing sunglasses, sitting by the sea at sunset, ultra-realistic. | Prompt used to generate the image. Supports both Chinese and English. Recommended length: no more than 300 Chinese characters or 600 English words. |
tools | array of tools_item | No | Supported only by doubao-seedream-5.0-lite ( doubao-seedream-5-0-lite-260128 / doubao-seedream-5-0-260128). Used to configure tools for the model.
| |
image | string / array | No | Input image information. Supports URL or Base64 encoding.
| |
size | string | No | 2048x2048 | Specifies the output image size.
|
seed | integer | No | -1 | Supported only by doubao-seedream-3.0-t2i. Random seed. Valid range: [-1, 2147483647]. |
sequential_image_generation | string | No | disabled | Supported only by doubao-seedream-5.0-lite/4.5/4.0. auto means the model decides whether to return an image set; disabled means only one image is generated. |
sequential_image_generation_options | sequential_image_generation_options | No | Supported only by doubao-seedream-5.0-lite/4.5/4.0. Effective only when sequential_image_generation=auto. | |
stream | boolean | Yes | true | Supported only by doubao-seedream-5.0-lite/4.5/4.0. Must be set to true to enable streaming output (SSE). |
guidance_scale | float | No | 2.5 | Not supported by doubao-seedream-5.0-lite/4.5/4.0; default value for doubao-seedream-3.0-t2i is 2.5. Valid range: [1, 10]. |
response_format | string | No | url | Specifies the return format of the generated image. Supported values: url: returns an image download link. The link is valid for 24 hours after generation, so please download the image in time.b64_json: returns the image data as a Base64-encoded JSON string. |
output_format | string | No | jpeg | Supported only by doubao-seedream-5.0-lite ( doubao-seedream-5-0-lite-260128 / doubao-seedream-5-0-260128). Specifies the output file format of the generated image. Supported values: png, jpeg; default is jpeg.Note: images generated by doubao-seedream-4.5/4.0 and doubao-seedream-3.0-t2i/seededit-3.0-i2i are always in jpeg format and do not support custom configuration. |
watermark | boolean | No | true | Whether to add an “AI-generated” watermark. false means no watermark; true means watermark added. |
optimize_prompt_options | optimize_prompt_options | No | Supported only by doubao-seedream-5.0-lite/4.5 (currently standard mode only) and doubao-seedream-4.0. |
Parameter name | Type | Example | Description |
|---|---|---|---|
type | string | image_generation.partial_succeeded | Event type. Possible values: image_generation.partial_succeeded, image_generation.partial_failed, image_generation.completed, error. |
model | string | doubao-seedream-4-0-250828 | Model ID used in this request, in the format <model-name>-<version>. |
created | integer | 1589478378 | Unix timestamp (seconds) when the request was created. |
image_index | integer | 0 | Index of the image corresponding to this event within the request. It starts from 0 and increases automatically regardless of whether image generation succeeds. |
url | string | https://... | Download URL of the image corresponding to this event. Returned when response_format=url. |
b64_json | string | <base64> | Base64-encoded image data corresponding to this event. Returned when response_format=b64_json. |
size | string | 2048x2048 | Width and height of the image in pixels, formatted as <width>x<height>, such as 2048x2048. |
tools | list of tools_item | Tool configuration used in this request (returned only when tools is configured). Returned only when the event type is image_generation.completed. | |
usage | usage | Usage information for this request. Returned only when the event type is image_generation.completed. |
curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/images/generations" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "model": "doubao-seedream-4-5-251128", "prompt": "", "size": "2048x2048", "response_format": "url", "stream": true }'
{ "type": "image_generation.completed", "model": "doubao-seedream-4-5-251128", "created": 1589478378, "usage": { "generated_images": 1, "output_tokens": 16384, "total_tokens": 16384 } }
HttpCode | Error code | Error message | Description |
|---|---|---|---|
400 | Model.InvalidName | The model name is invalid. | The model name is invalid. |
401 | Authorization.Missing | Missing Authorization. | Missing Authorization. |
401 | ApiKey.Invalid | The api key is invalid. | The API is invalid. |