AI model interfaceImagesNano Banana
Nano Banana Image Generation (Gemini Native Format)
gemini-2.5-flash-image (Nano Banana) image generation. In the request path, fill {model} with gemini-2.5-flash-image; generationConfig.responseModalities must include IMAGE, and image parameters should be placed in generationConfig.imageConfig.
Authorization
Bearer
AuthorizationBearer <token>
In: header
Path Parameters
model*string
模型名称,填写 gemini-2.5-flash-image。
Value in
"gemini-2.5-flash-image"Request Body
application/json
contents*
Gemini 原生消息数组。
generationConfig*
safetySettings?
Response Body
application/json
curl -X POST "https://nodekey.xinghanyun.cn/v1beta/models/gpt-4o:generateContent" \ -H "Content-Type: application/json" \ -d '{ "contents": [ { "parts": [ { "text": "画一只戴着贝雷帽的小猫,白色背景,插画风格" } ] } ], "generationConfig": { "responseModalities": [ "IMAGE" ] } }'{
"candidates": [
{
"content": {
"role": "string",
"parts": [
{
"text": "string",
"inlineData": {
"mimeType": "string",
"data": "string"
}
}
]
},
"finishReason": "string",
"safetyRatings": [
{}
]
}
],
"usageMetadata": {
"promptTokenCount": 0,
"candidatesTokenCount": 0,
"totalTokenCount": 0
}
}Last updated on