gemini-api

gemini-api is a skill for Codex from stephen94125/peon-lib. It costs 78 tokens per session (763 once invoked), scanned A, original, Apache-2.0.

A reference guide containing the official message and service definitions for Google's Gemini API, including its gRPC and REST interfaces.

In plain words
What is it for?
Use it when working with content generation, tool and function calling, safety settings, multimodal content, or typed Gemini API clients.
Why use it?
It gives developers exact schemas for building or debugging Gemini API requests and responses instead of relying on guesswork.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it when working with content generation, tool and function calling, safety settings, multimodal content, or typed Gemini API clients.

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

Made for: 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/stephen94125/peon-lib/gemini-api/github.svg)](https://agentmods.dev/skills/stephen94125/peon-lib/gemini-api)
Your own site
<a href="https://agentmods.dev/skills/stephen94125/peon-lib/gemini-api"><img src="https://agentmods.dev/badge/skills/stephen94125/peon-lib/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/stephen94125/peon-lib/gemini-api"><img src="https://agentmods.dev/badge/skills/stephen94125/peon-lib/gemini-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 763 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.00078 $0.00763
Opus 5.5 $0.00031 $0.00305
Sonnet 5.5 $0.00016 $0.00153
Haiku 4.5 $0.00008 $0.00076

Measured 2mo ago against content hash e55287c18c7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

.skills/gemini-api/SKILL.md · 50 lines

How it starts

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

Gemini API Documentation (Protobuf Definitions)

This skill provides the official v1beta Protobuf definitions for the Google Generative Language API (Gemini). These files contain the absolute source of truth for API capabilities, request/response structures, and schema definitions.

When to use these references

When implementing or debugging Gemini API clients (such as in Rust, Go, or other languages), refer to these files for the exact structure of messages, enums, and RPC methods.

Core Services & Schemas

The .proto files are located in references/. Here is a guide on where to look for specific features:

Content Generation & Tools

  • generative_service.proto: Contains the core GenerateContentRequest and GenerateContentResponse. Look here for tool configurations, system instructions, and generation configurations.
  • content.proto: Defines the Content, Part, FunctionCall, FunctionResponse, Tool, and ToolConfig structures. Essential for understanding how to construct multimodal payloads and function calling schemas.
  • safety.proto: Defines HarmCategory, SafetySetting, and SafetyRating enums and messages.

Models & Metadata

  • model.proto: Defines the Model message, including properties like input_token_limit, output_token_limit, and supported generation methods.
  • model_service.proto: RPCs for listing and getting models (GetModel, ListModels).

Context Caching

  • cached_content.proto: Defines the CachedContent resource for caching large prompts.
  • cache_service.proto: RPCs for managing cached contents (CreateCachedContent, UpdateCachedContent, etc.).

File API (Multimodal Uploads)

  • file.proto: Defines the File resource representing uploaded media (video, images, documents).
  • file_service.proto: RPCs for the File API (CreateFile, ListFiles, GetFile, DeleteFile).

Semantic Retrieval (RAG/AQA)

  • retriever.proto / retriever_service.proto: Definitions for Corpora, Documents, Chunks, and operations like Semantic Search and Attributed Question Answering (AQA).

Read the full file on GitHub · 50 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. 2mo ago First seen · 50 lines · 78 tokens per session scan A e55287c18c7d

Subscribe to this mod's changes

gemini-api is a skill published in the GitHub repository stephen94125/peon-lib (2 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 78 tokens to every session and 763 once invoked, about $0.0003 per session on Opus 5.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.

Related

Other skills, from other repositories

data-leakage-detection

Detect sensitive information disclosure via escalating dialogue probes. Covers system prompt extraction, credential/API key leakage, PII, and internal configuration exposure.

Tencent/AI-Infra-Guard · 34 tokens

groq-inference

Ultra-fast LLM inference on custom LPU hardware. OpenAI-compatible API at api.groq.com. Lowest latency in the industry (500-1000+ tok/s). Supports chat completions, vision, audio (Whisper STT + TTS), tool calling, JSON mode, and streaming. Free tier available. Inference only — no training.

synthetic-sciences/openscience · 77 tokens

wegent-knowledge

Knowledge base management and search tools for Wegent. Provides capabilities to list, create, update, and search knowledge bases and documents using RAG retrieval. Use this skill when the user wants to manage knowledge bases, documents, or search for information programmatically.

wecode-ai/Wegent · 51 tokens

vllm

Deploy and serve LLMs with vLLM behind an OpenAI-compatible endpoint, with tool calling enabled for agent workloads.

Prism-Shadow/penguin-harness · 29 tokens

ai-sdk

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI…

vercel-labs/open-agents · 155 tokens

knowledge-model-and-provider-runtime

A codebase guide for choosing AI models and providers, sending requests, recovering from failures, and recording runtime information.

echoVic/blade-code · 152 tokens