doubao-seedream-3-0-t2i-250415
doubao-seedream-3-0-t2i-250415 图像生成接口
用于中文/英文文生图,适合通用插画、商品图、海报草图和概念视觉生成。
curl -X POST "https://api.routescope.ai/v1/images/generations" \ -H "Content-Type: application/json" \ -d '{ "model": "doubao-seedream-3-0-t2i-250415", "prompt": "用简洁中文介绍这个 API 网关的能力。" }'{
"created": 1,
"data": {}
}Authorization
BearerAuth
AuthorizationBearer <token>
模型 relay 接口鉴权。请求头:Authorization: Bearer 。
In: header
Request Body
application/json
model*string
图片模型名称。
Default
"doubao-seedream-3-0-t2i-250415"prompt*string
正向提示词。 提示词。范围:1 到 200000 字符,具体上限以模型官方接口为准。
n?integer
返回图片数量。 生成候选数量。范围:1 到 10;具体上限以模型官方接口为准。
Range
1 <= value <= 10logo_add?integer
水印开关:0 不带水印,1 带水印;不传默认带水印。
Default
1Value in
0 | 1size?string
生成尺寸,例如 1024x1024。
quality?string
生成质量档位。
style?string
生成风格。
response_format?string
图片返回格式,例如 url 或 b64_json。
user?string
终端用户标识。
Response Body
application/json
请求参数
| 字段 | 类型 | 必选 | 默认值 | 描述 |
|---|---|---|---|---|
model | string | 是 | 无 | 固定为 doubao-seedream-3-0-t2i-250415。 |
prompt | string | 是 | 无 | 正向提示词。建议控制在 300 个中文字符或 600 个英文单词内。 |
n | integer | 否 | 1 | 返回图片数量,网关通用范围 1 到 10,实际以上游限制为准。 |
size | string | 否 | 1024x1024 | 输出尺寸,格式如 1024x1024。 |
guidance_scale | number | 否 | 2.5 | 提示词一致性权重,Seedream 3.0 支持,取值 1 到 10。 |
response_format | string | 否 | url | 返回格式,支持 url 或 b64_json。 |
watermark | boolean | 否 | true | 是否添加 AI 生成水印。 |
stream | boolean | 否 | false | 是否启用流式输出。 |
user | string | 否 | 无 | 终端用户标识,便于审计与限流。 |
示例代码
curl https://api.routescope.ai/v1/images/generations \
-H "Authorization: Bearer $ROUTESCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-3-0-t2i-250415",
"prompt": "一张极简科技风 API 文档封面,蓝白配色,干净留白",
"size": "1024x1024",
"guidance_scale": 3,
"response_format": "url"
}'import requests
response = requests.post(
"https://api.routescope.ai/v1/images/generations",
headers={"Authorization": "Bearer YOUR_ROUTESCOPE_API_KEY"},
json={
"model": "doubao-seedream-3-0-t2i-250415",
"prompt": "一张极简科技风 API 文档封面,蓝白配色,干净留白",
"size": "1024x1024",
"guidance_scale": 3,
"response_format": "url",
},
)
print(response.json())const response = await fetch("https://api.routescope.ai/v1/images/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ROUTESCOPE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "doubao-seedream-3-0-t2i-250415",
prompt: "一张极简科技风 API 文档封面,蓝白配色,干净留白",
size: "1024x1024",
guidance_scale: 3,
response_format: "url",
}),
});
console.log(await response.json());响应示例
{
"created": 1777432320,
"data": [
{
"url": "https://api.routescope.ai/assets/images/example.png",
"b64_json": null,
"revised_prompt": "极简科技风 API 文档封面,蓝白配色,干净留白"
}
]
}业务提示
计费倍率按 Routescope 后台模型倍率与渠道倍率配置执行。guidance_scale 是 Seedream 3.0 的有效参数;迁移到 Seedream 4.0 及以上时不要继续传该字段。
最后更新于