gemini-api-integration

gemini-api-integration is a skill for Claude Code, Codex from tmolavi/mcp-agent-skills-hub. It costs 33 tokens per session (1,436 once invoked), scanned A, original, MIT.

A development guide for adding Google's Gemini AI models to Node.js, Python, or browser applications. It covers text, image, audio, and video inputs, streamed responses, function calling, model choice, and API errors.

In plain words
What is it for?
It helps build Gemini features such as multimodal input, streaming output, function calling, and model selection, and helps debug API problems.
Why use it?
It brings the main integration decisions and production concerns into one workflow. This reduces guesswork when setting up the API or handling quotas, rate limits, and failures.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps build Gemini features such as multimodal input, streaming output, function calling, and model selection, and helps debug API problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmolavi/mcp-agent-skills-hub/gemini-api-integration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tmolavi/mcp-agent-skills-hub --skill gemini-api-integration
Clone the repo
git clone --depth 1 https://github.com/tmolavi/mcp-agent-skills-hub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gemini-api-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/gemini-api-integration/github.svg)](https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/gemini-api-integration)
Your own site
<a href="https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/gemini-api-integration"><img src="https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/gemini-api-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gemini-api-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/gemini-api-integration"><img src="https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/gemini-api-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,436 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.01436
Opus 5 $0.00016 $0.00718
Sonnet 5 $0.00007 $0.00287
Haiku 4.5 $0.00003 $0.00144

Measured 7d ago against content hash 3043f8324fb7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

gemini-api-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

skills/gemini-api-integration/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gemini API Integration

Overview

This skill guides AI agents through integrating Google Gemini API into applications — from basic text generation to advanced multimodal, function calling, and streaming use cases. It covers the full Gemini SDK lifecycle with production-grade patterns.

When to Use This Skill

  • Use when setting up Gemini API for the first time in a Node.js, Python, or browser project
  • Use when implementing multimodal inputs (text + image/audio/video)
  • Use when adding streaming responses to improve perceived latency
  • Use when implementing function calling / tool use with Gemini
  • Use when optimizing model selection (Flash vs Pro vs Ultra) for cost and performance
  • Use when debugging Gemini API errors, rate limits, or quota issues

Step-by-Step Guide

1. Installation & Setup

Node.js / TypeScript:

npm install @google/generative-ai

Python:

pip install google-generativeai

Set your API key securely:

export GEMINI_API_KEY="your-api-key-here"

2. Basic Text Generation

Node.js:

import { GoogleGenerativeAI } from "@google/generative-ai";

const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);
const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" });

const result = await model.generateContent("Explain async/await in JavaScript");
console.log(result.response.text());

Python:

import google.generativeai as genai
import os

genai.configure(api_key=os.environ["GEMINI_API_KEY"])
model = genai.GenerativeModel("gemini-1.5-flash")

response = model.generate_content("Explain async/await in JavaScript")
print(response.text)

3. Streaming Responses

const result = await model.generateContentStream("Write a detailed blog post about AI");

for await (const chunk of result.stream) {
  process.stdout.write(chunk.text());
}

4. Multimodal Input (Text + Image)

import fs from "fs";

const imageData = fs.readFileSync("screenshot.png");
const imagePart = {
  inlineData: {
    data: imageData.toString("base64"),
    mimeType: "image/png",
  },
};

const result = await model.generateContent(["Describe this image:", imagePart]);
console.log(result.response.text());

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 194 lines · 33 tokens per session scan A 3043f8324fb7

Subscribe to this mod's changes

gemini-api-integration is a skill published in the GitHub repository tmolavi/mcp-agent-skills-hub (8 stars, last pushed 15d ago), licensed MIT. It adds 33 tokens to every session and 1,436 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

agent-communication-protocol

Open protocol for AI agent interoperability enabling standardized communication between agents, applications, and humans across different frameworks.

majiayu000/claude-skill-registry · 25 tokens

arkcli-infer-endpoint

A manager for inference endpoints, the online addresses used to send requests to deployed AI models. It can work with endpoints created by the current SSO sub-user, which is a separately identified account user.

volcengine/ark-cli · 258 tokens

bailian-train-deploy

A workflow for using Alibaba Cloud’s Bailian command-line tool to fine-tune or directly deploy AI models as callable services. It covers text, speech-synthesis, image-generation, and video-generation models.

modelstudioai/skills · 321 tokens

happyhorse-prompt-studio

Interactive prompt studio for HappyHorse 1.0 video generation. Guides users through scenario discovery with vivid examples, then assembles production-ready prompts in JP/CN/EN. Use when someone wants to create AI video content with HappyHorse but doesn't know where to start, or when they have a specific scenario and…

modelstudioai/skills · 93 tokens

ai-orchestration-vercel-ai-sdk

Vercel AI SDK patterns - providers, text generation, streaming, structured output, tool calling, chat UI hooks, embeddings, and RAG.

agents-inc/skills · 38 tokens

bailian-docs-llm-wiki

A searchable knowledge base for Alibaba Cloud Bailian, a platform for using and building applications with AI models. It contains model information, API documentation, application-development guides, multimodal features, and pricing details.

modelstudioai/skills · 163 tokens