Generate images with Gemini
Generate and edit Nano Banana images through RunBridge AI with the Gemini generateContent API, image options, and final inlineData output.
/v1beta/models/{model}:generateContent to generate or edit Nano Banana images. Put the model ID in the URL and send the prompt or source image parts in contents.
Choose a model
thought is true. These are not the final output. When saving generated images, skip thought: true parts and use the last image part where inlineData exists and thought is not true. Choose the saved file extension from its mimeType: .jpg for image/jpeg, .png for image/png, or .webp for image/webp.Authorizations
Use your RunBridge AI API key.
Path Parameters
Nano Banana image model ID. Use gemini-3.1-flash-image for the Flash examples, gemini-3-pro-image for Pro, or gemini-3.1-flash-lite-image for the Lite example.
Body
Conversation turns. Each item has a role ("user" or "model") and parts array containing text and/or image data.
Controls generation behavior — output modalities, image resolution, thinking, etc.
Optional Google Search grounding for gemini-3.1-flash-image and gemini-3-pro-image. Pass [{"google_search": {}}] to use real-time information in generated images. The Lite model does not support search grounding.