Skip to main content
The geminiimage MCP adapter connects to Google AI Studio image APIs. Generate images from prompts, edit existing images with instructions, and compose multiple inputs — using Gemini multimodal models or Imagen predict endpoints.

Prerequisites

  • A Google AI Studio account with an API key
  • Billing or quota enabled for Gemini image and/or Imagen models on your key
  • For edit/compose: source images as base64 (data URL prefixes accepted)
  • project_contributor access in AgentRuntime

Connect in AgentRuntime

1

Get a Google AI Studio API key

Create a key at aistudio.google.com/apikey. Enable the image models you plan to use.
2

Create a connection

Go to Connections and click New custom connection to create an API key connection with APIKey. Set DefaultModel (e.g. gemini-2.5-flash-image) if desired.
3

Add geminiimage MCP instance

Go to MCP, click Add instance for geminiimage, wire your connection on Instance config, set the profile active, and save.
4

Generate a test image

Run mcp_callgemini_text_to_image with a simple prompt to verify model access.
See Authentication for binding connections to MCP instances.
gemini_edit_image and gemini_compose_images require Gemini image models. Imagen models (imagen-4-*, imagen-3-*) support text-to-image via predict but not edit/compose handlers.

What you can build

  • Brand assetsgemini_text_to_image with Imagen aspect ratios for ads and social formats.
  • Photo retouching — Product photo base64 → gemini_edit_image with “remove background” or style prompts.
  • Collage generation — Multiple reference images → gemini_compose_images with layout instructions.
  • Multimodal reports — LLM writes caption → image tool → append to Google Slides or Docs.

Tools

Example

Generate a square marketing image with Imagen:

Configuration

Troubleshooting