Back to Nodes

Gemini AI Studio

Last updated Apr 29, 2026

n8n community node for the Google Gemini API via direct AI Studio REST calls.

62 Weekly Downloads
189 Monthly Downloads

Included Nodes

Gemini AI Studio

Description

n8n-nodes-gemini-ai-studio

n8n community node for the Google Gemini API, designed around the current AI
Studio REST API instead of a bundled SDK. It keeps runtime dependencies at zero:
requests go directly to https://generativelanguage.googleapis.com and the API
key is stored only in n8n credentials.

Features

| Resource | Operations |
| — | — |
| Content | Generate Content, Stream Generate Content |
| Cached Content | Create, Get, List, Update, Delete |
| Token | Count Tokens |
| Embedding | Embed Content, Batch Embed Contents |
| File | Upload, Get, List, Delete |
| Model | List, Get |

The node includes structured fields for common settings such as system
instruction, temperature, response MIME type, thinking config, safety settings,
tools, function declarations, and embeddings dimensionality. Content generation
supports simple text, inline binary data, Files API fileData URIs, and raw JSON
for newly released Gemini API fields.

The node also exposes n8n AI connections:

  • Language Model output when Resource is Content
  • Embeddings output when Resource is Embedding
  • Use these outputs to connect Gemini AI Studio directly to n8n AI Agent, Chain, or
    Vector Store nodes.

    Credentials

    Create a Google Generative AI API credential:

  • API Key: key from Google AI Studio
  • Base URL: defaults to https://generativelanguage.googleapis.com
  • API Version: defaults to v1beta
  • The credential sends the key as the X-goog-api-key header. Do not hard-code API
    keys in workflows or source files.

    Example

    The provided curl example maps to:

  • Resource: Content
  • Operation: Generate Content
  • Model: gemini-flash-latest
  • Input Mode: Simple Text
  • Prompt: Explain how AI works in a few words

The request body generated by the node is:

{
  "contents": [
    {
      "parts": [
        {
          "text": "Explain how AI works in a few words"
        }
      ]
    }
  ]
}

To send multimodal input in simple mode, add Multimodal Parts and choose
either an input binary property for Gemini inlineData or a Files API URI for
Gemini fileData.

Build & install locally

npm install
npm run build

mkdir -p ~/.n8n/custom npm link cd ~/.n8n/custom npm link @leolin310148/n8n-nodes-gemini-ai-studio

n8n start

Then add a Gemini AI Studio node in n8n.