# Seedream 5.0 Pro (https://wanapi.app/docs/seedream-5-0-pro)





Seedream 5.0 Pro generates one image from a prompt, edits or combines up to 10 reference images, and splits one image into a base image plus up to 16 transparent layers. Output is 1K, 1.5K, 2K or an exact pixel size. [Model details and Playground](/models/seedream-5-0-pro).

## Connect to Wan API [#connect-to-wan-api]

Use `https://api.wanapi.app` as the API base URL. Create a key with the **Wan** model family in [API key settings](/settings/apikeys) and send it as `Authorization: Bearer YOUR_API_KEY`. Keep keys on your server. The Playground uses your website session and charges the same account balance.

`GET /v1/models` lists the models available to your key. Seedream 5.0 Pro uses the OpenAI Images API: `POST /v1/images/generations` with JSON, or `POST /v1/images/edits` with JSON or multipart uploads. The request returns when the image is ready; there is no task to poll.

| Setting  | Seedream 5.0 Pro                                                                                                     |
| -------- | -------------------------------------------------------------------------------------------------------------------- |
| Model ID | `bytedance/seedream-5.0-pro`                                                                                         |
| `size`   | `1K`, `1.5K`, `2K` (default), or `WIDTHxHEIGHT` with 921,600–4,624,220 pixels and an aspect ratio from 1:16 to 16:1. |
| `image`  | Up to 10 reference images.                                                                                           |
| Output   | One image per request, or one base image plus up to 16 layers with `layer_decomposition`.                            |

## Generate an image [#generate-an-image]

Set `WAN_API_KEY` to your key on the server. Send the request once; generation usually finishes within a minute, so allow a client timeout of at least four minutes.

```bash
curl https://api.wanapi.app/v1/images/generations \
  -H "Authorization: Bearer $WAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "bytedance/seedream-5.0-pro",
  "prompt": "A minimalist magazine cover: a red fox in fresh snow at dawn, the bold serif title \"QUIET WILD\" across the top",
  "size": "1K"
}'
```

The response follows the OpenAI Images format. Example values are illustrative:

```json
{
  "created": 1792022400,
  "data": [
    {
      "url": "https://cdn.example.com/image-1.jpg",
      "size": "1024x1024",
      "output_format": "jpeg"
    }
  ],
  "usage": {
    "generated_images": 1
  }
}
```

Image URLs remain available for 30 days. Store the files yourself if you need them longer. Send `"response_format": "b64_json"` to also receive each image as Base64 in `b64_json`.

## Seedream 5.0 Pro pricing [#seedream-50-pro-pricing]

Each generated image is billed per image for its pixel size, at 30% below the official rate: up to 2.61 million pixels (1K and 1.5K) uses the lower rate, larger images the higher rate. The first reference image is free; each additional reference image adds the reference rate. A request rejected before an image is generated is not charged.

<SeedreamModelPricing />

Layer decomposition bills the base image and every returned layer. When every returned image is up to 2.61 million pixels, each costs 30% below the official layer rate. When any returned image is larger, which is always the case at `2K`, every image is charged at the official layer rate for its own size. Your balance must cover the maximum of 17 images; you pay only for the images returned.

## Request fields [#request-fields]

Send a JSON object. `model` is required; `prompt` is required unless `layer_decomposition` is `true`. Unknown fields are rejected.

| Field                     | Type                | Contract                                                                                                                                                                                                  |
| ------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`                   | string              | Required: `bytedance/seedream-5.0-pro`.                                                                                                                                                                   |
| `prompt`                  | string              | What to generate, or which elements to separate in layer decomposition. Supports English, Chinese and other languages; keeping it under about 600 English words gives the best results.                   |
| `image`                   | string or string\[] | Up to 10 reference images as HTTP(S) URLs or `data:image/<format>;base64,...` with a lowercase format. Formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF; up to 30 MB each; aspect ratio 1:16 to 16:1. |
| `size`                    | string              | Image generation: `1K`, `1.5K`, `2K` (default) or `WIDTHxHEIGHT`. Layer decomposition: `1K`, `1.5K`, `2K` or `auto` (default).                                                                            |
| `layer_decomposition`     | boolean             | Default `false`. `true` splits exactly one PNG or JPEG image into a base image and up to 16 layers.                                                                                                       |
| `optimize_prompt_options` | object              | `{"mode": "standard"}` (default) or `{"mode": "fast"}`. Fast shortens generation time with slightly lower quality.                                                                                        |
| `output_format`           | string              | `jpeg` (default) or `png`. In layer decomposition it sets the base image format; layers are always PNG.                                                                                                   |
| `background`              | string              | `opaque` (default) or `transparent`. Transparent needs exactly one input image with an alpha channel and PNG output; it cannot be combined with layer decomposition.                                      |
| `watermark`               | boolean             | Default `true`: adds a small AI-generated label. Send `false` to remove it.                                                                                                                               |
| `nsfw_checker`            | boolean             | Default `true` keeps content checking on. `false` sends the request without that check; the price is the same.                                                                                            |
| `response_format`         | string              | `url` (default) or `b64_json`.                                                                                                                                                                            |
| `n`                       | integer             | Optional; must be `1`.                                                                                                                                                                                    |

`stream`, `sequential_image_generation`, `tools`, `seed`, `guidance_scale` and `mask` are not supported by this model and are rejected.

## Edit and combine reference images [#edit-and-combine-reference-images]

Pass one image with an edit instruction, or several images to combine:

```json
{
  "model": "bytedance/seedream-5.0-pro",
  "prompt": "Place the perfume bottle from image 1 on the marble table from image 2, soft window light",
  "image": [
    "https://example.com/bottle.png",
    "https://example.com/table.jpg"
  ],
  "size": "2K",
  "output_format": "png"
}
```

`POST /v1/images/edits` accepts the same fields. With multipart, upload files in `image` or `image[]` fields and send `optimize_prompt_options` as a JSON string.

## Layer decomposition [#layer-decomposition]

```json
{
  "model": "bytedance/seedream-5.0-pro",
  "prompt": "Separate the title text, the parrot and the background",
  "image": "https://example.com/poster.png",
  "layer_decomposition": true,
  "size": "2K"
}
```

The response lists the base image first. Each layer adds its stacking order, position and description:

```json
{
  "created": 1792022400,
  "data": [
    { "url": "https://cdn.example.com/image-1.jpg", "size": "2048x2048", "output_format": "jpeg", "z_index": 0 },
    {
      "url": "https://cdn.example.com/image-2.png",
      "size": "1273x265",
      "output_format": "png",
      "z_index": 1,
      "bounding_box": { "absolute": [383, 120, 1655, 384], "normalized": [187, 59, 808, 188] },
      "name": "Title text",
      "description": "Yellow serif title text"
    }
  ],
  "usage": { "input_images": 1, "generated_images": 2 }
}
```

If any layer fails, the whole request fails. If the prompt asks for more layers than the limit, some layer content may be dropped.

## Errors [#errors]

Errors use the OpenAI error envelope `{"error": {"message", "type", "code"}}`.

| HTTP | `code`                                    | Meaning                                                                                                     |
| ---- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| 400  | `invalid_request` or a validation message | A field or combination is not supported. Fix the request; nothing was charged.                              |
| 400  | `content_policy_violation`                | The prompt, an input image or the output was rejected by the content policy. Nothing was charged.           |
| 402  | insufficient quota                        | Add balance before sending again.                                                                           |
| 429  | `rate_limited`                            | Too many requests. Retry later.                                                                             |
| 502  | `submission_unknown`                      | The result was not received and the request was not charged. Check your usage logs before sending it again. |
| 503  | `upstream_unavailable`                    | Image generation is temporarily unavailable; the request was not charged.                                   |

Never retry a request automatically after a timeout without checking your usage logs first.
