Skip to main content
POST
Seedream image generation
This endpoint is consistent with the official Seedream protocol. It extends the OpenAI Images protocol with Seedream-specific parameters, supporting reference image input, sequential image generation, and layer decomposition.

Features

  • Compatible with the base parameters of the OpenAI Images protocol (prompt, size, output_format, and more)
  • Supports image-to-image generation by passing a reference image via image (URL or Base64)
  • Supports sequential image generation via sequential_image_generation, producing a set of related images from your input, with a configurable maximum count
  • Supports layer decomposition via layer_decomposition, returning decomposed layers with bounding box information
  • Supports prompt optimization via optimize_prompt_options (standard / fast modes)
  • Supports both resolution tiers such as 1K and 2K and explicit sizes such as 1024x1024
  • Supports watermark control via watermark

Authentication

Include the Authorization header in the format Bearer YOUR_API_KEY.

Supported image models

Models in the seedream series.

Quick example

A successful generation returns the image data:

Next steps

Headers

Authorization
string
required

API Key token (Bearer sk-xxx)

Content-Type
string

Body

application/json
model
string
required

Model name

prompt
string
required

Text prompt

image
object

Reference image, URL or Base64 string (Seedream extension parameter, used for image-to-image)

layer_decomposition
boolean

Whether to decompose layers: true to decompose, false not to (default)

size
string

Image size, e.g. "1024x1024", "1K", "2K"

optimize_prompt_options
object

Prompt optimization options

output_format
string

Output image format, e.g. "png", "jpeg", "webp"

background
string

Background of the generated image: "transparent" / "opaque" / "auto"; defaults to "auto"

output_compression
integer

Output compression level

response_format
string

Response format, "url" or "b64_json"

sequential_image_generation
string

Controls whether to disable sequential image generation (sequential images: a set of related images generated from your input). "auto"/"disabled"; defaults to "disabled"

sequential_image_generation_options
object

Sequential image generation configuration. Only effective when sequential_image_generation is auto.

stream
boolean

Whether to use streaming (SSE) responses

watermark
boolean

Whether to add a watermark

Response

200 - application/json
created
integer<int64>

Image generation timestamp (Unix seconds)

model
string

Model used

data
object[]

Generated image data list

usage
object

Token and image usage statistics