NanoBanana OpenAI chat format
Generate images via the OpenAI chat endpoint — ideal for the budget tier and OpenAI SDK users
Models you can use
| Model ID | Notes |
|---|---|
nanobanana | Standard version |
nanobanana_pro | High-quality version |
nanobanana_2 | 2nd generation — budget tier only, this format exclusively |
Image configuration
Pass Google extension parameters through theextra_body field:
Response format
The image is embedded inchoices[0].message.content as Markdown:
Relationship to the chat endpoint
The path/v1/chat/completions is shared with the chat completions
endpoint. This page specifically describes the image-generation
behavior and the unique extra_body parameters when model is a
NanoBanana ID.Authorizations
Body
NanoBanana OpenAI chat-format image generation request body.
NanoBanana model ID. Options: nanobanana, nanobanana_pro,
nanobanana_2. The budget-tier nanobanana_2 only supports this
format and cannot be used with the Gemini native endpoint.
"nanobanana_pro"
"nanobanana_2"
Conversation messages containing the image generation prompt.
Whether to stream the response. Set to false for image generation.
Extension parameters. Pass image configuration (aspect ratio and
resolution) via google.image_config.
Response
Image generated successfully
NanoBanana OpenAI chat-format response body. The image is embedded in the message content as a Markdown inline image.
Unique identifier for this request.
"chatcmpl-20251211160744809365000fdOhL0KY"
The model that processed the request.
"nanobanana_pro"
Object type.
"chat.completion"
Unix timestamp (seconds) of creation.
1765440499
List of generated results.
Token usage statistics.