字节跳动豆包 Seedream 系列,多档模型可选,支持文生图、图片编辑和多图融合。
Authorization: Bearer YOUR_API_KEY| 模型 | model | 价格 | 说明 |
|---|---|---|---|
| Seedream 5.0 Pro (Official) | doubao-seedream-5-0-pro | $0.076 / $0.15 | 火山方舟官方通道 · 旗舰,1K/2K(分档计价) |
| Seedream 5.0 Lite (Official) | doubao-seedream-5-0-260128 | $0.055/张 | 火山方舟官方通道,2K/4K |
| Seedream 4.5 | doubao-seedream-4-5-251128 | $0.05/张 | 2K/4K |
# 5.0 Lite official channel: same endpoint for T2I and I2I.
# Provide image_url for image-to-image; omit it for text-to-image.
# size: "2K" (default) or "4K" — aspect_ratio is ignored by 5.0 Lite.
# Step 1a: Text-to-image
curl -X POST https://apimodels.app/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5-0-260128",
"prompt": "A cherry blossom tree by a tranquil river, impressionist painting style",
"size": "2K"
}'
# Step 1b: Image-to-image (same endpoint, just add image_url)
curl -X POST https://apimodels.app/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5-0-260128",
"prompt": "Change the season to winter with snow",
"image_url": "https://example.com/landscape.jpg",
"size": "4K"
}'
# Step 2: Poll status
curl "https://apimodels.app/api/v1/images/generations?task_id=TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| model | 是 | string | doubao-seedream-5-0-pro / doubao-seedream-5-0-260128 / doubao-seedream-4-5-251128 |
| prompt | 是 | string | 图片描述或编辑指令 |
| image_url | 否 | string | 参考图:公网 URL 或 base64/data-URI 均可。5.0 Lite 传则走图生图、不传则走文生图(同一 endpoint) |
| image_urls | 否 | string[] | 多张参考图(仅 4.5):每项可为 URL 或 base64/data-URI |
| image_base64 | 否 | string | 单张参考图的 base64/data-URI(本地文件用,等价于 image_url 传 base64) |
| aspect_ratio | 否 | string | 4.5: "1:1"、"16:9"、"9:16"、"4:3"、"3:4"、"3:2"、"2:3"。5.0 Lite 由 size 控制,不读 aspect_ratio。 |
| size | 否 | string | 5.0 Pro:1K 或 2K(默认 2K,分档计价 1K $0.076 / 2K $0.15,无 4K);5.0 Lite:2K(默认)或 4K |
| resolution | 否 | string | 仅 4.5:1k/2k/3k/4k |
| callback_url | 否 | string | 任务完成后的回调 URL |
相关:5.0 Pro 详细文档见 Seedream 5.0 Pro;试一试:Playground
5.0 Pro 是旗舰(1K/2K,交互编辑);5.0 Lite 走官方通道,$0.055,2K/4K;4.5 是入门档,$0.05,最高 4K,可用 image_urls[] 多图融合。
上游(在国内)会主动下载你的 URL,海外/慢图床常跨境超时。改传 base64 / data-URI,或把图放到可快速访问的 CDN。