curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "grok-imagine-image-quality",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A premium product photo of a matte black smart speaker on a marble table, soft studio lighting",
"aspect_ratio": "1:1",
"resolution": "1K",
"n": 1
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-06-26T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}Grok (xAI)
Grok Imagine Image Quality
Grok Imagine Image Quality API 根据提示词生成图像,或编辑一张或多张参考图。通过 n 设置输出图像数量。
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": "grok-imagine-image-quality",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A premium product photo of a matte black smart speaker on a marble table, soft studio lighting",
"aspect_ratio": "1:1",
"resolution": "1K",
"n": 1
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-06-26T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
grok-imagine-image-quality 生成高质量图像。同一个模型同时支持文生图和图像编辑。
当 input.image_urls 为空或省略时,PoYo 根据提示词生成图像。当 input.image_urls 包含一张或多张图像时,PoYo 将这些图像作为参考进行编辑。用 input.n 设置输出图像数量。
模型
- grok-imagine-image-quality - 高质量文生图和图像编辑
授权
所有 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