Google Gemini API request. Path format: /v1beta/models/{model_name}:{action} Optional model IDs, e.g.:
gemini-2.5-flash-image (Nano Banana)
gemini-3.1-flash-image-preview (Nano Banana 2)
gemini-3-pro-image-preview (Nano Banana Pro)
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
Body Params application/jsonRequired
Examples
{"contents":[{"parts":[{"text":"a dragon flying over mountains"}]}],"generationConfig":{"responseModalities":["IMAGE"],"imageConfig":{"aspectRatio":"16:9","imageSize":"2K"}}}