> ## 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

> 通过 AnyFast 调用 ByteDance Seedream 5.0，支持文生图、图生图和连续生成。

Seedream 5.0 是 ByteDance Seedream 系列的图片生成模型，通过 AnyFast API 提供服务。模型 ID 为 `doubao-seedream-5-0-260128`。

## 核心能力

* **文生图** — 根据文本提示词生成图片
* **图生图** — 使用一张或多张参考图生成新图片
* **连续生成** — 单次请求生成多张相关图片
* **输出控制** — 支持尺寸、随机种子、水印和 Logo 配置

<Tabs>
  <Tab title="文生图">
    ## 快速示例

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/images/generations \
      -H "Authorization: Bearer <token>" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "doubao-seedream-5-0-260128",
        "prompt": "日出时分宁静的山景，山谷间弥漫薄雾",
        "size": "1024x1024",
        "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-260128",
            "prompt": "日出时分宁静的山景，山谷间弥漫薄雾",
            "size": "1024x1024",
            "watermark": False,
        },
    )

    print(response.json())
    ```

    ## 参数

    | 参数          | 类型      | 必填 | 说明                               |
    | ----------- | ------- | -- | -------------------------------- |
    | `model`     | string  | 是  | 固定为 `doubao-seedream-5-0-260128` |
    | `prompt`    | string  | 是  | 图片生成提示词                          |
    | `size`      | string  | 否  | 如 `1024x1024`、`2K`               |
    | `watermark` | boolean | 否  | 是否添加水印                           |
    | `seed`      | integer | 否  | 随机种子                             |
    | `logo_info` | object  | 否  | Logo 配置                          |
  </Tab>

  <Tab title="图生图">
    ## 快速示例

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/v1/images/generations \
      -H "Authorization: Bearer <token>" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "doubao-seedream-5-0-260128",
        "prompt": "结合两张参考图生成一组游乐园电影分镜",
        "image": [
          "https://example.com/ref1.png",
          "https://example.com/ref2.png"
        ],
        "sequential_image_generation": "auto",
        "sequential_image_generation_options": { "max_images": 3 },
        "size": "2K",
        "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-260128",
            "prompt": "生成女孩和奶牛玩偶在早晨、中午和夜晚乘坐过山车的连贯图片",
            "image": [
                "https://example.com/ref1.png",
                "https://example.com/ref2.png",
            ],
            "sequential_image_generation": "auto",
            "sequential_image_generation_options": {"max_images": 3},
            "size": "2K",
            "watermark": False,
        },
    )

    print(response.json())
    ```

    <Warning>
      使用外部图片 URL 时，如果上游下载图片耗时超过 10 秒，请求可能因超时失败。建议使用加载稳定的 CDN，或通过 Base64 data URI 传入较大图片。
    </Warning>

    ## 参数

    | 参数                                               | 类型      | 必填 | 说明                               |
    | ------------------------------------------------ | ------- | -- | -------------------------------- |
    | `model`                                          | string  | 是  | 固定为 `doubao-seedream-5-0-260128` |
    | `prompt`                                         | string  | 是  | 图片生成或编辑提示词                       |
    | `image`                                          | array   | 是  | 参考图片 URL 或 Base64 data URI 数组    |
    | `sequential_image_generation`                    | string  | 否  | 设为 `auto` 开启连续生成                 |
    | `sequential_image_generation_options.max_images` | integer | 否  | 最大生成图片数量                         |
    | `size`                                           | string  | 否  | 如 `1024x1024`、`2K`               |
    | `watermark`                                      | boolean | 否  | 是否添加水印                           |
    | `seed`                                           | integer | 否  | 随机种子                             |
    | `logo_info`                                      | object  | 否  | Logo 配置                          |
  </Tab>
</Tabs>

<Card title="API 参考" icon="code" href="/zh/api-reference/model-api/bytedance/doubao-seedream-5-0-260128">
  查看 Seedream 5.0 文生图和图生图 API。
</Card>

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