Image / Seedream

Seedream 5.5 Image Generation

asV3 localized example text (snake_case Request Body +, return image).Model when provide V2 endpointPOST /api/v2/open/aigc/seedream-5.5 (camelCase + Pollingquery ), task and, can; recommended V3.

Overview

Seedream 5.5 Seedream, supported Text-to-Image (text-to-image) and Image-to-Image (image-to-image).5.0 Capability:localized example text (RGBA image ),image up to 99 image, OCR (and ).Requestand field as snake_case.

localized example text:
- ⚡ return:Requestimage complete, return image, no Polling
-🖼️ Method:Text-to-Image, Image-to-Image, image reference image (up to 10 images Reference image)
-🫥 localized example text:Text-to-Imageand Image-to-Image output RGBA image
-🧩 image:images image image+ up to 99 can image, can output
-🔤 OCR:image returned when applicable and (,,, etc. )
-🇨🇳 localized example text:asBase URL: https://mm-internal-cn.leonecloud.com ()

---## Authentication

All endpoints require a token in the request header for authentication:

Authorization: Bearer {YOUR_AUTH_TOKEN}

Failurereturned when applicable HTTP 401:```json
{
"error": {
"code": "AuthenticationError",
"message": "API Key no",
"type": "Unauthorized"
}
}


---

## model Values

`model` as**Required**field, as:| model | Description | Reference imagelocalized example text| size Resolutionlocalized example text| size Default | image| localized example text| output|
|-------|------|-----------|--------------|------------|---------|---------|---------|
| `seedream-5-5` |, supported and OCR| 10 images| `1K` / `1.5K` / `2K` | `2K` | ✅ up to 99 localized example text| ✅ | ❌ |

in in the`model` will return HTTP 400`InvalidParameter`.Seedream Model[Seedream 5.0 Pro](/docs/seedream-5-0-pro), [Seedream 5.0 Flash](/docs/seedream-5-0-flash), [Seedream 5.0 Lite](/docs/seedream-5-0-lite), [Seedream 4.5](/docs/seedream-4-5),,`model`.

---

## endpoint:Image Generation

**POST** `/api/v3/images/generations`

### Request Parameters

| Parameter | Type | Required | Description |
|-----|------|-----|------|
| model | string | Yes | localized example text`seedream-5-5` |
| prompt | string | localized example text* | Prompt.supported in, supported,,,,,,,,,,,,,.recommendedin exceeds 300, exceeds 600; Model can.*image Optional|
| image | string / string[] | No | Reference image.single imagecharacters, multiple images, up to 10 images; supported image URL or Base64 (Format`data:image/png;base64,<data>`, imageFormat).single imageexceeds 30MB|
| size | string | No | output dimensions,[size Description](#size-Description) |
| layer_decomposition | boolean | No | image, default`false`, localized example text[image](#image )|
| layer_decomposition_options | object | No | image, only`layer_decomposition=true` when,[image](#image )|
| background | string | No |:`auto` (default)/ `transparent` / `opaque`, localized example text[localized example text](#)|
| output_format | string | No | `png` (default)/ `jpeg`.and`background=transparent`, return 400|
| response_format | string | No | return Format:`url` (default)/ `b64_json` |
| optimize_prompt_options | object | No | Promptlocalized example text.`mode` onlysupported`standard` (defaultas ),|
| safety_identifier | string | No |, characters, exceeds 64 characters.endpointwill in in.recommended/ID/,|
| watermark | boolean | No | can, output image**No watermark** |

> **Model supported Parameter** (will return 400, will ):> - `sequential_image_generation: auto` (image ):only[Seedream 5.0 Lite](/docs/seedream-5-0-lite), [Seedream 4.5](/docs/seedream-4-5) supported;> - `stream: true` (output ):only Seedream 5.0 Lite, Seedream 4.5 supported.
>
> `tools` (, only[Seedream 5.0 Lite](/docs/seedream-5-0-lite) supported ) and`seed` can, will, will, image.

### size Description

supported,:**Method 1:Resolutionlocalized example text** (`1K` / `1.5K` / `2K`, default `2K`, size )

- Aspect ratioModelPrompt: in`prompt` Description (「16:9 width」)can,`size: "2K"` + Prompt output`2816x1584`.
- width and height when Method 2.
- `1K` and`1.5K` **localized example text**, `2K`,[Billing](#Billing).

**Method 2:width and height** (`width x height`, localized example text`2880x1440`)

| range| Aspect ratiorange |
|-----------|-----------|
| [921600, 4624220] | [1/16, 16] |

Limit**when**localized example text.width and height, width or height Limit:

- valid`2880x1440`:4147200 in, Aspect ratio 2 in.
- no`512x512`:262144 not 921600, return 400.

image (`2880x1440` output`2880x1440`), dimensions in the`size` as.dimensions,[Billing](#Billing).

Method 1 Resolution, can as reference (Model):| Aspect ratio | 1K | 1.5K | 2K |
|-------|----|------|----|
| 1:1 | 1024x1024 | 1536x1536 | 2048x2048 |
| 4:3 | 1152x864 | 1792x1344 | 2368x1776 |
| 3:4 | 864x1152 | 1344x1792 | 1776x2368 |
| 16:9 | 1424x800 | 2048x1152 | 2816x1584 |
| 9:16 | 800x1424 | 1152x2048 | 1584x2816 |
| 3:2 | 1248x832 | 1872x1248 | 2496x1664 |
| 2:3 | 832x1248 | 1248x1872 | 1664x2496 |
| 21:9 | 1568x672 | 2352x1008 | 3136x1344 |

### localized example text`background` output image Alpha:| localized example text| Description |
|-----|------|
| `auto` (default) | ModelPrompt and`output_format` localized example text|
| `transparent` | output RGBA image|
| `opaque` | output RGB image|

- Text-to-Imageand Image-to-Image**supported** `transparent`, Image-to-Imagewhen Reference image no.
- `output_format=jpeg` and`background=transparent` when use (JPEG with Alpha ), return 400.
- image supported Parameter, return 400 ( image PNG).
- localized example text`data[].background` Type, can and Request (`auto` Model as return`opaque`).

### image 

 images image as 1 images image+ can image (PNG).

- `layer_decomposition` localized example text`true`; 
- `image` **mustonly supported 1 images**, RequirementsScenario:Formatonly`png` / `jpeg`, in[`512×512` (262144), `6000×6000` (36M)], Aspect ratio[1/16, 16], size exceeds 30MB; 
-`prompt` Optional:If omittedwhen image in, can use Description; 
-`size` onlysupported`1K` / `1.5K` / `2K` / `auto` (default `auto`:image and image image dimensions output, in 1K~ 2K ), supported width and height; 
- supported`background`, return 400; 
-`output_format` localized example text**image**Format, image as PNG; 
- image FailureRequestFailure, supported Success.

**`layer_decomposition_options`**:

| Parameter | Type | default | Description |
|-----|------|-----|------|
| max_images | integer | 30 | up to output image ( image ),`[2, 100]` |
| text_recognition | boolean | false | image return OCR|

> `max_images`, Usually.create when`max_images`, complete after output images,[Billing](#Billing).

localized example text`data` in as image: image`z_index` as`0`, image`1` (); image will return`bounding_box`, `name`, `description`.localized example text`text_recognition` after, as**localized example text**image return`text_recognition` (, return ),[Response Parameters](#Response Parameters).

---

## Billing

Model**output image images+ input image images**, output image**images image**:

| localized example text| localized example text| Description |
|-------|------|------|
| output image ()| single imagelocalized example text≤ 2601123 | `1K` and`1.5K` dimensions in|
| output image ( height )| 2601123 < single imagelocalized example text≤ 4624220 | `2K` dimensions in|
| input image| each Reference image| images,**no** |

- Text-to-Image/Image-to-Image 1 images output image,= output image+ input image× Reference imageimages.
- image multiple images ( image+ image ),**images**after and, input image.create when`max_images`, complete after images.
- images`usage.generated_images` (output image ) and`usage.input_images` (input image ) as.

localized example text.

---

## Supported Scenarios

### Scenario1:Text-to-Image

```bash

curl -X POST "https://mm-internal-cn.leonecloud.com/api/v3/images/generations" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5-5",
"prompt": "in,,",
"size": "2K"
}'


Aspect ratio (16:9):```bash
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v3/images/generations" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "model": "seedream-5-5",
 "prompt": ",,,",
 "size": "2880x1440"
 }'

Scenario2:image (RGBA)```bash curl -X POST "https://mm-internal-cn.leonecloud.com/api/v3/images/generations" \ -H "Authorization: Bearer your_auth_token_here" \ -H "Content-Type: application/json" \ -d '{ "model": "seedream-5-5", "prompt": ",", "size": "1K", "background": "transparent", "output_format": "png", "safety_identifier": "a3f1c9e2b7d4" }'


### Scenario3:Image-to-Image

```bash

curl -X POST "https://mm-internal-cn.leonecloud.com/api/v3/images/generations" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-5-5",
"prompt": "images image, in",
"image": "https://example.com/input.png",
"size": "2K"
}'


### Scenario4:image reference image```bash
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v3/images/generations" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "model": "seedream-5-5",
 "prompt": "will image 1 as image 2",
 "image": [
 "https://example.com/person.png",
 "https://example.com/clothes.png"
 ],
 "size": "2K"
 }'

Scenario5:image+ OCR```bash curl -X POST "https://mm-internal-cn.leonecloud.com/api/v3/images/generations" \ -H "Authorization: Bearer your_auth_token_here" \ -H "Content-Type: application/json" \ -d '{ "model": "seedream-5-5", "prompt": "will image image", "image": "https://example.com/poster.png", "layer_decomposition": true, "layer_decomposition_options": { "max_images": 10, "text_recognition": true }, "size": "2K" }'


### Scenario6:Python (OpenAI SDK)

V3 and OpenAI SDK imageendpoint,`base_url` localized example text`https://mm-internal-cn.leonecloud.com/api/v3` can, field`extra_body`:

```python

from openai import OpenAI

client = OpenAI(
base_url="https://mm-internal-cn.leonecloud.com/api/v3",
api_key="your_auth_token_here",
)

resp = client.images.generate(
model="seedream-5-5",
prompt=",",
size="1K",
response_format="url",
extra_body={
"background": "transparent",
"output_format": "png",
},
)
print(resp.data[0].url)


---

## Response Parameters

### Success(HTTP 200)```json
{
 "model": "seedream-5-5",
 "created": 1794814254,
 "data": [
 {
 "url": "https://.../task_20261116153049_at02duyc_0.png",
 "size": "1024x1024",
 "output_format": "png",
 "background": "transparent"
 }
 ],
 "usage": {
 "generated_images": 1,
 "input_images": 0,
 "output_tokens": 4096,
 "total_tokens": 4096
 },
 "safety_identifier": "a3f1c9e2b7d4"
}

image (text_recognition):

{
 "model": "seedream-5-5",
 "created": 1794813692,
 "data": [
 {
 "url": "https://.../layer_0.png",
 "size": "2048x2048",
 "output_format": "png",
 "background": "opaque",
 "z_index": 0
 },
 {
 "url": "https://.../layer_1.png",
 "size": "3455x1214",
 "output_format": "png",
 "background": "transparent",
 "z_index": 1,
 "bounding_box": {
 "absolute": [140, 0, 1900, 618],
 "normalized": [68, 0, 928, 302]
 },
 "name": "localized example text",
 "description": "localized example text"
 },
 {
 "url": "https://.../layer_2.png",
 "size": "2442x1718",
 "output_format": "png",
 "background": "transparent",
 "z_index": 2,
 "bounding_box": {
 "absolute": [44, 258, 734, 743],
 "normalized": [21, 126, 358, 363]
 },
 "name": "localized example text",
 "description": "localized example text",
 "text_recognition": {
 "text": "EXPLORE THE WILD,\nINSPIRE THE SOUL.",
 "lines": [
 {
 "bounding_box": {
 "absolute": [44, 258, 734, 500],
 "normalized": [21, 126, 358, 244]
 },
 "runs": [
 {
 "text": "EXPLORE THE WILD,",
 "style": {
 "similar_font_family": "Palatino Linotype",
 "foreground_color": "#F5F5F0",
 "bold": true,
 "italic": false,
 "underline": false,
 "strikethrough": false,
 "shadow": false,
 "translucent": false
 }
 }
 ]
 }
 ]
 }
 }
 ],
 "usage": {
 "generated_images": 9,
 "input_images": 1,
 "output_tokens": 131061,
 "total_tokens": 131061
 }
}
ParameterTypeDescription
modelstringRequest in themodel
createdintegertaskCreated Time (Unix seconds)
data[].urlstringimage URL (response_format=url returned when applicable), and when
data[].b64_jsonstringimage Base64 (response_format=b64_json returned when applicable)
data[].sizestringimagewidth and height,2048x2048
data[].output_formatstringimageFormat:png / jpeg.image when fieldimageFormat, image aspng
data[].backgroundstringType:transparent (or )/opaque ()
data[].z_indexintegerimage (only image ): image as0, localized example text
data[].bounding_box.absoluteint[]image in image in the[left, top, right, bottom] (onlyimage, image return )
data[].bounding_box.normalizedint[]localized example text[left, top, right, bottom], 0~ 1000
data[].namestringimage (only image )
data[].descriptionstringimage (only image )
data[].text_recognitionobjectOCR, (only imagetext_recognition)
safety_identifierstringRequestlocalized example textsafety_identifier when
usage.generated_imagesintegerimage images ( image when as image+ image, output image images )
usage.input_imagesintegerReference image images ()
usage.output_tokensintegersum(width× height ) / 256 localized example text
usage.total_tokensintegerandoutput_tokens localized example text

text_recognition localized example text:

ParameterTypeDescription
textstringfirst image,,,\n localized example text
lines[].bounding_boxobjectin image in the,data[].bounding_box
lines[].runs[].textstring,; when with 1
lines[].runs[].style.similar_font_familystring; no or returned when applicableunknown
lines[].runs[].style.foreground_colorstring,#RRGGBB, Alpha
lines[].runs[].style.bold / italic / underlineboolean/ /
lines[].runs[].style.strikethrough / shadow / translucentboolean/ /
Model, can and image Property with.
image URL can, in the as, in encoded.

localized example textX-Task-Id as Request Task ID, when provide.

image:will image(right - left) × (bottom - top), image(left, top) Location, imagez_index localized example text.( widthW, heightH)whennormalized:x = left / 1000 × W, y = top / 1000 × H.

when

Request maximum 10 minutes.returned when applicable HTTP 504, task will execute and, canmessage in the Task ID ( orX-Task-Id)localized example textGET /v1/images/generations/{taskId} query results, returnImage Generation API (Unified Endpoint) Query Taskendpoint:```json
{
"error": {
"code": "RequestTimeout",
"message": "Image Generationwhen, task in processing, GET /v1/images/generations/task_xxx query results",
"type": "GatewayTimeout"
}
}


> image (`max_images` when ) when image, recommended when 10 minutes.

---

## Error Codes

Failurereturned when applicableHTTP Status Code+ localized example text`error`:```json
{
 "error": {
 "code": "InvalidParameter",
 "message": "size in[921600, 4624220], first 512x512",
 "type": "BadRequest"
 }
}
HTTP Status Codeerror.codeDescription
400InvalidParameterParameterError (prompt, size no,jpeg andtransparent,max_images, Model supported Parameter etc. )
400SensitiveContentDetected etc.input or output not, Prompt or Reference image
401AuthenticationErrorAPI Key invalid or missing
402InsufficientBalanceInsufficient balance
403PermissionDeniedno
404ModelNotOpenModelnot
413InvalidParameterRequest Bodylocalized example text
500InternalServiceErrorImage GenerationFailure, can
504RequestTimeoutwhen, task in,when

Migrating from V2

localized example textV2V3 ()
create PathPOST /api/v2/open/aigc/seedream-5.5, PathModellocalized example textPOST /api/v3/images/generations, Modellocalized example textmodel localized example text
MethodCreate Taskafter Polling query, return Image
fieldlocalized example textcamelCase (imageUrls, aspectRatio, outputFormat)snake_case (image, size, output_format)
Generation typegenType (t2i / i2i / t2i-layer / i2i-layer)localized example textimage; imagelayer_decomposition: true
dimensions ParameteraspectRatio + resolution (1K / 1.5K / 2K)and assize, localized example textsize Description
imagelayerMaxImages + layerTextRecognitionlayer_decomposition_options.max_images + .text_recognition
image dataqueryseedreamLayerOutput.layers[]indata[] (z_index / bounding_box / text_recognition)
create{code, msg, data} localized example text,data[].url
Errorlocalized example textError Codes (code: 10002)HTTP Status Code+ {"error": {...}}
Callback NotificationcallbackUrlreturn, no

V2 endpointcan use, task and.V2 localized example textresolution and Resolution (1K / 1.5K / 2K, default 2K).


Best Practices

  1. when:image image Usually 15~ 60 seconds, image can minutes, when recommended at least 10 minutes.
  2. 1K and1.5K localized example text:image when1.5K,; in (list image ) when1K.
  3. Aspect ratiolocalized example text:Resolutioninprompt Aspect ratio (「16:9 width」)Model; dimensions,size Description.
  4. image, image:RGBA asset whenbackground: transparent, image.
  5. max_images localized example text:when and; first 100, create when ( complete after will ).
  6. image whenlayer_decomposition:image image+ image images, image.
  7. Reference imageeach:and 5.0 Pro, Model number 1 images Reference image, image reference first.
  8. and when store:return image URL and when, when.
  9. Reference imageURL:Base64 will Request Body, multiple images image when Request Body.
Updated 2026-11-16