Gemini 3 Pro Image 图像生成
curl --request POST \
--url https://ai.xbrod.com/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-3-pro-image",
"prompt": "一张简洁的绿色植物海报,干净背景",
"size": "16:9",
"resolution": "1K"
}
'import requests
url = "https://ai.xbrod.com/v1/images/generations"
payload = {
"model": "gemini-3-pro-image",
"prompt": "一张简洁的绿色植物海报,干净背景",
"size": "16:9",
"resolution": "1K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-3-pro-image',
prompt: '一张简洁的绿色植物海报,干净背景',
size: '16:9',
resolution: '1K'
})
};
fetch('https://ai.xbrod.com/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created": 1,
"data": [
{
"url": "https://example.com/result.png"
}
]
}Gemini 3 Pro Image
Gemini 3 Pro Image 图像生成
gemini-3-pro-image 的生成请求与响应。
POST
/
v1
/
images
/
generations
Gemini 3 Pro Image 图像生成
curl --request POST \
--url https://ai.xbrod.com/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-3-pro-image",
"prompt": "一张简洁的绿色植物海报,干净背景",
"size": "16:9",
"resolution": "1K"
}
'import requests
url = "https://ai.xbrod.com/v1/images/generations"
payload = {
"model": "gemini-3-pro-image",
"prompt": "一张简洁的绿色植物海报,干净背景",
"size": "16:9",
"resolution": "1K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-3-pro-image',
prompt: '一张简洁的绿色植物海报,干净背景',
size: '16:9',
resolution: '1K'
})
};
fetch('https://ai.xbrod.com/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created": 1,
"data": [
{
"url": "https://example.com/result.png"
}
]
}模型选择
| 模型 ID | 请求地址 |
|---|---|
gemini-3-pro-image | POST /v1/images/generations |
gemini-3-pro-image 映射为 gemini-3-pro-image-preview 后发送至 APIMart。
主要参数
下表列出常用参数;媒体引用的组合限制以接口校验结果为准。| 字段 | 取值或限制 | 说明 |
|---|---|---|
model | gemini-3-pro-image | 对外请求的模型 ID |
prompt | string | 图片生成或编辑的文字描述;必填 |
size | auto、1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9、21:9;默认 auto | 输出宽高比;图生图建议指定比例 |
resolution | 1K、2K、4K;默认 1K | 输出分辨率(当前网关不接受 0.5K) |
n | 1;默认 1 | 每次生成 1 张 |
image_urls | 最多 14 项 | 图像编辑参考图,最多 14 张;每张不超过 30MB;支持公开 URL 或图片 Data URI |
nsfw_check | true / false;默认 false | 提交前进行内容审核;默认为 false |
official_fallback | true / false;默认 false | 可选的官方线路回退;可能使用不同计费档位 |
response_format | url | 本网关仅支持 url 响应格式 |
返回说明
成功时返回data[].url。如返回 504 与 task_id,请先查询原任务,不要直接重复提交。授权
本项目签发的 API 密钥,不是上游密钥
请求体
application/json
对外请求的模型 ID
可用选项:
gemini-3-pro-image 图片生成或编辑的文字描述;必填
Minimum string length:
1输出宽高比;图生图建议指定比例
可用选项:
auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 输出分辨率(当前网关不接受 0.5K)
可用选项:
1K, 2K, 4K 每次生成 1 张
可用选项:
1 图像编辑参考图,最多 14 张;每张不超过 30MB;支持公开 URL 或图片 Data URI
Maximum array length:
14提交前进行内容审核;默认为 false
可选的官方线路回退;可能使用不同计费档位
本网关仅支持 url 响应格式
可用选项:
url