Gemini CLI内置模型已经包含了NanoBanana正式版(gemini-2.5-flash-image),并且支持比例调整了
CLIProxyAPI已第一时间已更新适配,免费NanoBanana可以看这篇教程来自行部署https://www.deepflood.com/post-6639-1
可调宽高比如下:

测试命令如下:
curl -s -X POST \
"http://127.0.0.1:8317/v1beta/models/gemini-2.5-flash-image:generateContent" \
-H "x-goog-api-key: ABCD-1234" \
-H "Content-Type: application/json" \
-d '{
"contents": [{
"parts": [
{"text": "Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme"}
]
}],
"generationConfig": {
"imageConfig": {
"aspectRatio": "16:9"
}
}
}' \
| grep -o '"data": "[^"]*"' \
| cut -d'"' -f4 \
| base64 --decode > gemini-native-image.png
看看效果:
| 16:9比例 | 6:19比例 |
|---|---|
![]() |
![]() |

