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

# Seedream

官方参考文档：[火山方舟-图片生成 API](https://docs.volcengine.com/docs/ark/image-generation-api?lang=zh)

参数及使用方式已对齐官方，详细参数可直接参考官方文档。

## 一、支持模型

| 模型 |
| - |
| `doubao-seedream-5-0-pro-260628` |
| `doubao-seedream-5-0-flash-260915` |
| `doubao-seedream-5-5-261028` |

## 二、图片生成 API

```
POST https://{api_domain}/v3/bytedance-cn/api/v3/images/generations
```

### 文生图

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/bytedance-cn/api/v3/images/generations' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "一只戴着红色围巾的金毛犬，在雪山湖边的自然光下，电影感摄影",
    "size": "2K",
    "response_format": "url",
    "watermark": false
  }'
```

### 多图融合

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/bytedance-cn/api/v3/images/generations' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-0-flash-260915",
    "prompt": "将图1中的人物换上图2中的服装，放在城市夜景中，保持人物特征一致",
    "image": [
      "https://example.com/person.png",
      "https://example.com/outfit.png"
    ],
    "size": "2048x1152",
    "response_format": "url"
  }'
```

### 图层拆分

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/bytedance-cn/api/v3/images/generations' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "把人物、背景和标题文字拆成独立图层",
    "image": "https://example.com/poster.png",
    "layer_decomposition": true,
    "layer_decomposition_options": {
      "max_images": 30,
      "text_recognition": true
    },
    "size": "auto"
  }'
```

### 透明背景

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/bytedance-cn/api/v3/images/generations' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "doubao-seedream-5-5-261028",
    "prompt": "一只玻璃质感的蓝色小鸟，透明背景",
    "background": "transparent",
    "output_format": "png",
    "size": "2K",
    "response_format": "url"
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.