curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-4.5",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A serene Japanese garden with cherry blossoms and a koi pond",
"size": "16:9",
"n": 1
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_error"
}
}Seedream
Seedream-4.5
Seedream 4.5 API 根据文本生成图像或编辑最多 10 张参考图。输出可为 2K、4K、预设宽高比或自定义宽高。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-4.5",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A serene Japanese garden with cherry blossoms and a koi pond",
"size": "16:9",
"n": 1
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_error"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
- seedream-4.5 - 高质量文生图和图生图生成
- seedream-4.5-edit - 高级图像编辑,支持多图参考(最多 10 张)
尺寸
input.size 支持以下形式:
- 分辨率预设:
2K、4K - 比例预设:
1:1、4:3、3:4、16:9、9:16、3:2、2:3、21:9 - 自定义字符串:
WIDTHxHEIGHT,例如1920x4096 - 自定义对象:
{ "width": 2304, "height": 3072 }
seedream-4.5-edit 都支持自定义 size。
编辑模式下:
2K、4K等预设分辨率由上游模型自动处理1920x4096或{ "width": 2304, "height": 3072 }等自定义尺寸会使用你明确提供的宽度和高度
示例
使用统一提交接口:POST /api/generate/submit
预设尺寸示例:
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedream-4.5",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A serene Japanese garden with cherry blossoms and a koi pond",
"size": "16:9",
"n": 1
}
}'
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedream-4.5",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Seedream 4.5 API now Available on Poyo.ai",
"size": "1920x4096",
"n": 1
}
}'
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedream-4.5-edit",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "Transform the scene to a winter wonderland with snow",
"image_urls": ["https://example.com/reference1.jpg"],
"size": "1920x4096",
"n": 1
}
}'
{
"model": "seedream-4.5",
"input": {
"prompt": "A fashion editorial portrait in a studio",
"size": {
"width": 2304,
"height": 3072
},
"n": 1
}
}
授权
所有 API 接口都需要 Bearer Token 认证。
创建 API Key:登录 PoYo,进入 仪表盘 → API 密钥(poyo.ai/zh/dashboard/api-key),点击创建 Key。
在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
响应
任务提交成功
Show child attributes
Show child attributes