Skip to content

Gemini API MCP

Gemini API provides text, image, audio and video processing and generation with Google's Gemini models. An agent can generate text responses and inspect model information for integrations. Add your Gemini API key once in Longwave settings; calls run on your vendor account.

Add to Longwave

Add Gemini API to your agent

Paste this into Claude Code or a terminal. Then run /mcp to sign in.

functions
2
access
Your key
tasks
2

Use Gemini API on Longwave

  1. Download Longwave or open app.longwave.run.
  2. Add your Gemini API API key once in Longwave settings. Calls run on your Gemini API account at Gemini API's price.
  3. Ask for the result in any thread, for example: “Draft text for a research brief”. The agent picks the Gemini API function and calls it.

Use Gemini API in Claude Code, Codex, Cursor or ChatGPT

Add the Longwave MCP server once. It carries 2,593 functions across 103 tools, including Gemini API, and asks you to sign in on first use.

Why call Gemini API through Longwave

  • Your Gemini API key is stored once, encrypted, and used by every harness and device you use.
  • One MCP server for 103 tools, so your agent setup does not grow a key and a server per vendor.
  • Spending limits per key and per account, checked before a paid call is made.
  • Each call is recorded with the provider, the cost and the result, and can be read again from another device.

Gemini API functions

Gemini 1

Function Price
Get a response from Gemini Accepts a model name, text content and an output token limit and returns a model response to the supplied text content. google-ai.content.generate
The selected model and usage determine the charge; no single per-call price applies to this function.

Google-Ai 1

Function Price
List Gemini models Accepts a page size and an optional pagination token and returns Gemini model names and metadata. google-ai.models.list
Model or provider metadata lookup; no generation charge or separate published per-call fee.

Prices are Gemini API's published rates. Source: Gemini API pricing.

Use cases

Questions people ask

How do I get a Gemini API API key?

Sign in to Gemini API and create a key at aistudio.google.com/apikey. Add it once in Longwave settings and your agents' Gemini API calls run on your own account. Gemini API API keys

Does Gemini API offer a free API allowance?

Gemini API publishes this allowance: Free input and output for selected models; model-specific quotas. The allowance applies to the vendor account used for the call. Gemini API pricing

Do I need a Gemini API account?

Yes. Create a key at https://aistudio.google.com/apikey and add it in Longwave settings. Longwave stores it encrypted and uses it only for your calls.

How do I use Gemini API in Claude Code?

Add the Longwave MCP server once with claude mcp add --transport http longwave https://api.longwave.run/v1/mcp/tasks, sign in, and ask for what you need. Claude finds the right Gemini API function and calls it.

Use Gemini API in Longwave

Ask any Longwave thread for the result, or add Longwave to Claude Code, Codex, Cursor or ChatGPT.

Add to Longwave