Create Nano Banana Image
POST
/v1beta/models/{model}:{GenerateContentType}Create an image through the Gemini-compatible Nano Banana format.
Path Parameters
model:requiredstringModel identifier used for this request.
Example
gemini-3.1-flash-lite-imageGenerateContentType:requiredstringGemini-compatible generation action.
Allowed
generateContentstreamGenerateContentExample
generateContentHeader Parameters
x-goog-api-key:optionalstringOptional request parameter.
Example
{{key}}Request Body
application/jsongenerationConfig:requiredobjectGeneration settings for the request.
Example
{"imageConfig":{"aspectRatio":"16:9","image_size":"1K"}}contents:requiredobjectGemini-compatible content payload.
Example
[{"parts":[{"text":"A kawaii-style sticker of a happy red panda wearing a tiny bamboo hat. It'smunching on a green bamboo leaf. The design features bold, clean outlines,simple cel-shading, and a vibrant color palette. The background must be white."}]}]Response
200A successful request returns a JSON response. The complete example is shown in the code panel.