跳转到主要内容
POST
/
v1
/
tasks
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-image-preview",
    "prompt": "一只橘猫趴在窗台上晒太阳,水彩画风格",
    "size": "16:9"
  }'
{
  "code": "success",
  "data": "task-wave17200000001234567890abcdef"
}
异步处理模式 — 提交请求后返回任务 ID,通过 查询任务状态 接口获取生成结果。
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-image-preview",
    "prompt": "一只橘猫趴在窗台上晒太阳,水彩画风格",
    "size": "16:9"
  }'
{
  "code": "success",
  "data": "task-wave17200000001234567890abcdef"
}

可用模型

模型 ID说明
gemini-2.5-flash-image-previewGemini 2.5 Flash 图像预览版
gemini-3-pro-image-previewGemini 3 Pro 图像预览版
gemini-3.1-flash-image-previewGemini 3.1 Flash 图像预览版,支持高分辨率和搜索增强

通用参数

model
string
必填
模型 ID,见上方模型列表
prompt
string
必填
图像描述文本,最多 1000 个字符
image_urls
array
参考图片 URL 数组,最多 14 张,每张不超过 10MB
n
integer
默认值:"1"
生成数量,固定为 1

各模型差异参数

size
string
默认值:"1:1"
图像尺寸比例支持:1:12:33:23:44:34:55:49:1616:921:9
resolution
string
默认值:"1K"
输出分辨率:1K

响应

返回任务 ID,使用 查询任务状态 获取最终图像结果。
code
string
状态码,成功为 "success"
data
string
任务 ID,格式为 task-wave{timestamp}{userId}{random}