---
title: Seedream 5.5 Image Generation API
description: "Seedream 5.5 through Tokenlio: ten references, transparent PNG, up to 100 layer outputs and optional OCR."
---

# Seedream 5.5

Use the public model ID published to your Workspace, for example `seedream-5-5`. Model visibility, authorization and prices follow the actual catalog. The public image API remains asynchronous:

- Create: `POST /v1/images/generations` → **202 Accepted**, with a platform task `id`.
- Query: `GET /v1/tasks/{id}`.
- Download: `GET /v1/tasks/{id}/content?role=image_0`; enumerate all roles from `assets` after `status=succeeded`.

```bash
curl https://api.tokenlio.ai/v1/images/generations \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: seedream55-001' \
  --data '{
  "model": "seedream-5-5",
  "prompt": "An orange cat sticker",
  "size": "2K",
  "background": "transparent",
  "output_format": "png"
}'
```

Request body:

```json
{
  "model": "seedream-5-5",
  "prompt": "An orange cat sticker",
  "size": "2K",
  "background": "transparent",
  "output_format": "png"
}
```

Creation response:

```json
{
  "id": "dfc68868-d388-4d83-a173-d44e47a8bec7",
  "model": "seedream-5-5",
  "status": "queued",
  "assets": []
}
```

Poll every 5–15 seconds; the states are `queued` → `processing` → `succeeded` or `failed`.

```bash
curl "https://api.tokenlio.ai/v1/tasks/$TASK_ID" -H "Authorization: Bearer $TOKENLIO_API_KEY"
curl --location "https://api.tokenlio.ai/v1/tasks/$TASK_ID/content?role=image_0" \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" -o image.png
```

Successful response example:

```json
{
  "id": "dfc68868-d388-4d83-a173-d44e47a8bec7",
  "model": "seedream-5-5",
  "status": "succeeded",
  "assets": [
    {
      "role": "image_0",
      "mime": "image/png",
      "width": 2048,
      "height": 2048
    }
  ]
}
```

Use temporary result links as returned. Keep the platform Key off file hosts. The same `Idempotency-Key` replays the same parameters under the original Key; changing parameters conflicts. An unknown submission is not permission to create a replacement.

## Parameters

| Parameter | Contract |
| --- | --- |
| `model` | Exact public model ID from your catalog, for example `seedream-5-5` |
| `prompt` | Required for ordinary generation; optional for layer decomposition |
| `image_urls` | 0–10 references, or exactly one for decomposition; public image URLs or Base64 Data URIs |
| `size` | Ordinary default `2K`; supports `1K`, `1.5K`, `2K`, aspect ratios and exact pixels. Decomposition accepts only these tiers or `auto`, default `auto` |
| `resolution` | Tier for an aspect-ratio size, default `2K`. For decomposition, an alias used only when `size` is omitted |
| `n` | Must be 1 |
| `output_format` | `png` (default) or `jpeg`; controls only the base in decomposition, layers are transparent PNG |
| `background` | Ordinary `auto` (default), `opaque` or `transparent`. Transparency requires PNG, but no alpha input. Omit this field entirely for decomposition |
| `layer_decomposition` | Boolean, default false |
| `layer_decomposition_options.max_images` | 2–100, default 30; maximum total output count including the base |
| `layer_decomposition_options.text_recognition` | Optional boolean requesting OCR; results can be absent |
| `optimize_prompt_options` | Only `{"mode":"standard"}`; omission also uses standard |
| `watermark`, `nsfw_check` | Optional booleans |

Supported ratios: `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `2:1`, `1:2`; `16x9` aliases are accepted. Exact pixels require 921,600–4,624,220 pixels, ratio 1/16–16 and no `resolution`. No 3K/4K, ordinary multi-image generation, stream or tools.

Inputs are limited to 30 MiB and 36 million pixels per image, ratio 1/16–16. JPEG, PNG, WebP, BMP, TIFF and GIF are supported by the platform; convert HEIC/HEIF first. Decomposition requires PNG/JPEG with at least 262,144 pixels. The JSON body is limited to **64 MiB**; inline Base64 images may total **45 MiB** after decoding. Use complete Data URIs with the correct MIME or direct public HTTPS image URLs; reference order matters.

## Reference editing

```json
{
  "model": "seedream-5-5",
  "prompt": "Keep the product shape and place it on a wooden desk",
  "image_urls": [
    "https://example.com/product.png"
  ],
  "size": "16:9",
  "resolution": "1.5K",
  "n": 1
}
```

References do not require alpha. For a transparent result, add `background: "transparent"` and `output_format: "png"`. Each editing round creates a separate task and charges that round's inputs.

## Decomposition and OCR

```json
{
  "model": "seedream-5-5",
  "image_urls": [
    "https://example.com/poster.png"
  ],
  "size": "1.5K",
  "layer_decomposition": true,
  "layer_decomposition_options": {
    "max_images": 30,
    "text_recognition": true
  }
}
```

Do not send `background`, including `auto`. `image_0` is the base; subsequent roles are layers, up to `image_99`. The maximum is not a promised count. Coordinates, names and `layer.text_recognition` are optional; treat OCR as plain data. Omit the prompt when testing OCR, as a prompt can affect whether OCR is returned.

Poll the platform every 5–15 seconds. Ordinary requests retain the image deadline; 5.5 decomposition defaults to 20 minutes with a separate operator override, frozen at admission. Generation and complete private delivery share this deadline. A closed task does not reopen or incur a late charge.

## Billing

Every input is charged, including the decomposition input. Each output, including the base and all layers, uses the same two pixel tiers: **≤2,610,000** and **>2,610,000**. Quantities use the actual dimensions of every returned output, not the requested size, bounding boxes or `max_images`. Missing or invalid sizes cannot become a guessed tier or a free successful order.

The platform anchors official CNY unit prices into fixed USD rates at pricing time; there is no runtime currency conversion. Read current rates and discounts from your catalog. Reserve the upper bound, settle complete delivery and release the difference. Failed generation or required delivery is not charged. One effective discount applies to input plus output charges; each editing round is a separate task.

## Errors and recovery

- **400**: check `n: 1`, dimensions, transparent PNG and the one-reference/no-background decomposition rules.
- **401/403**: check the Key, Workspace and model access.
- **402**: check available funds and the reservation upper bound.
- **409**: keep the original intent and query its task when an idempotency key conflicts.
- **429/5xx/connection loss**: submission may be unknown; keep the original identity and do not rotate the key or recreate the task.
- A `failed` task returns `error.code` and an optional `error.message`. `TASK_TIMEOUT` means the task has closed at its deadline; a local polling timeout does not close it.

See the [official model guide](https://docs.volcengine.com/docs/ark/seedream-5-5?lang=zh).
