AI model interfaceImagesNano Banana
Nano Banana Image Generation (OpenAI Chat Format)
Call gemini-2.5-flash-image (Nano Banana) using OpenAI Chat Completions compatible format. The project will be converted into a Gemini request; image configuration is passed through extra_body.google.image_config, and fields must use snake_case.
Authorization
Bearer
AuthorizationBearer <token>
In: header
Request Body
application/json
model*string
模型名称。
Value in
"gemini-2.5-flash-image"messages*
OpenAI 聊天消息。图片会以 Markdown data URI 形式返回到 message.content 中。
stream?boolean
是否流式返回。
extra_body?
Response Body
application/json
curl -X POST "https://nodekey.xinghanyun.cn/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-2.5-flash-image", "messages": [ { "role": "user", "content": "画一只戴着贝雷帽的小猫,白色背景,插画风格" } ], "stream": false, "extra_body": { "google": { "image_config": { "image_size": "https://example.com/image.jpg" }, "thinking_config": { "include_thoughts": false, "thinking_budget": 1 } } } }'{
"id": "string",
"object": "string",
"created": 0,
"model": "string",
"choices": [
{
"index": 0,
"message": {
"role": "string",
"content": "string"
},
"finish_reason": "string"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}Last updated on