Gemini 3 Pro Image Preview(异步任务)
google/gemini-3-pro-image-preview
异步任务:POST /v1/tasks/generations 提交 → GET /v1/tasks/generations/{request_id} 轮询结果(POST 发送后 request_id 自动填入 GET)。
https://router.shengsuanyun.com/apiAuthorization: Bearer YOUR_API_KEY端点列表
POST/v1/tasks/generationsGoogle 图像生成-异步
异步任务:POST 提交后返回 request_id,再用 GET /v1/tasks/generations/{request_id} 轮询结果。
请求体
application/json
object
anyOf · 1
| 字段 | 类型 | 说明 |
|---|---|---|
prompt必填 | stringtextarea | |
aspect_ratio | string | 可选值:"1:1" · "3:2" · "2:3" · "3:4" · "4:3" · "4:5" · "5:4" · "9:16" · "16:9" · "21:9" |
response_modalities | array | 展开结构
数组元素
|
size | string | 可选值:"1K" · "2K" · "4K" |
model必填 | string | 路由模型,本页固定为 google/gemini-3-pro-image-preview |
anyOf · 2
| 字段 | 类型 | 说明 |
|---|---|---|
prompt必填 | stringtextarea | |
image必填 | string | |
aspect_ratio | string | 可选值:"1:1" · "3:2" · "2:3" · "3:4" · "4:3" · "4:5" · "5:4" · "9:16" · "16:9" · "21:9" |
response_modalities | array | 展开结构
数组元素
|
size | string | 可选值:"1K" · "2K" · "4K" |
model必填 | string | 路由模型,本页固定为 google/gemini-3-pro-image-preview |
anyOf · 3
| 字段 | 类型 | 说明 |
|---|---|---|
prompt必填 | stringtextarea | |
images必填 | array | 展开结构
数组元素
|
aspect_ratio | string | 可选值:"1:1" · "3:2" · "2:3" · "3:4" · "4:3" · "4:5" · "5:4" · "9:16" · "16:9" · "21:9" |
response_modalities | array | 展开结构
数组元素
|
size | string | 可选值:"1K" · "2K" · "4K" |
model必填 | string | 路由模型,本页固定为 google/gemini-3-pro-image-preview |
{
"aspect_ratio": "16:9",
"images": [
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_1.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_2.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_3.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_4.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_5.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_6.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_7.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_8.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_9.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_10.png"
],
"model": "google/gemini-3-pro-image-preview",
"prompt": "一个中景画面,10 个毛茸茸的角色挤在一起,并排坐在宽大的木质长椅上和长椅前的鹅卵石地面上。他们都面向前方,看着放在长椅前低矮石桌上的复古手摇留声机。房间光线昏暗,右侧的篝火透进温暖的光线,留声机发出的微光照亮了生物的面庞和毛茸茸的质感。背景是一个舒适、略显杂乱的森林营地,有铺着松针的地面、摆满野营工具和食物的木箱,以及背景中简易的帐篷和远处的树林。整体氛围温暖、舒适且充满趣味。",
"response_modalities": [
"IMAGE"
],
"size": "2K"
}请求示例
参考地址:https://router.shengsuanyun.com/api。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。
curl -X POST 'https://router.shengsuanyun.com/api/v1/tasks/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{
"aspect_ratio": "16:9",
"images": [
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_1.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_2.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_3.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_4.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_5.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_6.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_7.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_8.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_9.png",
"https://oss.shengsuanyun.com/example/modelinfo/241/2025-11-24_17:45:39_input_10.png"
],
"model": "google/gemini-3-pro-image-preview",
"prompt": "一个中景画面,10 个毛茸茸的角色挤在一起,并排坐在宽大的木质长椅上和长椅前的鹅卵石地面上。他们都面向前方,看着放在长椅前低矮石桌上的复古手摇留声机。房间光线昏暗,右侧的篝火透进温暖的光线,留声机发出的微光照亮了生物的面庞和毛茸茸的质感。背景是一个舒适、略显杂乱的森林营地,有铺着松针的地面、摆满野营工具和食物的木箱,以及背景中简易的帐篷和远处的树林。整体氛围温暖、舒适且充满趣味。",
"response_modalities": [
"IMAGE"
],
"size": "2K"
}'响应
200 提交成功,返回 request_id / task_id
application/json
未提供结构定义。
{
"code": "success",
"message": "",
"data": {
"request_id": "REQ_xxx",
"task_id": "TASK_xxx",
"action": "GENERATION",
"status": "PENDING",
"progress": "0%"
}
}400 请求参数错误
401 未授权(API Key 无效)
429 请求过于频繁
500 服务器内部错误
GET/v1/tasks/generations/{request_id}查询异步任务状态与产物
通过 POST /v1/tasks/generations 返回的 request_id 轮询任务状态、进度与产物 URL(image_urls / video_urls / audio_urls / file_urls / text)。下方「在线测试」填入 request_id 即可发送查询;若上方 POST 已发送成功,request_id 会自动填入。
请求参数
| 参数 | 位置 / 类型 | 说明 |
|---|---|---|
request_id必填 | path / string | POST /v1/tasks/generations 返回的请求 ID |
请求示例
参考地址:https://router.shengsuanyun.com/api。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。
curl -X GET 'https://router.shengsuanyun.com/api/v1/tasks/generations/{request_id}' \
-H 'Authorization: Bearer YOUR_API_KEY'响应
200 任务状态与产物
application/json
未提供结构定义。
{
"code": "success",
"message": "",
"data": {
"request_id": "REQ_xxx",
"task_id": "TASK_xxx",
"action": "GENERATION",
"status": "COMPLETED",
"progress": "100%",
"data": {
"url": [
"https://oss.shengsuanyun.com/example/output.mp4"
]
}
}
}