This page describes a native (non-OpenAI) interface. It still works, but it is deprecated. New integrations should use the unified API.
The unified entry for text models is POST /v1/chat/completions; use GET /v1/models for the models that are available. The native protocol on this page has no unified interface of the same shape.
What the unified API offers for this: Open the API guide
Gemini Protocol
Google Gemini native generateContent protocol. Currently used by the Nano image models (images are returned synchronously); Gemini text chat models are not offered yet.
Authorization
Bearer <API_KEY>Image Generation (Nano · sync)NEW
Synchronous image generation on the native Gemini generateContent endpoint is available: pass an image model with generationConfig.responseModalities including "IMAGE", and a single request returns the base64 image directly — no taskId, no polling. The public "Nano tier" is backed by these Gemini image models. Two request formats are supported: default JSON (native Gemini protocol) and multipart/form-data upload (upload reference images directly via the image file field for image-to-image — see the example below).
Supported Models
gemini-2.5-flash-image (Nano, 1K) / gemini-3-pro-image-preview (Nano Pro, 1K/2K/4K) / gemini-3.1-flash-image-preview (Nano 2, 1K/2K/4K).