> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Seedream 5.0 Pro

> 通过 AnyFast 调用 ByteDance Seedream 5.0 Pro，支持高精度图片生成与编辑。

Seedream 5.0 Pro 是 ByteDance 面向高精度图片生成与编辑场景的图像模型，通过 AnyFast API 提供服务。它支持文生图、单图图生图、多参考图生图，以及需要明确位置或元素控制的局部编辑。

模型 ID 为 `doubao-seedream-5-0-pro`。

## 核心能力

* **文生图** — 根据文本提示词生成单张图片。
* **图生图** — 传入一张参考图，配合提示词进行编辑或重绘。
* **多参考图生成** — 最多传入 10 张参考图。
* **交互编辑** — 通过自然语言、标记区域、点位、框选、箭头或标注控制编辑位置。
* **原生多语种生成** — 支持俄语、阿拉伯语、菲律宾语、泰语、土耳其语、韩语、马来语、西班牙语、葡萄牙语、印尼语、法语、德语、越南语、日语等文字生成。
* **输出控制** — 通过 `size`、`response_format`、`output_format` 和 `watermark` 控制输出图片。

<Warning>
  Seedream 5.0 Pro 不支持组图生成、联网搜索和流式输出。调用该模型时不要依赖 `sequential_image_generation`、`sequential_image_generation_options`、`tools` 或 `stream`。
</Warning>

## 快速示例

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/v1/images/generations \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "doubao-seedream-5-0-pro",
      "prompt": "为智能音箱生成一张高端产品主视觉图，灯光精准，版式干净，包含日文和英文标签文字",
      "size": "2K",
      "output_format": "png",
      "watermark": false
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://www.anyfast.ai/v1/images/generations",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json",
      },
      json={
          "model": "doubao-seedream-5-0-pro",
          "prompt": "为智能音箱生成一张高端产品主视觉图，灯光精准，版式干净，包含日文和英文标签文字",
          "size": "2K",
          "output_format": "png",
          "watermark": False,
      },
  )

  print(response.json())
  ```
</CodeGroup>

## 图片编辑

`image` 可以传图片 URL、Base64 data URI，或图片 URL/data URI 数组。Seedream 5.0 Pro 最多支持 10 张参考图。

```bash cURL theme={null}
curl https://www.anyfast.ai/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-pro",
    "prompt": "编辑标记区域，添加一个带杯碟的陶瓷咖啡杯，移除草图线条，并保持原始构图。",
    "image": "https://example.com/marked-reference.png",
    "size": "2K",
    "output_format": "png",
    "watermark": false
  }'
```

如果需要坐标级编辑，可以在提示词中加入 `<point>` 或 `<bbox>` 标签，坐标对应目标图片区域。

```json theme={null}
{
  "model": "doubao-seedream-5-0-pro",
  "prompt": "将图 1 <bbox>179 283 796 986</bbox> 的主体放到图 2 <bbox>118 331 933 871</bbox> 位置。",
  "image": [
    "https://example.com/source.png",
    "https://example.com/target.png"
  ],
  "size": "2K",
  "output_format": "png"
}
```

## 输入图片限制

Seedream 5.0 Pro 遵循官方 Seedream 输入图片限制：

* 支持格式：`jpeg`、`png`、`webp`、`bmp`、`tiff`、`gif`、`heic`、`heif`。
* 单张图片大小不超过 `30 MB`。
* 宽高比范围为 `[1/16, 16]`。
* 宽和高均至少为 `14px`。
* 总像素不超过 `6000x6000 = 36,000,000 px`。
* 最多传入 10 张参考图。

## 参数

| 参数                        | 类型             | 是否必填 | 说明                                                             |
| ------------------------- | -------------- | ---- | -------------------------------------------------------------- |
| `model`                   | string         | 是    | 必须为 `doubao-seedream-5-0-pro`                                  |
| `prompt`                  | string         | 是    | 图片生成或编辑提示词。官方建议提示词不要过长，避免细节被分散。                                |
| `image`                   | string 或 array | 否    | 参考图 URL/Base64 data URI，或参考图数组。图片编辑时需要传入。最多 10 张参考图。           |
| `size`                    | string         | 否    | 输出尺寸。可传 `1K`、`2K`，也可传 `2048x1024` 这类像素尺寸。像素尺寸需要满足官方总像素和宽高比限制。  |
| `response_format`         | string         | 否    | `url` 或 `b64_json`。默认 `url`。URL 为临时链接，请及时保存。                   |
| `output_format`           | string         | 否    | `png` 或 `jpeg`。默认 `jpeg`。                                      |
| `watermark`               | boolean        | 否    | 是否添加 AI 生成水印。官方默认 `true`，传 `false` 可关闭。                        |
| `optimize_prompt_options` | object         | 否    | 提示词优化配置。使用 `mode: "standard"`。官方文档说明 Seedream 5.0 Pro 不支持快速模式。 |

## 尺寸说明

Seedream 5.0 Pro 支持两种尺寸写法：

* 分辨率档位：`1K`、`2K`。使用档位时，可在提示词中描述宽高比。
* 指定像素：`widthxheight`，例如 `2048x1024`。官方总像素范围为 `1280x720` 到 `2048x2048x1.1025`，宽高比范围为 `[1/16, 16]`。

<Card title="API Reference" icon="code" href="/zh/api-reference/model-api/bytedance/doubao-seedream-5-0-pro">
  查看 Seedream 5.0 Pro 的交互式 API 调试页。
</Card>

<script src="/feedback.js" />
