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

# 豆包 Seedream 生图参考

> 字节跳动豆包 Seedream 4.0/4.5/5.0 高清图像生成与多图融合

## 取消任务

`DELETE /volc/v1/contents/generations/tasks/{task_id}`

取消尚未完成的视频生成任务。

### 请求参数 (Query / Path)

<ParamField path="task_id" type="string" required>
  异步任务 ID
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl -X DELETE "https://socialvision.tisyk.xyz/volc/v1/contents/generations/tasks/{task_id}" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "status": "succeed"
  },
  "message": "success"
}
```

***

## doubao-2.0 查询视频生成任务 API

`GET /api/v3/contents/generations/tasks/{id}`

[https://www.volcengine.com/docs/82379/1521309?lang=zh](https://www.volcengine.com/docs/82379/1521309?lang=zh)

### 请求参数 (Query / Path)

<ParamField path="id" type="string" required>
  路径中的资源 / 任务 ID
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/api/v3/contents/generations/tasks/{id}" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "content": {
    "video_url": "https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/doubao-seedance-2-0/02177831701906400000000000000000000ffffac1778adc6a32f.mp4?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260509%2Fcn-beijing%2Ftos%2Frequest&X-Tos-Date=20260509T090109Z&X-Tos-Expires=86400&X-Tos-Signature=699d4a345c3573c9b86f2f145db21c00bfd32d7f8d1fe0bbe499ce54d92a0af5&X-Tos-SignedHeaders=host"
  },
  "created_at": 1778317019,
  "draft": false,
  "duration": 10,
  "execution_expires_after": 172800,
  "framespersecond": 24,
  "generate_audio": true,
  "id": "cgt-20260509165650-6rxbv",
  "model": "doubao-seedance-2-0-260128",
  "ratio": "1:1",
  "resolution": "720p",
  "seed": 70882,
  "service_tier": "default",
  "status": "succeeded",
  "updated_at": 1778317294,
  "usage": {
    "completion_tokens": 216900,
    "total_tokens": 216900
  }
}
```

***

## doubao-2.0 查询视频生成任务列表

`GET /api/v3/contents/generations/tasks`

[https://www.volcengine.com/docs/82379/1521675?lang=zh](https://www.volcengine.com/docs/82379/1521675?lang=zh)

### 请求参数 (Query / Path)

<ParamField query="page_size" type="string">
  每页条数
</ParamField>

<ParamField query="filter.status" type="string">
  按状态过滤
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/api/v3/contents/generations/tasks" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "status": "succeed"
  },
  "message": "success"
}
```

***

## 查询单个任务

`GET /volc/v1/contents/generations/tasks/{task_id}`

根据 task\_id 查询单个视频生成任务的状态与结果。

### 请求参数 (Query / Path)

<ParamField path="task_id" type="string" required>
  异步任务 ID
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/volc/v1/contents/generations/tasks/{task_id}" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "status": "succeed"
  },
  "message": "success"
}
```

***

## 查询任务列表

`GET /volc/v1/contents/generations/tasks`

分页查询任务列表。

### 请求参数 (Query / Path)

<ParamField query="page_size" type="integer">
  每页条数
</ParamField>

### 请求示例 (cURL)

```bash theme={null}
curl "https://socialvision.tisyk.xyz/volc/v1/contents/generations/tasks" \
  -H "Authorization: Bearer sk-YOUR_API_KEY"
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "status": "succeed"
  },
  "message": "success"
}
```

***

## 创建视频生成任务 API（doubao-2.0)

`POST /api/v3/contents/generations/tasks`

Seedance 2.0 官方视频生成协议（`/api/v3/contents/generations/tasks`）。本路径亦在 seedance router 注册；与旧版 `/volc/v1/*` 豆包路由并存。`content` 数组项按 `type` 区分：`text` 仅需 `text` 字段，`image_url`/`video_url`/`audio_url` 需对应 URL 对象与 `role`。

[https://www.volcengine.com/docs/82379/1520757?lang=zh](https://www.volcengine.com/docs/82379/1520757?lang=zh)

### 请求体参数 (Body)

<ParamField body="content" type="array" required>
  内容数组；按 `type` 区分：`text` 仅需 `text`，`image_url`/`video_url`/`audio_url` 需对应 URL 与 `role`。
</ParamField>

<ParamField body="duration" type="integer">
  时长（秒或平台约定单位）
</ParamField>

<ParamField body="generate_audio" type="boolean">
  是否生成音频
</ParamField>

<ParamField body="model" type="string" required>
  模型名称 / 型号 ID
</ParamField>

<ParamField body="ratio" type="string">
  宽高比或分辨率比例
</ParamField>

<ParamField body="watermark" type="boolean">
  是否添加水印
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "content": [
    {
      "text": "全程使用视频1的第一视角构图，全程使用音频1作为背景音乐。第一人称视角果茶宣传广告，seedance牌「苹苹安安」苹果果茶限定款；首帧为图片1，你的手摘下一颗带晨露的阿克苏红苹果，轻脆的苹果碰撞声；2-4 秒：快速切镜，你的手将苹果块投入雪克杯，加入冰块与茶底，用力摇晃，冰块碰撞声与摇晃声卡点轻快鼓点，背景音：「鲜切现摇」；4-6 秒：第一人称成品特写，分层果茶倒入透明杯，你的手轻挤奶盖在顶部铺展，在杯身贴上粉红包标，镜头拉近看奶盖与果茶的分层纹理；6-8 秒：第一人称手持举杯，你将图片2中的果茶举到镜头前（模拟递到观众面前的视角），杯身标签清晰可见，背景音「来一口鲜爽」，尾帧定格为图片2。背景声音统一为女生音色。",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic1.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "image_url": {
        "url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic2.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "role": "reference_video",
      "type": "video_url",
      "video_url": {
        "url": "https://pro.filesystem.site/cdn/20260403/0e80a635b859e7716671a40d836135.mp4"
      }
    },
    {
      "audio_url": {
        "url": "https://ark-project.tos-cn-beijing.volces.com/doc_audio/r2v_tea_audio1.mp3"
      },
      "role": "reference_audio",
      "type": "audio_url"
    }
  ],
  "duration": 11,
  "generate_audio": true,
  "model": "doubao-seedance-2-0-260128",
  "ratio": "21:9",
  "watermark": false
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/api/v3/contents/generations/tasks" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "content": [
    {
      "text": "全程使用视频1的第一视角构图，全程使用音频1作为背景音乐。第一人称视角果茶宣传广告，seedance牌「苹苹安安」苹果果茶限定款；首帧为图片1，你的手摘下一颗带晨露的阿克苏红苹果，轻脆的苹果碰撞声；2-4 秒：快速切镜，你的手将苹果块投入雪克杯，加入冰块与茶底，用力摇晃，冰块碰撞声与摇晃声卡点轻快鼓点，背景音：「鲜切现摇」；4-6 秒：第一人称成品特写，分层果茶倒入透明杯，你的手轻挤奶盖在顶部铺展，在杯身贴上粉红包标，镜头拉近看奶盖与果茶的分层纹理；6-8 秒：第一人称手持举杯，你将图片2中的果茶举到镜头前（模拟递到观众面前的视角），杯身标签清晰可见，背景音「来一口鲜爽」，尾帧定格为图片2。背景声音统一为女生音色。",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic1.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "image_url": {
        "url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic2.jpg"
      },
      "role": "reference_image",
      "type": "image_url"
    },
    {
      "role": "reference_video",
      "type": "video_url",
      "video_url": {
        "url": "https://pro.filesystem.site/cdn/20260403/0e80a635b859e7716671a40d836135.mp4"
      }
    },
    {
      "audio_url": {
        "url": "https://ark-project.tos-cn-beijing.volces.com/doc_audio/r2v_tea_audio1.mp3"
      },
      "role": "reference_audio",
      "type": "audio_url"
    }
  ],
  "duration": 11,
  "generate_audio": true,
  "model": "doubao-seedance-2-0-260128",
  "ratio": "21:9",
  "watermark": false
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "task_id": "task_example_001"
  },
  "message": "success"
}
```

***

## Seedream 5.0 Pro

`POST /api/v3/images/generations`

### 请求体参数 (Body)

<ParamField body="guidance_scale" type="number">
  与 prompt 的一致程度，范围 \[1, 10]
</ParamField>

<ParamField body="image" type="any">
  参考图（官方字段）。单张 URL 字符串，或多张 URL 数组（交互编辑/图生图，最多约 10 张）
</ParamField>

<ParamField body="images" type="any">
  兼容字段；网关会归一到 image。与 image 二选一即可
</ParamField>

<ParamField body="model" type="string" required>
  模型名称
</ParamField>

<ParamField body="n" type="integer">
  生成张数，Pro 通常为 1
</ParamField>

<ParamField body="optimize_prompt_options" type="object">
  提示词优化配置
</ParamField>

<ParamField body="output_format" type="string">
  图片文件格式
</ParamField>

<ParamField body="prompt" type="string" required>
  生成/编辑提示词
</ParamField>

<ParamField body="response_format" type="string">
  返回形态
</ParamField>

<ParamField body="seed" type="integer">
  随机种子，范围 \[-1, 2147483647]，默认 -1
</ParamField>

<ParamField body="size" type="string">
  分辨率档或像素尺寸。常用 1K/2K；也支持如 1024x1024、2048x2048、2816x1584 等。空值按高档计费
</ParamField>

<ParamField body="watermark" type="boolean">
  是否添加水印
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "model": "doubao-seedream-5-0-pro-260628",
  "prompt": "一只猫",
  "response_format": "url",
  "size": "2K",
  "watermark": false
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/api/v3/images/generations" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "doubao-seedream-5-0-pro-260628",
  "prompt": "一只猫",
  "response_format": "url",
  "size": "2K",
  "watermark": false
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "code": 0,
  "data": {
    "task_id": "task_example_001"
  },
  "message": "success"
}
```

***

## 创建视频生成任务

`POST /volc/v1/contents/generations/tasks`

提交 Seedance/豆包视频生成任务。

### 请求体参数 (Body)

<ParamField body="callback_url" type="string">
  任务完成回调 URL
</ParamField>

<ParamField body="content" type="array" required>
  文本/图片内容数组
</ParamField>

<ParamField body="model" type="string" required>
  模型名称
</ParamField>

### 请求示例 (JSON)

```json theme={null}
{
  "content": [
    {
      "text": "女孩抱着狐狸，女孩睁开眼，温柔地看向镜头，狐狸友善地抱着，镜头缓缓拉出，女孩的头发被风吹动，可以听到风声",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/i2v_foxrgirl.png"
      },
      "type": "image_url"
    }
  ],
  "duration": 4,
  "model": "doubao-seedance-1-5-pro-251215",
  "ratio": "adaptive",
  "watermark": false
}
```

### 请求示例 (cURL)

```bash theme={null}
curl -X POST "https://socialvision.tisyk.xyz/volc/v1/contents/generations/tasks" \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "content": [
    {
      "text": "女孩抱着狐狸，女孩睁开眼，温柔地看向镜头，狐狸友善地抱着，镜头缓缓拉出，女孩的头发被风吹动，可以听到风声",
      "type": "text"
    },
    {
      "image_url": {
        "url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/i2v_foxrgirl.png"
      },
      "type": "image_url"
    }
  ],
  "duration": 4,
  "model": "doubao-seedance-1-5-pro-251215",
  "ratio": "adaptive",
  "watermark": false
}'
```

### 响应示例 (200 OK)

```json theme={null}
{
  "id": "cgt-20250918170228-dw9rb",
  "status": "submitted"
}
```

***


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