doubao-seedream-4-5-251128 单图转多图
在 Header 中添加 Authorization: Bearer YOUR_API_KEY。
使用 doubao-seedream-4-5-251128 进行单图转多图。参考图放在 JSON image 字段;多图输出使用 sequential_image_generation,不使用 GPT Image 的 n、quality 或 format。
协议参考:官方 API 文档。模型 ID 与网关地址使用 apizt 当前目录公布的值。
请求参数
doubao-seedream-4-5-251128auto 让模型按提示词生成关联组图;disabled 关闭组图。max_images 为最大生成数;示例设置为 3,实际张数由模型决定。url 或 b64_json。{
"model": "doubao-seedream-4-5-251128",
"prompt": "结合参考图中的主体,生成三张具有不同场景的连续插画",
"image": "https://example.com/reference.png",
"sequential_image_generation": "auto",
"sequential_image_generation_options": {
"max_images": 3
}
}请求示例代码
curl --request POST 'https://api.apizt.com/v1/images/generations' \
--header "Authorization: Bearer $tokenba_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "doubao-seedream-4-5-251128",
"prompt": "结合参考图中的主体,生成三张具有不同场景的连续插画",
"image": "https://example.com/reference.png",
"sequential_image_generation": "auto",
"sequential_image_generation_options": {
"max_images": 3
}
}'(async () => {
const response = await fetch("https://api.apizt.com/v1/images/generations", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.tokenba_API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "doubao-seedream-4-5-251128",
"prompt": "结合参考图中的主体,生成三张具有不同场景的连续插画",
"image": "https://example.com/reference.png",
"sequential_image_generation": "auto",
"sequential_image_generation_options": {
"max_images": 3
}
})
});
console.log(response.status, await response.text());
})().catch(console.error);import os
import requests
response = requests.post(
'https://api.apizt.com/v1/images/generations',
headers={"Authorization": "Bearer " + os.environ["tokenba_API_KEY"]},
json={'model': 'doubao-seedream-4-5-251128', 'prompt': '结合参考图中的主体,生成三张具有不同场景的连续插画', 'image': 'https://example.com/reference.png', 'sequential_image_generation': 'auto', 'sequential_image_generation_options': {'max_images': 3}},
timeout=600,
)
response.raise_for_status()
print(response.json())POST https://api.apizt.com/v1/images/generations HTTP/1.1
Authorization: Bearer {{tokenba_API_KEY}}
Content-Type: application/json
{
"model": "doubao-seedream-4-5-251128",
"prompt": "结合参考图中的主体,生成三张具有不同场景的连续插画",
"image": "https://example.com/reference.png",
"sequential_image_generation": "auto",
"sequential_image_generation_options": {
"max_images": 3
}
}返回响应
以下为协议结构示意,时间与结果为占位值,不是实际调用记录。
{
"created": 1760000000,
"data": [
{
"url": "https://example.com/generated-image.png"
}
]
}示例先设置环境变量 tokenba_API_KEY。JavaScript 使用 Node.js 20+,Python 安装 requests。文件名和示例图片地址请替换为自己的值。
当前模型与版本
依据 apizt 价格页,同步于 。以下型号按目录声明的协议与本页用途筛选;不代表所有参数和功能通用。切换前请核对型号说明、令牌分组与参数差异。Gemini 原生接口需同时替换 URL 中的模型 ID。
| 模型 ID | 能力标签 | 支持分组 |
|---|---|---|
gpt-image-2.5-sunburst | 绘画,dall-e-3格式 | 分组(4)
|
gpt-image-2.5-flare | 绘画,dall-e-3格式 | 分组(4)
|
gpt-image-2.5-sunburst-c | 绘画,dall-e-3格式 | 分组(3)
|
gpt-image-2.5-flare-c | 绘画,dall-e-3格式 | 分组(3)
|
gpt-image-2 | 绘画,dall-e-3格式 | 分组(8)
|
qwen-image-3.0-pro | 绘画 | 分组(1)
|
qwen-image-3.0 | 绘画 | 分组(1)
|
doubao-seedream-5-0-pro-260628 | 绘画 | 分组(1)
|
共列入 27 个候选型号。查看完整模型、版本与接口目录。