curl --request POST \
--url https://api.dreamto.ai/api/v3/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-5.5",
"prompt": "A vibrant close-up editorial portrait, piercing gaze, sculptural hat, rich color blocking, vertical magazine cover",
"size": "2K",
"output_format": "png"
}
'{
"model": "seedream-5.5",
"created": 1794844508,
"data": [
{
"url": "https://files.dreamto.ai/images/seedream_7f3c2a9e.png",
"size": "1760x2368",
"output_format": "png",
"background": "opaque"
}
],
"usage": {
"input_images": 0,
"generated_images": 1,
"output_tokens": 16280,
"total_tokens": 16280
}
}Create image
One endpoint, two uses: image generation creates one image from a prompt and optional reference images (image, up to 10) and can output RGBA images with background: transparent; layer decomposition (layer_decomposition: true) splits the one image in image into a base image and transparent layers, optionally with rich-text OCR for text layers. The request is synchronous and blocks until the images are ready; streaming and image sets are not supported.
curl --request POST \
--url https://api.dreamto.ai/api/v3/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-5.5",
"prompt": "A vibrant close-up editorial portrait, piercing gaze, sculptural hat, rich color blocking, vertical magazine cover",
"size": "2K",
"output_format": "png"
}
'{
"model": "seedream-5.5",
"created": 1794844508,
"data": [
{
"url": "https://files.dreamto.ai/images/seedream_7f3c2a9e.png",
"size": "1760x2368",
"output_format": "png",
"background": "opaque"
}
],
"usage": {
"input_images": 0,
"generated_images": 1,
"output_tokens": 16280,
"total_tokens": 16280
}
}Authorizations
Body
Request body of image generation.
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.
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).
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.
png, jpeg 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 andoutput_format(default);jpegoutput has no alpha channel.transparent: An RGBA image with an alpha channel;output_formatmust bepng.opaque: An RGB image without an alpha channel.
auto, transparent, opaque 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.

