BeeRoute logoBeeRoute.

Home / Docs / Seedream 5.5 Image Generation API

Seedream 5.5 Image Generation API

Download this document as MD

Endpoint: POST https://beeroute.ai/v1/images/generations

Model name: doubao-seedream-5-5-261028

Seedream 5.5 is ByteDance's image model for professional content production, focused on precise editing and multi-turn consistency, with stronger real-world scenes, multi-image fusion, small text and multilingual text rendering. Request bodies and responses are identical to the official Volcengine Ark API: to use an official example, replace https://ark.cn-beijing.volces.com/api/v3/images/generations with https://beeroute.ai/v1/images/generations and use your BeeRoute API key. The request body stays the same.

Note: image URLs are temporary (valid for 24 hours). Save important results promptly.


1. Capabilities

CapabilityDescription
Text-to-imageGenerate one image from a prompt
Image-to-image / multi-image fusion1–10 reference images + prompt, generates one image
Interactive editingMark positions on the reference image with coordinates, boxes, arrows or sketches for precise edits
Transparent background (RGBA)Generate PNGs with an alpha channel directly, from text or from images
Layer decompositionSplit one image into 1 base image + up to 99 layers (each a transparent PNG), with each layer's position, name and description
Rich-text OCRDuring layer decomposition, recognize the text and style (font, color, bold, italic, underline, strikethrough, shadow, translucency) of regular text layers
Multilingual promptsBesides Chinese and English: Japanese, Korean, French, German, Spanish, Portuguese, Russian, Arabic, Vietnamese, Thai, Indonesian and more

Not supported by Seedream 5.5: image sets (sequential_image_generation), web search (tools), streaming (stream). Do not send these parameters.


2. Pricing

Seedream 5.5 is billed per image: each input reference image is charged once, and each output image is charged by its pixel tier.

ItemUnit price
Input image (reference / image to decompose)$0.0074 / image
Output image, total pixels ≤ 2.61M (2,610,000)$0.0191 / image
Output image, total pixels > 2.61M$0.0338 / image

Tier of common sizes:

sizeActual width x height (examples)Pixels per imageOutput price
1K1024x1024, 1424x800, 800x1424~1.0M–1.14M$0.0191
1.5K1536x1536, 2048x1152, 1152x2048~2.34M–2.41M$0.0191
2K (default)2048x2048, 2816x1584, 1664x2496~4.15M–4.46M$0.0338
Custom WxHe.g. 2560x14403.69M$0.0338

Cost examples:

ScenarioInput imagesOutput imagesCost
Text-to-image, size: 2K01 (2K)0.0338 = $0.0338
Text-to-image, size: 1K01 (1K)0.0191 = $0.0191
Multi-image fusion, 2 references, size: 2K21 (2K)2×0.0074 + 0.0338 ≈ $0.0485
Layer decomposition, size: 2K, 1 base + 7 layers (all layers ≤ 2.61M pixels)11 base (2K) + 7 layers0.0074 + 0.0338 + 7×0.0191 ≈ $0.175

Billing notes:

  • Only successfully generated images are charged. Failed images are free.
  • In layer decomposition, the base image and every layer count as output images, each priced by its own pixel tier. Layers are usually small, so most fall into the $0.0191 tier.
  • Pre-deduction: when a request starts, the maximum possible number of images is pre-deducted; after completion you are charged for the actual count and the difference is refunded. Layer decomposition pre-deducts layer_decomposition_options.max_images (default 30) images, all at the high tier — by default 0.0074 + 30×0.0338 ≈ $1.0221. If your balance is below the pre-deduction amount, the request is rejected. For simple images, lower max_images.
  • In the usage log, the "input / output" columns for this model are image counts, not tokens. The log details show the per-image prices.
  • Actual billing follows the group ratio configured by the administrator.

3. Request Parameters

ParameterTypeRequiredDefaultDescription
Authorizationstring✅Bearer {{YOUR_API_KEY}}API authentication token
Content-Typestring✅application/jsonRequest body type

Body (application/json)

ParameterTypeRequiredDefaultDescription
modelstring✅-doubao-seedream-5-5-261028
promptstringRequired for generation-Image description. Optional for layer decomposition: specifies which elements to extract; if omitted, the model detects all main elements. Recommended: ≤ 300 Chinese characters or ≤ 600 English words
imagestring / string[]Required for layer decomposition-Reference image(s), URL or Base64 (data:image/png;base64,<data>, lowercase format). Up to 10 for generation; exactly 1 for layer decomposition
sizestringNoGeneration 2K; layer decomposition autoOutput size, see "size values" below. Directly affects cost
backgroundstringNoautoAlpha channel: auto (model decides), transparent (RGBA output), opaque. Not allowed with layer decomposition
output_formatstringNopngpng or jpeg. In layer decomposition it only applies to the base image; layers are always png. jpeg cannot be combined with background: transparent
response_formatstringNourlurl (download link, valid 24 hours) or b64_json (Base64 data)
watermarkbooleanNotrueAdds an "AI generated" watermark at the bottom right. On by default — pass false to disable
layer_decompositionbooleanNofalseLayer decomposition switch. When true, image is split into 1 base image + multiple layers
layer_decomposition_options.max_imagesintegerNo30Maximum total output images including the base, range [2, 100]. Larger values give finer splits and also set the pre-deduction amount
layer_decomposition_options.text_recognitionbooleanNofalseReturn rich-text OCR for regular text layers (data[].text_recognition)
optimize_prompt_options.modestringNostandardPrompt optimization mode; 5.5 only supports standard
safety_identifierstringNo-End-user identifier (≤ 64 characters), ideally a hash of the user ID, used by the platform to detect abusive users; echoed back in the response

Reference image requirements

ScenarioFormatsSizeDimensions
Generation (image-to-image / fusion / interactive editing)jpeg, png, webp, bmp, tiff, gif, heic, heif≤ 30MBAspect ratio [1/16, 16]; width and height > 14px; total pixels ≤ 6000×6000
Layer decompositionpng, jpeg≤ 30MBAspect ratio [1/16, 16]; total pixels between 512×512 and 6000×6000

size values

Generation — choose one of two methods, do not mix:

  • Method 1 (recommended): pass a resolution tier 1K, 1.5K or 2K and describe the aspect ratio or purpose in the prompt (e.g. "vertical phone wallpaper"); the model decides the final dimensions.
  • Method 2: pass exact dimensions WxH, e.g. 2560x1440. Total pixels must be within [921,600 (1280x720), 4,624,220] and the aspect ratio within [1/16, 16]. For example 512x512 has too few pixels and is rejected.

Typical actual dimensions for method 1:

Aspect ratio1K1.5K2K
1:11024x10241536x15362048x2048
4:31152x8641792x13442368x1776
3:4864x11521344x17921776x2368
16:91424x8002048x11522816x1584
9:16800x14241152x20481584x2816
3:21248x8321872x12482496x1664
2:3832x12481248x18721664x2496
21:91568x6722352x10083136x1344

Layer decomposition — tiers only: 1K, 1.5K, 2K, auto (default).

  • The base image matches the size resolution and the original aspect ratio; each layer is close to the size resolution and keeps its aspect ratio from the original image.
  • auto: outputs the base and each layer at their original size; anything below 1K is output at 1K and anything above 2K at 2K.

How to call: image-to-image also uses /v1/images/generations — pass a URL or Base64 in image. The /v1/images/edits endpoint and multipart file upload are not supported yet.


4. Request Examples

1. Text-to-image

curl -X POST 'https://beeroute.ai/v1/images/generations' \
  -H 'Authorization: Bearer {{YOUR_API_KEY}}' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "A vibrant close-up editorial portrait, model with a piercing gaze wearing a sculptural hat, rich color blocking, sharp focus on the eyes, shallow depth of field, Vogue cover aesthetic, shot on medium format, dramatic studio lighting.",
    "size": "2K",
    "output_format": "png",
    "watermark": false
  }'

2. Transparent background (RGBA)

curl -X POST 'https://beeroute.ai/v1/images/generations' \
  -H 'Authorization: Bearer {{YOUR_API_KEY}}' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "A sticker of a Shiba Inu wearing a red scarf, flat illustration style, white outline",
    "size": "1K",
    "background": "transparent",
    "output_format": "png",
    "watermark": false
  }'

With background: transparent, output_format must be png. data[].background in the response reports the image's actual transparency.

3. Image-to-image

curl -X POST 'https://beeroute.ai/v1/images/generations' \
  -H 'Authorization: Bearer {{YOUR_API_KEY}}' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "Keep the model pose and the flowing shape of the liquid garment unchanged. Change the garment material from silver metal to completely transparent clear water (or glass). Skin details are visible through the liquid. Lighting changes from reflection to refraction.",
    "image": "https://arkdocs.tos-cn-beijing.volces.com/images/image-generation/seedream4_5_imageToimage.png",
    "size": "2K",
    "watermark": false
  }'

4. Multi-image fusion

curl -X POST 'https://beeroute.ai/v1/images/generations' \
  -H 'Authorization: Bearer {{YOUR_API_KEY}}' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "Replace the outfit in image 1 with the outfit from image 2",
    "image": [
      "https://arkdocs.tos-cn-beijing.volces.com/images/image-generation/seedream4_imagesToimage_1.png",
      "https://arkdocs.tos-cn-beijing.volces.com/images/image-generation/seedream4_5_imagesToimage_2.png"
    ],
    "size": "2K",
    "watermark": false
  }'

Refer to reference images as "image 1", "image 2" in the prompt, in the same order as the image array.

5. Interactive editing

Mark positions on the reference image with boxes, arrows or sketches, then describe the edit in the prompt:

curl -X POST 'https://beeroute.ai/v1/images/generations' \
  -H 'Authorization: Bearer {{YOUR_API_KEY}}' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "Edit the image according to the hand-drawn sketch. Add a stack of real magazines or art books in the marked area at the bottom left, and a ceramic coffee cup with a saucer in the marked area on the right. Remove all sketch lines. Keep the composition unchanged. Blend the new objects naturally into the scene.",
    "image": "https://arkdocs.tos-cn-beijing.volces.com/images/image-generation/seedream_50_pro_input2.png",
    "size": "2K",
    "watermark": false
  }'

6. Layer decomposition (with rich-text OCR)

curl -X POST 'https://beeroute.ai/v1/images/generations' \
  -H 'Authorization: Bearer {{YOUR_API_KEY}}' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "Separate the image into precise layers. Text to separate is at <bbox>180 64 812 198</bbox>, <bbox>757 210 939 280</bbox>, <bbox>63 212 320 282</bbox>, <bbox>178 714 826 810</bbox>, <bbox>814 819 949 894</bbox>, <bbox>326 824 669 930</bbox>; the parrot is at <bbox>347 305 642 997</bbox>.",
    "image": "https://arkdocs.tos-cn-beijing.volces.com/images/image-generation/seedream_50_pro_layer_input.png",
    "layer_decomposition": true,
    "layer_decomposition_options": {
      "max_images": 10,
      "text_recognition": true
    },
    "size": "2K",
    "output_format": "jpeg",
    "watermark": false
  }'
  • The prompt is optional; the model will detect all main elements. Use <bbox>left top right bottom</bbox> (coordinates normalized to 0–1000) to target specific regions.
  • With max_images set to 10, the pre-deduction is 0.0074 + 10×0.0338 ≈ $0.3456; the final charge is based on the actual image count.
  • If any layer fails, the whole request fails — there are no partial results.

7. Python (OpenAI SDK)

The OpenAI SDK does not know Seedream-specific parameters; put them in extra_body:

from openai import OpenAI

client = OpenAI(
    base_url="https://beeroute.ai/v1",
    api_key="{{YOUR_API_KEY}}",
)

response = client.images.generate(
    model="doubao-seedream-5-5-261028",
    prompt="Split the subject, text and background into separate layers",
    size="2K",
    response_format="url",
    extra_body={
        "image": "https://arkdocs.tos-cn-beijing.volces.com/images/image-generation/seedream_50_pro_layer_input.png",
        "layer_decomposition": True,
        "layer_decomposition_options": {"max_images": 10},
        "watermark": False,
    },
)

for item in response.data:
    print(item.url)

5. Response

Response fields

FieldTypeDescription
modelstringModel ID actually used
createdintegerCreation time (Unix seconds)
data[].urlstringImage URL (when response_format: url), valid for 24 hours
data[].b64_jsonstringImage Base64 (when response_format: b64_json)
data[].sizestringActual dimensions, e.g. 2048x2048. This determines the pricing tier
data[].output_formatstringpng or jpeg
data[].backgroundstringActual transparency: transparent (has transparent or translucent pixels) or opaque
data[].z_indexintegerLayer decomposition: stacking order; base is 0, layers count up from 1, higher is on top
data[].namestringLayer decomposition: layer name
data[].descriptionstringLayer decomposition: layer description (color, material, etc.)
data[].bounding_box.absoluteint[4]Layer decomposition: pixel coordinates in the base image [left, top, right, bottom] (not returned for the base)
data[].bounding_box.normalizedint[4]Layer decomposition: coordinates normalized to 0–1000 [left, top, right, bottom]
data[].text_recognitionobjectRich-text OCR: text full text; lines[] each with bounding_box and style runs runs[] (text, style with similar_font_family, foreground_color, bold, italic, underline, strikethrough, shadow, translucent)
usage.input_imagesintegerNumber of input images
usage.generated_imagesintegerNumber of images generated successfully
usage.output_tokensintegerTokens reported by Volcengine (sum of output pixels / 256); not used for BeeRoute billing
safety_identifierstringEchoed back only if sent in the request
errorobjectcode and message when the whole request fails

Text-to-image response example

{
    "model": "doubao-seedream-5-5-261028",
    "created": 1794920003,
    "data": [
        {
            "url": "https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/doubao-seedream-5-5/....png",
            "size": "1664x2496",
            "output_format": "png",
            "background": "opaque"
        }
    ],
    "usage": {
        "input_images": 0,
        "generated_images": 1,
        "output_tokens": 16224,
        "total_tokens": 16224
    }
}

Output is 1664x2496, about 4.15M pixels, in the > 2.61M tier: cost $0.0338.

Layer decomposition response example

{
    "model": "doubao-seedream-5-5-261028",
    "created": 1784696685,
    "data": [
        {
            "url": "https://...",
            "size": "2048x2048",
            "output_format": "jpeg",
            "z_index": 0
        },
        {
            "url": "https://...",
            "size": "1273x265",
            "output_format": "png",
            "z_index": 1,
            "bounding_box": {
                "absolute": [383, 120, 1655, 384],
                "normalized": [187, 59, 808, 188]
            },
            "name": "Seedream title text",
            "description": "Seedream title text in a large yellow serif font"
        }
    ],
    "usage": {
        "input_images": 1,
        "generated_images": 2,
        "output_tokens": 23107,
        "total_tokens": 23107
    }
}

In this example: 1 input ($0.0074) + base 2048x2048 ($0.0338) + layer 1273x265 ($0.0191) = $0.0603.

Placing layers back onto the base image

  • Using absolute (recommended, for the output base image): scale the layer to width = right - left, height = bottom - top, and place it at (left, top) on the base.
  • Using normalized (for any canvas W × H): position (left/1000×W, top/1000×H), size (right-left)/1000×W × (bottom-top)/1000×H.
  • Stack multiple layers in ascending z_index order.

6. FAQ

  1. Images have an "AI generated" watermark? watermark defaults to true; pass "watermark": false explicitly.
  2. Image link no longer works? URLs are valid for only 24 hours after generation; download promptly, or use "response_format": "b64_json" to receive the image data directly.
  3. "预扣费额度失败" (pre-deduction failed) although the balance looks enough? The maximum possible image count is pre-deducted when the request starts (layer decomposition pre-deducts 30 high-tier images, $1.0221, by default). Lower layer_decomposition_options.max_images to reduce it; you are charged for the actual count at the end.
  4. Error when sending stream, sequential_image_generation or tools? Seedream 5.5 does not support streaming, image sets or web search.
  5. Layer decomposition fails? Make sure you send exactly 1 image in png/jpeg of at least 512×512 pixels, and do not send background.
  6. Want it cheaper? Output at 1K or 1.5K ($0.0191/image) — 43% cheaper than 2K ($0.0338/image).

Last updated 2026-11-26 · Markdown source · llms.txt