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

# 豆包 Seedream

> 使用豆包 Seedream 系列模型进行图像生成，客户端继续使用 OpenAI Images 兼容协议

> 更新日期：2026-06-06

# 豆包 Seedream

```
POST /v1/images/generations
```

Crazyrouter 当前对外以 OpenAI Images 兼容协议开放 `Seedream` 系列图片模型。客户继续使用统一的 `/v1/images/generations`；字节官方与其他第三方渠道只作为内部 provider，不单独暴露客户协议。

## 当前开放模型

| 模型                    | 官方对应              | 当前对客能力            | 文档状态   |
| --------------------- | ----------------- | ----------------- | ------ |
| `doubao-seedream-4-0` | Seedream 4.0      | 文生图、图生图、多参考图、组图输出 | Beta   |
| `doubao-seedream-4-5` | Seedream 4.5      | 文生图、图生图、多参考图、组图输出 | Beta   |
| `doubao-seedream-5-0` | Seedream 5.0 lite | 文生图、图生图、多参考图、组图输出 | Beta   |
| `doubao-seedream-5-0` | Seedream 3.0      | 兼容保留              | Legacy |

<Note>
  这里的“Beta”含义是：客户协议与官方能力定义已经对齐，但当前生产承载与实测 artifact 仍在继续补齐。官方能力先按完整形态写出，未闭环部分保留 Beta 标记。
</Note>

## 客户协议

### 请求参数

| 参数                            | 类型                 | 必填 | 说明                                                                |
| ----------------------------- | ------------------ | -- | ----------------------------------------------------------------- |
| `model`                       | string             | 是  | `doubao-seedream-4-0`、`doubao-seedream-4-5`、`doubao-seedream-5-0` |
| `prompt`                      | string             | 是  | 生成提示词                                                             |
| `image_input`                 | string 或 string\[] | 否  | 参考图 URL，官方 4.0 / 4.5 / 5.0 lite 当前能力上限为 `14` 张                    |
| `size`                        | string             | 否  | 输出尺寸。`Seedream 4.5` 官方支持 `2K`、`4K`，以及范围内的显式宽高                     |
| `n`                           | integer            | 否  | 输出张数，默认 `1`                                                       |
| `response_format`             | string             | 否  | `url` 或 `b64_json`                                                |
| `watermark`                   | boolean            | 否  | 是否加水印                                                             |
| `sequential_image_generation` | string             | 否  | `auto` 或 `disabled`；用于组图输出与串联生成语义                                 |
| `optimize_prompt_options`     | object             | 否  | 官方提示词优化选项；当前 `Seedream 4.5` 与 `5.0 lite` 仅确认 `mode: "standard"`   |

### 参考图边界

* `Seedream 4.0`、`4.5`、`5.0 lite` 官方支持最多 `14` 张参考图
* 单张参考图最大 `10MB`
* 官方支持的输入格式扩展到 `jpeg`、`png`、`webp`、`bmp`、`tiff`、`gif`
* 官方支持的输入图宽高比范围为 `1/16` 到 `16`

### 请求示例

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.crazyrouter.com/v1/images/generations \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{
      "model": "doubao-seedream-4-5",
      "prompt": "一张高级感产品海报，主体是一只透明玻璃香水瓶，晨雾光线，简洁中文标题",
      "size": "2K",
      "n": 1,
      "response_format": "url",
      "watermark": false,
      "optimize_prompt_options": {
        "mode": "standard"
      }
    }'
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.crazyrouter.com/v1/images/generations \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{
      "model": "doubao-seedream-4-5",
      "prompt": "基于这些参考图生成同一角色的一组商品海报，保持主体一致但镜头和布局不同",
      "image_input": [
        "https://example.com/ref-1.png",
        "https://example.com/ref-2.png"
      ],
      "size": "2K",
      "sequential_image_generation": "auto",
      "response_format": "url",
      "optimize_prompt_options": {
        "mode": "standard"
      }
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_API_KEY",
      base_url="https://api.crazyrouter.com/v1"
  )

  response = client.images.generate(
      model="doubao-seedream-4-5",
      prompt="一张高级感产品海报，主体是一只透明玻璃香水瓶，晨雾光线，简洁中文标题",
      size="2K",
      n=1
  )

  print(response.data[0].url)
  ```
</CodeGroup>

### 响应示例

```json theme={null}
{
  "created": 1709123456,
  "data": [
    {
      "url": "https://crazyrouter.com/files/seedream_image_abc123.png"
    }
  ]
}
```

## 官方计费口径

当前已确认的官方真值是“按成功生成图片张数计费”，不是输入/输出 token 计费展示。

| 模型                    | 官方口径 | 官方单价        | 当前文档状态 |
| --------------------- | ---- | ----------- | ------ |
| `doubao-seedream-4-0` | 按图   | `$0.03 / 图` | 已对齐官方  |
| `doubao-seedream-4-5` | 按图   | `$0.04 / 图` | 已对齐官方  |
| `doubao-seedream-5-0` | 按图   | 待补官方正式价格    | Beta   |

## 对齐说明

* 客户协议已收口到统一的 `/v1/images/generations`
* `Seedream 4.5` 官方尺寸能力当前以 `2K`、`4K` 为主，默认 `2048x2048`
* `Seedream 4.5` 与 `5.0 lite` 的 `optimize_prompt_options.mode` 当前只按 `standard` 对齐；`fast` 不作为当前对客承诺
* `Seedream 3.0` 继续保留兼容别名，但本页的官方对齐重点已经切换到 `4.0 / 4.5 / 5.0 lite`
