VX Agents

OpenAPI Marketplace

google-image-generation

v1.0.0 · 5 endpoints · 1 connections · shared by linh

OpenAPI specification for Google Gemini Image Generation API using the Nano Banana model family. This API allows you to: - Generate images from text prompts (text-to-image) - Edit existing images with text instructions (image-to-image) - Generate mixed text and image responses - Use multi-turn conversations for iterative image refinement **Available Models:** - `gemini-3.1-flash-lite-image` (Nano Banana 2 Lite) — Fastest, most cost-efficient - `gemini-3.1-flash-image` (Nano Banana 2) — Versatile, general-purpose - `gemini-3-pro-image` (Nano Banana Pro) — Premium quality, complex tasks

Connect this API to an AI agent Browse all specs

What you can do with google-image-generation via MCP

Every endpoint below becomes a governed tool your AI agent (Claude, ChatGPT, or a customer-facing VX agent) can call — with scoped permissions, sandbox testing, and audit logs.

MethodPathOperationDescription
GET /models listModels List Available Models Method: GET Path: /models IMPORTANT: This function has 0 REQUIRED parameter(s) and 2 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Query Parameters: OPTIONAL: - pageSize: Maximum number of models to return per page. - pageToken: Token for pagination to retrieve the next page of results.
GET /models/{model} getModel Get Model Information Method: GET Path: /models/{model} IMPORTANT: This function has 1 REQUIRED parameter(s) and 0 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Path Parameters: REQUIRED: - model: The model resource name. For image generation models, use: - `gemini-3.1-flash-lite-image` - `gemini-3.1-flash-image` - `gemini-3-pro-image`
POST /models/{model}:generateContent generateImageContent Generate Image Content Method: POST Path: /models/{model}:generateContent IMPORTANT: This function has 2 REQUIRED parameter(s) and 2 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Path Parameters: REQUIRED: - model: The model to use for image generation: - `gemini-3.1-flash-lite-image` — Fast & cheap - `gemini-3.1-flash-image` — Balanced (recommended) - `gemini-3-pro-image` — Premium quality Request Body: REQUIRED: - contents: The conversation history and current prompt. For single-turn requests, provide one Content object with role "user". For multi-turn editing, include the full conversation history. OPTIONAL: - generationConfig: Configuration for the generation request, including output modalities and image settings. - safetySettings: Safety filter settings to control content generation boundaries.
POST /models/{model}:streamGenerateContent streamGenerateImageContent Stream Generate Image Content Method: POST Path: /models/{model}:streamGenerateContent IMPORTANT: This function has 2 REQUIRED parameter(s) and 2 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Path Parameters: REQUIRED: - model: The model to use for streaming image generation. Request Body: REQUIRED: - contents: The conversation history and current prompt. For single-turn requests, provide one Content object with role "user". For multi-turn editing, include the full conversation history. OPTIONAL: - generationConfig: Configuration for the generation request, including output modalities and image settings. - safetySettings: Safety filter settings to control content generation boundaries.
POST /models/{model}:countTokens countTokens Count Tokens for Image Request Method: POST Path: /models/{model}:countTokens IMPORTANT: This function has 2 REQUIRED parameter(s) and 0 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Path Parameters: REQUIRED: - model: The model to count tokens for. Request Body: REQUIRED: - contents: The content to count tokens for.

Usage guide

Google AI API Key. Obtain from Google AI Studio (https://aistudio.google.com). **Method 1 (Query Parameter):** ``` ?key=YOUR_API_KEY ``` **Method 2 (Header):** ``` x-goog-api-key: YOUR_API_KEY ```

How to use this spec

  1. Create a free VX Agents account (sandbox tools included).
  2. Open the marketplace and connect “google-image-generation” to an agent.
  3. Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.