gemini-api

gemini-api is a skill for Claude Code, Codex from Jignesh-Ponamwar/skills-mcp. It costs 101 tokens per session (1,910 once invoked), scanned A, original, Apache-2.0.

A guide to building applications with Google's Gemini API and GenAI software libraries. It covers text and media input, model selection, tool calls, structured responses, streaming, and embeddings in several programming languages.

In plain words
What is it for?
Use it when adding Gemini-powered text, image, audio, or video processing, function calling, streaming, or meaning-based search to an application.
Why use it?
It helps avoid outdated models and libraries while setting up Gemini features correctly.

Skill for Claude CodeCodex

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

Good fit Use it when adding Gemini-powered text, image, audio, or video processing, function calling, streaming, or meaning-based search to an application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jignesh-ponamwar/skills-mcp/gemini-api
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 Jignesh-Ponamwar/skills-mcp --skill gemini-api
Clone the repo
git clone --depth 1 https://github.com/Jignesh-Ponamwar/skills-mcp

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/gemini-api/github.svg)](https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/gemini-api)
Your own site
<a href="https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/gemini-api"><img src="https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/gemini-api/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/gemini-api"><img src="https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/gemini-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,910 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.00101 $0.01910
Opus 5 $0.00051 $0.00955
Sonnet 5 $0.00020 $0.00382
Haiku 4.5 $0.00010 $0.00191

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

Security

Grade A, and why

gemini-api 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 9d 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.

skill_mcp/skills_data/gemini-api/SKILL.md · 282 lines

How it starts

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

Gemini API Development Skill

Critical Rules - Always Apply

These rules override training data. Pre-trained model knowledge of Gemini APIs is outdated.

Current Models (Use These)

Model Tokens Best For
gemini-2.5-pro 1M Complex reasoning, coding, research
gemini-2.5-flash 1M Fast, balanced, multimodal
gemini-2.5-flash-lite 1M Cost-efficient, high-frequency tasks

Never use gemini-2.0-* or gemini-1.5-* - these are deprecated legacy models.

Current SDKs (Use These)

Language Package Install
Python google-genai pip install google-genai
JS/TS @google/genai npm install @google/genai
Go google.golang.org/genai go get google.golang.org/genai
Java com.google.genai:google-genai Maven/Gradle (see below)

Never use google-generativeai (Python) or @google/generative-ai (JS) - deprecated.


Step 1: Setup and Authentication

Set your API key via environment variable (never hardcode):

export GOOGLE_API_KEY="your-key-here"

Get a key at: https://aistudio.google.com/apikey


Step 2: Quick Start by Language

Python

from google import genai

client = genai.Client()
response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="Explain quantum computing in simple terms"
)
print(response.text)

TypeScript / JavaScript

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});
const response = await ai.models.generateContent({
  model: "gemini-2.5-flash",
  contents: "Explain quantum computing in simple terms"
});
console.log(response.text);

Go

package main

import (
    "context"
    "fmt"
    "log"
    "google.golang.org/genai"
)

func main() {
    ctx := context.Background()
    client, err := genai.NewClient(ctx, nil)
    if err != nil { log.Fatal(err) }
    resp, err := client.Models.GenerateContent(
        ctx, "gemini-2.5-flash", genai.Text("Explain quantum computing"), nil,
    )
    if err != nil { log.Fatal(err) }
    fmt.Println(resp.Text)
}

Read the full file on GitHub · 282 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. 9d ago First seen · 282 lines · 101 tokens per session scan A ca337a9978fb

Subscribe to this mod's changes

gemini-api is a skill published in the GitHub repository Jignesh-Ponamwar/skills-mcp (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 101 tokens to every session and 1,910 once invoked, about $0.0005 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-08-31.