Files
membank/.trae/skills/image-tools/references/doubao-api-reference.md
12600k-rog-d4 3688e40383 修正image-tools技能并新增NAS U盘主图素材
- 清理万相相关内容(SKILL.md、wan_image_edit.py),仅保留豆包Seedream
- 修正豆包万相误称,明确为火山引擎豆包Seedream
- 新增文字渲染技巧章节(双引号包裹、逐字拼写、清晰度约束)
- 更新doubao-api-reference.md模型ID和参数说明
- 新增产品/NAS U盘目录(实拍图、主图、产品名称)
- 清理旧的nascab目录冗余图片和脚本
2026-07-06 07:48:03 +08:00

100 lines
2.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 火山引擎 Ark 图像生成 API 参考
> 本文档描述字节跳动/火山引擎的豆包 Seedream 模型 API。
> 阿里云万相Wan是不同厂商的产品参见万相相关文档。
## 端点
`POST https://ark.cn-beijing.volces.com/api/v3/images/generations`
## 认证
```
Authorization: Bearer ark-119a37ed-f123-42fc-aea6-b38d47d47fc0-f7ddf
```
## 响应格式
### 成功响应 (response_format: "url")
```json
{
"created": 1234567890,
"data": [
{
"url": "https://...",
"revision": 0
}
]
}
```
### 成功响应 (response_format: "b64_json")
```json
{
"created": 1234567890,
"data": [
{
"b64_json": "...",
"revision": 0
}
]
}
```
### 错误响应
```json
{
"error": {
"code": "invalid_request_error",
"message": "..."
}
}
```
## 可用模型
| Model ID | 能力 | 最大尺寸 | 备注 |
|---|---|---|---|
| `doubao-seedream-5-0-260128` | 文生图、图生图、多图融合、编辑、批量、联网搜索 | 3K | **默认推荐** |
| `doubao-seedream-5-0-lite-260128` | 文生图、批量、联网搜索 | 3K | 轻量版,速度更快 |
| `doubao-seedream-4-5-251128` | 文生图、图生图、多图融合 | 4K | 高质量 |
| `doubao-seedream-4-0-250828` | 文生图、图生图、多图融合 | 4K | 稳定版 |
| `doubao-seededit-3-0-i2i` | 精确图片编辑 (seed/guidance_scale) | adaptive | **当前API Key无权限** |
> ⚠️ `doubao-seededit-3-0-i2i` 精确编辑模型在当前 API Key 下返回 404暂不可用。
## 图片输入格式
- **URL**: 公网可访问的 HTTP/HTTPS URL
- **Base64**: `data:image/<format>;base64,<encoded_data>`
- 格式必须小写: `data:image/png;base64,...`(不是 `PNG`
- 支持格式: png, jpeg, jpg, webp, bmp, tiff, gif
- 文件大小: 不超过 10MB
- 总像素: ≤ 6000×6000
- 宽高比: [1/16, 16]
## 尺寸约束
### 方式1分辨率别名
- `2K`(默认)、`3K`仅5.0)、`4K`4.5/4.0
- 需在 prompt 中描述宽高比/形状/用途,由模型判断具体像素
### 方式2精确像素
- 格式: `"WIDTHxHEIGHT"`(如 `"2048x2048"`
- 总像素范围: [3686400, 16777216](即最小约 2560×1440
- 宽高比范围: [1/16, 16]
- 每个维度: [1280, 4096]
> ⚠️ 两种方式不可混用
## image 参数说明
- 类型: `string[]`URL或Base64数组
- 最多 **10** 张参考图
- 输入图 + 输出图总数 ≤ 15
- prompt 中用"图1""图2"等指代图片顺序
- **重要**: image 传入的是参考图,模型会根据 prompt 重新生成不能100%像素级保留原图产品外观