curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seedream-4",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A minimalist product photo of a ceramic mug on a clean studio background",
"size": "1:1",
"resolution": "1K",
"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
Seedream 4.0 API 根据文本生成图像或编辑参考图。分辨率为 1K、2K 或 4K,参考图数量与输出数量之和不能超过 15。
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",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A minimalist product photo of a ceramic mug on a clean studio background",
"size": "1:1",
"resolution": "1K",
"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 - 文生图,可选传入参考图
- seedream-4-edit - 图像编辑模式,
image_urls必填
注意事项
size对应宽高比,支持1:1、3:4、4:3、16:9、9:16、3:2、2:3、21:9resolution支持1K、2K、4K,默认值为2Kn支持1-15image_urls数量与n之和不得超过15
授权
所有 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