# Seedream 5.0 Pro

Seedream 5.0 Pro is ByteDance's image model. One request makes one image from a prompt, from a prompt plus up to 10 reference images, or splits one image into a base image and up to 16 transparent layers. Send the request, keep the returned task ID, and read the finished images from the task. Reference images go in as URLs.

## Model IDs

| Model ID           | Inputs            | Output size                          | Images per request                      |
| ------------------ | ----------------- | ------------------------------------ | --------------------------------------- |
| `seedream-5-0-pro` | text, 0–10 images | `1K`, `1.5K`, `2K` or `WIDTHxHEIGHT` | 1, or a base image plus up to 16 layers |

See the [model page](https://seedrouter.ai/models/seedream-5-0-pro#pricing) for current prices.

## Quick example

```bash
curl https://api.seedrouter.ai/v1/images/generations \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-0-pro",
    "prompt": "A red ceramic mug on a white table, soft studio light, product photography. No text, no logos.",
    "size": "1K",
    "watermark": false
  }'
```

```python
import os
import requests

response = requests.post(
    "https://api.seedrouter.ai/v1/images/generations",
    headers={"Authorization": f"Bearer {os.environ['SEEDROUTER_API_KEY']}"},
    json={
        "model": "seedream-5-0-pro",
        "prompt": "A red ceramic mug on a white table, soft studio light, product photography. No text, no logos.",
        "size": "1K",
        "watermark": False,
    },
    timeout=60,
)
response.raise_for_status()
task_id = response.json()["id"]
```

```javascript
const response = await fetch('https://api.seedrouter.ai/v1/images/generations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SEEDROUTER_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'seedream-5-0-pro',
    prompt: 'A red ceramic mug on a white table, soft studio light, product photography. No text, no logos.',
    size: '1K',
    watermark: false,
  }),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const { id: taskId } = await response.json();
```

```go
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
    "os"
    "strings"
    "time"
)

func main() {
    body := strings.NewReader(`{
      "model": "seedream-5-0-pro",
      "prompt": "A red ceramic mug on a white table, soft studio light, product photography. No text, no logos.",
      "size": "1K",
      "watermark": false
    }`)
    req, err := http.NewRequest("POST", "https://api.seedrouter.ai/v1/images/generations", body)
    if err != nil { panic(err) }
    req.Header.Set("Authorization", "Bearer " + os.Getenv("SEEDROUTER_API_KEY"))
    req.Header.Set("Content-Type", "application/json")
    client := &http.Client{Timeout: 60 * time.Second}
    res, err := client.Do(req)
    if err != nil { panic(err) }
    defer res.Body.Close()
    if res.StatusCode != http.StatusOK { panic(res.Status) }
    var task struct { ID string `json:"id"` }
    if err := json.NewDecoder(res.Body).Decode(&task); err != nil { panic(err) }
    fmt.Println(task.ID)
}
```

## Endpoint

```text
POST https://api.seedrouter.ai/v1/images/generations
```

| Header        | Value                 |
| ------------- | --------------------- |
| Authorization | `Bearer YOUR_API_KEY` |
| Content-Type  | `application/json`    |

The response is a task (`{"id": "task_...", "status": "processing"}`), not the finished image. Poll `GET /v1/tasks/{task_id}` for the result. Keep API keys in server-side code. References and layer decomposition go in the same request through `image`; `/v1/images/edits` is not used for this model and returns 400.

## Parameters

| Field                          | Type            | Default    | Notes                                                                                                                                                                                                                                                              |
| ------------------------------ | --------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `model`                        | string          | required   | `seedream-5-0-pro`                                                                                                                                                                                                                                                 |
| `prompt`                       | string          | required   | Describes the image to make. Optional with `layer_decomposition`: say which elements to split out, or leave it out to split every major element.                                                                                                                   |
| `image`                        | URL or URL list | none       | One public image URL, or a list of 2–10. Without it the request is text to image. With `layer_decomposition`, exactly one.                                                                                                                                         |
| `size`                         | string          | `2K`       | `1K`, `1.5K` or `2K` (describe the shape in `prompt`), or exact pixels `WIDTHxHEIGHT` totalling 921,600 to 4,624,220 with an aspect ratio between 1:16 and 16:1, for example `2048x1024`. With `layer_decomposition`: `auto` (default), `1K`, `1.5K` or `2K` only. |
| `layer_decomposition`          | boolean         | `false`    | Split the one input image into a base image and up to 16 transparent PNG layers.                                                                                                                                                                                   |
| `optimize_prompt_options.mode` | enum            | `standard` | `standard` for higher quality, `fast` for lower latency.                                                                                                                                                                                                           |
| `output_format`                | enum            | `jpeg`     | `jpeg` or `png`. With `layer_decomposition` it sets the base image only; layers are always PNG.                                                                                                                                                                    |
| `background`                   | enum            | `opaque`   | `opaque` or `transparent`. `transparent` needs exactly one input image that has an alpha channel, cannot use `jpeg` output and cannot be combined with `layer_decomposition`.                                                                                      |
| `watermark`                    | boolean         | `true`     | `true` adds an "AI generated" mark in the lower-right corner. Set `false` for a clean image.                                                                                                                                                                       |
| `content_filter`               | boolean         | `true`     | Available through the API only. The Playground always keeps it on.                                                                                                                                                                                                 |

Fields outside this list are dropped before the request is forwarded; they never cause an error and never change the output. `n`, `stream`, `seed`, `response_format` and sequential generation are not available. `callback_url` is not available; poll the task instead.

## Output size

A tier sets the scale and the prompt sets the shape. Name the aspect ratio in `prompt` (for example "a 16:9 landscape") and the model picks the frame:

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

For a fixed frame, send exact pixels instead of a tier. `1K` and `1.5K` cost the same; `2K` and any size above 2.61 million pixels cost more (see [Pricing dimensions](#pricing-dimensions)).

## Reference images

Pass one image to edit it, or 2–10 to combine them, and say in `prompt` what to keep and what to change. Refer to them by order ("the jacket from image 1").

```json
{
  "model": "seedream-5-0-pro",
  "prompt": "Put the jacket from image 1 on the model from image 2, standing on a rainy street at night.",
  "image": ["https://example.com/jacket.png", "https://example.com/model.jpg"],
  "size": "1.5K"
}
```

## Layer decomposition

Send exactly one image with `layer_decomposition: true`. The task returns the base image first and then each layer as a transparent PNG.

```json
{
  "model": "seedream-5-0-pro",
  "image": "https://example.com/poster.png",
  "layer_decomposition": true,
  "prompt": "Separate the headline, the product and the background."
}
```

Each layer carries `z_index` (the base image is 0; higher numbers sit on top), `name`, `description` and `bounding_box`. `bounding_box.absolute` is `[left, top, right, bottom]` in pixels of the base image; `bounding_box.normalized` is the same box in thousandths of the base image's width and height. To rebuild the picture, scale each layer to its box and place it on the base image in ascending `z_index` order.

With `size: "auto"` the base image and every layer keep their size in the input image. The input must be PNG or JPEG with a total pixel count (width × height) between 262,144 (512 × 512) and 36,000,000 (6000 × 6000).

## Transparent background

Send one PNG that has an alpha channel with `background: "transparent"` to get a PNG whose background is transparent:

```json
{
  "model": "seedream-5-0-pro",
  "prompt": "Turn this sticker into a glossy enamel pin, keep the outline.",
  "image": "https://example.com/sticker.png",
  "background": "transparent",
  "output_format": "png"
}
```

## Media inputs

Each reference is a public HTTP(S) URL. Base64 data URIs are not accepted: upload the file to your own storage and pass its URL. Accepted formats are JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC and HEIF, up to 30 MB each, between 1:16 and 16:1, wider and taller than 14 pixels, and at most 36,000,000 pixels in total. Layer decomposition takes PNG or JPEG only.

## Pricing dimensions

Check the [model pricing section](https://seedrouter.ai/models/seedream-5-0-pro#pricing) for current rates. Seedream 5.0 Pro is priced per output image by scenario and pixel tier, plus every reference image after the first:

```text
generation:          cost = image price for its tier + extra references × reference price
layer decomposition: cost = images returned × per-image price for the request's tier
```

* The lower tier covers images up to 2.61 million pixels (`1.5K` and below); anything larger is the upper tier.
* Layer decomposition charges the base image and every layer. The whole request uses one tier: the lower price only when every returned image stays within 2.61 million pixels.
* The amount reserved when a task is accepted covers the largest result: one image at the requested tier, or 17 images for layer decomposition (`auto` counts as the upper tier). The task is then charged for the images actually returned, and the difference is released.

View final charges in your account usage history. Failed tasks are not charged.

## Output schema

Submission returns the task:

```json
{"id": "task_...", "model": "seedream-5-0-pro", "status": "processing", "created_at": 1789689600}
```

### Get the task

```text
GET https://api.seedrouter.ai/v1/tasks/{task_id}
```

Poll every 10–20 seconds until `status` is `completed` or `failed`. A network timeout while polling does not mean generation failed: keep the task ID and resume checking it. Do not create another task to check progress.

### Completed task

```json
{
  "id": "task_...",
  "model": "seedream-5-0-pro",
  "status": "completed",
  "created_at": 1789689600,
  "finished_at": 1789689653,
  "output": {
    "created": 1789689650,
    "data": [
      {
        "url": "https://static.seedrouter.ai/media/tasks/task_example/0.jpg",
        "size": "1024x1024",
        "output_format": "jpeg"
      }
    ],
    "usage": { "output_tokens": 4096, "total_tokens": 4096 }
  }
}
```

A layer decomposition task lists the base image and then each layer:

```json
{
  "data": [
    { "url": "https://static.seedrouter.ai/media/tasks/task_example/0.jpg", "size": "832x1248", "output_format": "jpeg", "z_index": 0 },
    {
      "url": "https://static.seedrouter.ai/media/tasks/task_example/1.png",
      "size": "527x1044",
      "output_format": "png",
      "z_index": 1,
      "name": "Ceramic coffee cup",
      "description": "White ceramic cup with a matte glaze, extracted without the table.",
      "bounding_box": { "absolute": [212, 418, 610, 1206], "normalized": [255, 335, 733, 966] }
    }
  ]
}
```

In our tests a `1K` image took about 35–55 seconds, and a `1K` layer decomposition that returned a base image plus 13 layers took about 140 seconds.

## Errors

Requests rejected before a task is created return an HTTP error with an `error` object and are not charged. A task that fails after acceptance returns HTTP 200 when queried, with `status: "failed"` and an `error` object.

See the [shared error catalog](https://seedrouter.ai/docs/api/errors) for codes, HTTP statuses, and retry guidance.

```json
{
  "id": "task_...",
  "model": "seedream-5-0-pro",
  "status": "failed",
  "error": {
    "code": 60001,
    "message": "The request was rejected by the content policy. Please revise the prompt or input images."
  }
}
```

If submission itself times out, check your tasks before submitting again: the first request may have been accepted.

## Tips

* Start at `1K` or `1.5K` to iterate; `1.5K` costs the same as `1K`.
* Name the shape in the prompt when you use a tier, or send exact pixels for a fixed layout.
* With several references, say what each one contributes and refer to them by order.
* Set `watermark: false` when you need a clean image; the default adds a mark.
* For layer decomposition, list the elements you want split out to keep the layer count small.

## Related

* [Seedream 5.0 Pro Playground and pricing](https://seedrouter.ai/models/seedream-5-0-pro)
* [Download OpenAPI](https://seedrouter.ai/docs/seedream-5-0-pro.openapi.json)
* [Copyable Markdown](https://seedrouter.ai/docs/seedream-5-0-pro.md)
