Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key created in the DreamTo console, sent as Authorization: Bearer <API Key>.

Body

application/json

Request body of image generation.

model
enum<string>
required

Model name.

Allowed values:

  • seedream-5.5: Seedream 5.5.
Available options:
seedream-5.5
prompt
string

The prompt. Required for image generation: what to generate or change. Optional for layer decomposition: how to split the image; without it the model finds the main elements itself. Keep it under about 300 Chinese characters or 600 English words; longer prompts make the model drop details.

image

Input images: a string for one or an array for several; image links or Base64 (data:image/png;base64,<data>, lowercase format), each up to 30 MB. For image generation these are reference images, up to 10, and make the request image-to-image; for layer decomposition it is required and must be the single image to decompose (png / jpeg).

size
string

Output size. Image generation: the tier 1K / 1.5K / 2K (default 2K; describe the aspect ratio in the prompt) or pixels WIDTHxHEIGHT (921,600–4,624,220 total pixels, aspect ratio 1/16–16). Layer decomposition: only 1K / 1.5K / 2K or auto (default, follows the source image).

layer_decomposition
boolean

Enables layer decomposition; default false. With true the one image in image is split into a base image and independently editable layers (PNG with an alpha channel); if any layer fails, the whole request fails.

layer_decomposition_options
object

Layer decomposition options; only used when layer_decomposition is true.

output_format
enum<string>
default:png

File format of the output image. In layer decomposition it only sets the base image; layers are always png. Must be png when background is transparent.

Allowed values:

  • png: PNG (default); supports an alpha channel.
  • jpeg: JPEG: smaller files, no alpha channel.
Available options:
png,
jpeg
background
enum<string>
default:auto

Whether the output has an alpha channel; image generation only. Passing it with layer decomposition returns 400.

Allowed values:

  • auto: Decided by the model from the prompt and output_format (default); jpeg output has no alpha channel.
  • transparent: An RGBA image with an alpha channel; output_format must be png.
  • opaque: An RGB image without an alpha channel.
Available options:
auto,
transparent,
opaque
response_format
enum<string>
default:url

How images are returned.

Allowed values:

  • url: Return an image download link (default).
  • b64_json: Return Base64 image data.
Available options:
url,
b64_json
optimize_prompt_options
object

Prompt optimization options.

watermark
boolean

Whether to add a watermark; default true adds an "AI generated" watermark in the lower-right corner, false adds none.

safety_identifier
string

A unique identifier of the end user that helps the platform detect users who may violate the use policy. A stable English string unique to each user, up to 64 characters; hash the username, user ID or email.

Response

Images generated: one image for image generation, the base image and its layers for layer decomposition. The X-Request-Id header carries the request ID; include it when reporting issues.

Generation result.

model
enum<string>
required

Echoes model from the request.

Allowed values:

  • seedream-5.5: Seedream 5.5.
Available options:
seedream-5.5
created
integer<int64>
required

Creation time, Unix seconds.

data
object[]
required

Output images: one image for image generation; for layer decomposition the base image first, then the layers.

safety_identifier
string

Returned unchanged when the request set safety_identifier.

usage
object

Usage.