Seedream 5.5
ByteDance Seedream 5.5 on reAPI — async image generation and editing with stable multi-turn edits, transparent output and layer decomposition. Full parameter reference and billing.
ByteDance's Seedream 5.5 image model on reAPI. Text-to-image,
image-to-image and multi-reference generation (up to 10 reference
images), transparent output from a prompt or references, and layer
decomposition with optional text recognition, at 1K, 1.5K or 2K or an
exact pixel size. Async-first: submit returns the task id; poll until ready.
See current pricing on the
model page.
Quick example
curl https://reapi.ai/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5-5",
"prompt": "A frosted glass perfume bottle with pale gold liquid, soft studio light",
"size": "16:9",
"resolution": "2K"
}'import requests
resp = requests.post(
"https://reapi.ai/api/v1/images/generations",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "doubao-seedream-5-5",
"prompt": "A frosted glass perfume bottle with pale gold liquid, soft studio light",
"size": "16:9",
"resolution": "2K",
},
timeout=30,
)
print(resp.json())const r = await fetch("https://reapi.ai/api/v1/images/generations", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "doubao-seedream-5-5",
prompt: "A frosted glass perfume bottle with pale gold liquid, soft studio light",
size: "16:9",
resolution: "2K",
}),
});
console.log(await r.json());package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
body, _ := json.Marshal(map[string]any{
"model": "doubao-seedream-5-5",
"prompt": "A frosted glass perfume bottle with pale gold liquid, soft studio light",
"size": "16:9",
"resolution": "2K",
})
req, _ := http.NewRequest("POST",
"https://reapi.ai/api/v1/images/generations", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
}Authentication
Every call needs a Bearer token. Generate keys at reapi.ai/settings/apikeys.
Authorization: Bearer YOUR_API_KEYEndpoint
POST /api/v1/images/generations
GET /api/v1/tasks/{id}Submission is async. The POST returns immediately with the task id; the task
endpoint returns the same envelope until completion. Polling does not consume
credits. Poll every few seconds at first and every 5–10 seconds after that;
layer decomposition can take several minutes. Keep polling the same task
instead of submitting again.
Request body
Mode is implicit: no image_urls is text-to-image; one or more is
image-to-image or multi-reference generation. layer_decomposition: true
switches to layer splitting.
| Field | Type | Default | Notes |
|---|---|---|---|
model | string | — | doubao-seedream-5-5. Required. |
prompt | string | — | Describe the image or the edit. Required, except with layer_decomposition: true. |
size | string | 2K | A tier, auto, a ratio, or exact pixels — see size. |
resolution | string | 2K with a ratio | 1K / 1.5K / 2K (case-insensitive), used with a ratio size or on its own when size is omitted. A tier or exact-pixel size takes precedence over it. In layer mode it is an alias of size and also accepts auto. |
n | integer | 1 | Only 1 — one image per request. |
image_urls | string[] | — | Up to 10 reference images (JPEG / PNG / WebP / BMP / TIFF / GIF / HEIC / HEIF, each ≤ 30 MiB and ≤ 36,000,000 px). Public HTTP(S) URLs. Each reference image is billed. |
background | string | auto | auto / opaque / transparent. transparent works for text-to-image and image-to-image and cannot be combined with output_format: "jpeg". Omit it in layer mode, including auto. |
output_format | string | png | png / jpeg. In layer mode it sets the base image only; layers are always transparent PNG. |
layer_decomposition | boolean | false | Split one image into a base image plus transparent layers — see Layer decomposition. |
layer_decomposition_options | object | — | Only with layer_decomposition: true. max_images (integer 2–100, default 30, includes the base image) and text_recognition (boolean). |
optimize_prompt_options | object | { "mode": "standard" } | Prompt optimization. mode accepts standard only, and optimization cannot be turned off. |
watermark | boolean | false | Add an "AI generated" mark. |
Validation before you submit
These combinations are rejected with a synchronous 400 and nothing is
charged:
promptmissing for image generation.nother than1, or more than 10image_urls.layer_decomposition: truewithout exactly one image, or withbackground.layer_decomposition_optionswithoutlayer_decomposition: true, ormax_imagesoutside 2–100.background: "transparent"withoutput_format: "jpeg".- A
sizeratio outside the list below, exact pixels outside the window, or a layer-modesizeother thanauto/1K/1.5K/2K. optimize_prompt_options.modeother thanstandard.
size — string, default 2K
| Form | Example | Rules |
|---|---|---|
| Tier | "2K" | 1K / 1.5K / 2K. The model picks the aspect ratio from the prompt. auto equals 2K for generation. |
| Ratio + tier | "size": "16:9", "resolution": "1.5K" | Generation only. 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9, 2:1, 1:2 (also written 16x9). Without resolution the tier is 2K. |
| Exact pixels | "2048x1152" | Generation only. Total pixels 921,600–4,624,220; width/height ratio 1/16–16. Takes precedence over resolution. |
There is no 3K or 4K tier.
layer_decomposition — boolean, default false
When true, Seedream 5.5 splits your image into one base image plus
transparent PNG layers, with the position and stacking order of each.
- Send exactly one image in
image_urls. sizeacceptsauto,1K,1.5Kor2Konly (sizefirst, thenresolution, elseauto). A tier sets the size of the base image and every layer;autofollows the input image, scaled up to at least 1K and down to at most 2K.promptis optional — without it the model finds the subjects, text and background itself.layer_decomposition_options.max_imagescaps the images returned, including the base image (2–100, default 30). The model may return fewer.layer_decomposition_options.text_recognition: trueadds recognized text to text layers — see Layer decomposition output.- Do not send
background.
Billing is per image returned — see Pricing.
No data: URIs. reAPI rejects base64 inputs platform-wide — every URL
field must be a public HTTP(S) URL. Upload to your own object storage (S3, R2,
OSS, …) and pass the URL.
Troubleshooting
| Failure | What it means | What to do |
|---|---|---|
| Synchronous 400 on submit | A field breaks a rule above | The error names the field — fix and resubmit; nothing was charged |
| Task fails citing content policy | The prompt, an input image or the output was rejected by moderation | Fully refunded. Change the prompt or the image |
| Task fails on an input image | The image could not be fetched or is not a supported format | Fully refunded. Check that the URL is public, and convert AVIF / JP2 to PNG or JPEG |
402 on submit | Not enough credits for the reserve — layer decomposition reserves max_images images | Top up, or lower max_images |
Task stays processing | Normal for layer decomposition, which can take several minutes | Keep polling every 5–10 s; tasks that can never finish are failed and refunded automatically |
Response envelope
Submit and poll share the same shape — only status and output fill in over
time.
{
"id": "task_018f5a3a1b6e7d9f8c2b4d6e8f0a2c4e",
"model": "doubao-seedream-5-5",
"status": "completed",
"created_at": 1735000000,
"output": {
"image_urls": ["https://cdn.reapi.ai/media/tasks/.../0.png"]
},
"error": null
}Poll GET /api/v1/tasks/{id} (see the Tasks reference) until
status === "completed". Generated URLs expire — mirror the files to your own
storage.
Layer decomposition output
A layer_decomposition: true task returns several images, and output.layers
describes them positionally: layers[i] belongs to image_urls[i].
Treat every metadata field as optional.
{
"status": "completed",
"output": {
"image_urls": [
"https://cdn.reapi.ai/media/tasks/.../0.png",
"https://cdn.reapi.ai/media/tasks/.../1.png"
],
"layers": [
{ "z_index": 0, "size": "840x1248", "output_format": "png" },
{
"z_index": 1,
"size": "1512x702",
"output_format": "png",
"name": "Sale title",
"description": "Printed sale title",
"bounding_box": {
"absolute": [84, 156, 756, 468],
"normalized": [100, 125, 900, 375]
},
"text_recognition": {
"text": "SUMMER SALE",
"lines": [
{
"bounding_box": {
"absolute": [126, 156, 714, 468],
"normalized": [150, 125, 850, 375]
},
"runs": [
{
"text": "SUMMER SALE",
"style": {
"similar_font_family": "Arial",
"foreground_color": "#222222",
"bold": true
}
}
]
}
]
}
}
]
}
}The values above illustrate the structure; they are not a recorded task.
z_index— stacking order.0is the base image; layers start at1and a higher value sits on top.bounding_box— where the layer belongs.absoluteis[left, top, right, bottom]in the base image's pixels;normalizedis the same four edges scaled to[0, 1000]. The base image carries no box.name/description— what the model identified in that layer.text_recognition— present only whentext_recognitionwas requested and regular text was found (not for artistic or handwritten text).textjoins lines with\n; each line has abounding_boxandrunsof differently styled text, with style flags that are model estimates.
Layer files are rendered at the chosen tier, so their pixel size can differ
from the box. To rebuild the original, scale each layer to
(right - left) × (bottom - top), place it at (left, top) and composite in
ascending z_index. Use normalized to composite onto a canvas of your own
size.
Pricing
Seedream 5.5 bills each output image by size band, plus each reference image — there is no free first reference:
credits = ceil((output_image_price + reference_images × reference_price) × 1000) 1 credit = $0.001The live rates are on the model page. Failed tasks are always refunded in full.
1. Size band
1K and 1.5K are the lower band; 2K and auto are the higher band.
Exact pixels up to 2,610,000 total are the lower band, above that the higher
band. A ratio size, or an omitted size, takes the band of resolution
(2K when that is omitted too).
2. Layer decomposition is charged per image returned
A layer_decomposition: true request reserves max_images images (30 when
omitted) and settles to the images actually delivered:
credits = first_image_credits + (images_returned - 1) × one_image_creditsfirst_image_credits includes the one input image. Every image is billed at
the band of the request's size (auto reserves the higher band). The
difference is refunded when the task settles, which is why a layer request can
return 402 on an account that could afford the result.