https://token.kelly.cloud/v1/images/generationsAuthorization: Bearer sk-你的API-Key
Content-Type: application/json| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| model | string | 是 | 模型名称:doubao-seedream-5-0-pro(当前可用版本) |
| prompt | string | 是 | 图像描述提示词(支持中文/英文) |
| n | integer | 否 | 生成图片数量,默认 1 |
| size | string | 否 | 图片尺寸:1024x1024、1280x720 等,需满足最小面积限制(见下方说明) |
| response_format | string | 否 | 返回格式:url(默认)或 b64_json |
doubao-seedream-5-0-pro。同系列的 doubao-seedream-5-0-flash 暂未开通,调用会返回 404 ModelNotOpen 错误。| 尺寸 | 面积 | 是否可用 |
|---|---|---|
1024x1024 | 1048576 | ✅ 可用 |
1280x720 | 921600 | ✅ 可用(16:9 推荐) |
1024x576 | 589824 | ❌ 面积不足,会报 InvalidParameter |
{
"model": "doubao-seedream-5-0-pro-260628",
"created": 1793018117,
"data": [
{
"url": "https://xxx.tos-cn-beijing.volces.com/doubao-seedream-5-0-pro/xxxx.jpeg",
"size": "1024x1024",
"output_format": "jpeg"
}
],
"usage": {
"input_images": 0,
"generated_images": 1,
"output_tokens": 4096,
"total_tokens": 4096
}
}| 错误码 | 含义 | 处理建议 |
|---|---|---|
| 200 | 成功 | - |
| 400 | 请求参数错误 | 检查参数格式与必填项 |
| 401 | 认证失败 | 检查 API Key 是否正确、是否过期 |
| 404 | 模型不存在或未开通 | 检查模型名称拼写,或联系服务商开通模型 |
| 429 | 请求过于频繁 | 降低请求频率 |
| 500 | 服务端内部错误 | 稍后重试 |
| code | 含义 | 处理建议 |
|---|---|---|
ModelNotOpen | 该模型未在账号下开通 | 换用已开通的模型,或联系服务商在 Ark 控制台开通 |
InvalidParameter | 参数不合法(如 size 面积不足) | 检查 size 等参数是否满足要求 |
{
"error": {
"message": "Your account 2105857375 has not activated the model doubao-seedream-5-0-flash-260915. Please activate the model service in the Ark Console.",
"type": "Not Found",
"param": "",
"code": "ModelNotOpen"
}
}InvalidParameter,提示 image area must be at least 921600 pixels?1024x576(589824)不合法,16:9 场景请改用 1280x720。response_format: "b64_json"。usage.generated_images)计算。doubao-seedream-5-0-pro,doubao-seedream-5-0-flash 暂不可用。