Seedream 5.5 Image Generation
Dola Seedream 5.5 parameters and examples for text-to-image, reference editing, transparent PNGs, layer decomposition, and rich-text OCR.
Use dola-seedream-5-5-261028 on ModelSell to generate images, edit references, or decompose an image into layers. All three modes use the same JSON endpoint.
POST https://api.modelsell.com/v1/images/generations
Authorization: Bearer $MODELSELL_API_KEY
Content-Type: application/jsonImage generation produces one image per request and supports native RGBA transparency. Layer decomposition can return a base image and up to 99 transparent PNG layers. Layers with regular text can also include rich-text OCR.
Request parameters
| Field | Type | Default | Description |
|---|---|---|---|
model | string | Required | dola-seedream-5-5-261028 |
prompt | string | — | Required for generation. For decomposition, describe the elements to extract or omit the prompt to let the model identify the main elements. Aim for 300 Chinese characters or 600 English words or fewer. |
image | string or string[] | — | Public image URLs or Base64 data URLs. Optional for generation, with up to 10 references for editing. Decomposition requires one image. |
size | string | 2K for generation, auto for decomposition | Generation accepts 1K, 1.5K, 2K, or a pixel size in WIDTHxHEIGHT format. Decomposition accepts the three presets and auto. |
output_format | string | png | png or jpeg. In decomposition, this controls the base image format. Every separate layer is a transparent PNG. |
background | string | auto | For generation, use auto, transparent, or opaque. With auto, the model uses the prompt and file format to decide whether to include transparency. Transparent output requires PNG. Omit this field for decomposition. |
response_format | string | See below | url returns download links. b64_json returns Base64-encoded image bytes. |
watermark | boolean | true | Controls the AI-generated watermark in the bottom-right corner. Set to false to turn it off. |
optimize_prompt_options | object | — | Prompt optimization settings. The default and only value for mode is standard. |
safety_identifier | string | — | Stable, unique identifier per end user, up to 64 English characters. A hashed user ID is suitable. |
layer_decomposition | boolean | false | Set to true to decompose the input. If any layer fails to generate, the request fails. |
layer_decomposition_options | object | — | Applies during decomposition. max_images caps the total output count, including the base image. It accepts integers from 2 to 100 and defaults to 30. Set the boolean text_recognition to true to request rich-text OCR. It defaults to false. |
Set response_format explicitly. With the API key set to follow the request, ModelSell uses the requested format. With no format set in the request, API key, or channel, ModelSell defaults to b64_json. A fixed API key format takes precedence. The direct Ark API defaults to url. Save images promptly, as upstream URLs normally expire after 24 hours.
This model supports a single output in generation mode. For this model, omit sequential_image_generation, sequential_image_generation_options, stream, and tools. Use layer_decomposition_options.max_images to cap decomposition output.
Sizes and reference images
A custom generation size such as 2048x1152 must have 921,600–4,624,220 total pixels and an aspect ratio from 1:16 to 16:1. With a preset, describe your desired aspect ratio in the prompt. In decomposition, the base image and each layer retain their respective aspect ratios from the source.
| Mode | Reference image limits |
|---|---|
| Generation | Up to 10 JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, or HEIF images. Each image must have 196–36,000,000 total pixels, with width and height both greater than 14 px. |
| Layer decomposition | One PNG or JPEG with 262,144–36,000,000 total pixels. |
Each reference must have an aspect ratio from 1:16 to 16:1 and be at most 30 MB. Use a URL the upstream provider can reach, or a string such as data:image/png;base64,BASE64_DATA with a lowercase media subtype. The ModelSell gateway caps the request body at 128 MiB. URLs can keep requests with many large references within that limit.
Generate and save a transparent PNG
curl --fail-with-body -sS https://api.modelsell.com/v1/images/generations \
-H "Authorization: Bearer $MODELSELL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dola-seedream-5-5-261028",
"prompt": "One isolated red rain boot with a crisp outline on a completely transparent background",
"size": "1K",
"background": "transparent",
"output_format": "png",
"response_format": "b64_json",
"watermark": false
}' > transparent.jsonDecode the returned image bytes to a PNG file.
import base64
import json
from pathlib import Path
data = json.loads(Path("transparent.json").read_text())["data"][0]
Path("transparent.png").write_bytes(base64.b64decode(data["b64_json"]))Edit a reference image
Send this JSON to the same endpoint. Replace image with the URL of the image you want to edit. For multiple references, pass an array and describe each image in order in the prompt. An ordinary opaque input can also produce a transparent PNG.
{
"model": "dola-seedream-5-5-261028",
"prompt": "Add round sunglasses to the subject while preserving the pose and composition",
"image": "https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/seedream-5-5-multi-round-editing-input.png",
"size": "2K",
"output_format": "png",
"background": "opaque",
"response_format": "url"
}For a subsequent edit, pass the previous result as image and describe what to change and preserve in the new prompt.
Decompose layers and recognize text
This example uses an Ark sample poster and requests up to 15 images including the base image.
curl --fail-with-body -sS https://api.modelsell.com/v1/images/generations \
-H "Authorization: Bearer $MODELSELL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dola-seedream-5-5-261028",
"prompt": "Extract the title and signature as separate editable text layers. Preserve the original text.",
"image": "https://arkdocs-en.tos-ap-southeast-1.volces.com/images/image-generation/ocr-test2.png",
"layer_decomposition": true,
"layer_decomposition_options": {
"max_images": 15,
"text_recognition": true
},
"size": "auto",
"output_format": "png",
"response_format": "url",
"watermark": false
}' > layers.jsonSet response_format to b64_json to embed the base image and each layer separately. To decompose without OCR, omit text_recognition or set it to false.
Response fields
| Field | Description |
|---|---|
created, model | Unix timestamp in seconds and model ID for the request. |
data[].url, data[].b64_json | A temporary download link or a directly decodable Base64 string, depending on the response format. |
data[].size, data[].output_format, data[].background | Actual WIDTHxHEIGHT, file format, and transparency state of transparent or opaque. |
data[].z_index | Stack order for decomposition. The base image is 0. Separate layers start at 1, with higher values above lower ones. |
data[].name, data[].description | Name and content description of each separate layer. |
data[].bounding_box | The layer position in the base-image coordinate system. The base spans the full canvas and omits this field. |
data[].text_recognition | Returned for layers the model identifies as regular text when OCR is enabled. |
safety_identifier | Echoed when supplied in the request. |
usage.input_images, usage.generated_images | Input image count and successful output image count. Decomposition output includes the base image. |
usage.output_tokens, usage.total_tokens | Sum the pixel counts of all output images, divide by 256, and round down. This model currently counts no input tokens, so the values match. |
error.code, error.message | Error code and message when the request fails. |
Both bounding_box.absolute and bounding_box.normalized contain [left, top, right, bottom]. Absolute coordinates measure pixels from the top-left corner of the base image. Normalized coordinates range from 0 to 1000 on each axis. To reassemble the image, scale each layer to its bounding box and stack the layers by ascending z_index.
text_recognition.text contains the layer's full recognized text, with line breaks between lines. Each lines[] item contains that line's bounding_box and runs[]. Each run contains text and style. Style fields include similar_font_family (unknown when unrecognized), foreground_color (#RRGGBB), and the booleans bold, italic, underline, strikethrough, shadow, and translucent. The model estimates style. In a ModelSell production sample, the model read both lines correctly and identified bold and italic text. It missed one visible underline.
This excerpt shows one data[] item from a production text layer. The Base64 value is a placeholder.
{
"z_index": 1,
"name": "Bold navy title text “SUNNY DAY”",
"description": "Bold navy title text “SUNNY DAY”",
"size": "1677x625",
"output_format": "png",
"background": "transparent",
"b64_json": "BASE64_PNG_DATA",
"bounding_box": {
"absolute": [43, 135, 1162, 552],
"normalized": [36, 155, 964, 634]
},
"text_recognition": {
"text": "SUNNY DAY",
"lines": [
{
"bounding_box": {
"absolute": [193, 272, 1015, 434],
"normalized": [160, 313, 842, 499]
},
"runs": [
{
"text": "SUNNY DAY",
"style": {
"similar_font_family": "Arial",
"foreground_color": "#111E3E",
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false,
"shadow": false,
"translucent": false
}
}
]
}
]
}
}References
Async Task Status
仅适用于在 `/v1/images/generations?async=true` 或 `/v1/images/edits?async=true` 提交后返回的图片任务 ID。 建议客户端按固定间隔轮询该接口:当任务为 `succeeded` 且 `data.images` 非空时读取图片结果;当任务为 `failed` 时读取 `error` 字段并停止轮询。图片结果可能包含 `url` 或 `b64_json`,具体取决于模型、渠道能力和提交请求中的 `response_format`。
Seedream 5.0 Image Generation
Next Page