gemini-api-dev

A development reference for building applications with Google's Gemini API. It covers text, images, audio, video, documents, function calls, structured JSON, code execution, caching, and embeddings.

In plain words
What is it for?
Use it when coding Gemini integrations that generate content, understand media or documents, call application functions, return structured data, run Python, cache context, or create embeddings for semantic search.
Why use it?
It brings the API's supported development patterns and model choices into one place when implementing Gemini features.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/pinkpixel-dev/imaginate-mcp/gemini-api-dev
Any agent
npx skills add pinkpixel-dev/imaginate-mcp --skill gemini-api-dev
Clone the repo
git clone --depth 1 https://github.com/pinkpixel-dev/imaginate-mcp

Made for: Claude Code, Codex.

Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00094 $0.01503
Opus 5 $0.00047 $0.00751
Sonnet 5 $0.00019 $0.00301
Haiku 4.5 $0.00009 $0.00150

Measured yesterday against content hash 0eaff27f821f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gemini-api-dev 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 yesterday.

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.

.agents/skills/gemini-api-dev/SKILL.md · 167 lines

How it starts

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

Gemini API Development Skill

Overview

The Gemini API provides access to Google's most advanced AI models. Key capabilities include:

  • Text generation - Chat, completion, summarization
  • Multimodal understanding - Process images, audio, video, and documents
  • Function calling - Let the model invoke your functions
  • Structured output - Generate valid JSON matching your schema
  • Code execution - Run Python code in a sandboxed environment
  • Context caching - Cache large contexts for efficiency
  • Embeddings - Generate text embeddings for semantic search

Current Models

Models:

  • gemini-3.1-pro-preview: 1M tokens, complex reasoning, coding, research
  • gemini-3-flash-preview: 1M tokens, fast, balanced performance, multimodal
  • gemini-2.5-pro: 1M tokens, complex reasoning, coding, research
  • gemini-2.5-flash: 1M tokens, fast, balanced performance, multimodal
  • gemini-3.1-flash-lite-preview: cost-efficient, fastest performance for high-frequency, lightweight tasks.
  • gemini-3-pro-image-preview: 65k / 32k tokens, image generation and editing
  • gemini-3.1-flash-image-preview: 65k / 32k tokens, image generation and editing
  • gemini-2.5-flash-image: 65k / 32k tokens, image generation and editing

[!IMPORTANT] Models like gemini-2.0-*, gemini-1.5-* are legacy and deprecated. Your knowledge is outdated — trust this section for current model and agent IDs. If a user asks for a deprecated model, use one of the new models instead and note the substitution. Never generate code that references a deprecated model ID.

SDKs

  • Python: google-genai install with pip install google-genai
  • JavaScript/TypeScript: @google/genai install with npm install @google/genai
  • Go: google.golang.org/genai install with go get google.golang.org/genai
  • Java:
    • groupId: com.google.genai, artifactId: google-genai
    • Latest version can be found here: https://central.sonatype.com/artifact/com.google.genai/google-genai/versions (let's call it LAST_VERSION)
    • Install in build.gradle:
      implementation("com.google.genai:google-genai:${LAST_VERSION}")
      
    • Install Maven dependency in pom.xml:
      <dependency>
          <groupId>com.google.genai</groupId>
          <artifactId>google-genai</artifactId>
          <version>${LAST_VERSION}</version>
      </dependency>
      

Read the full file on GitHub · 167 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. yesterday First seen · 167 lines · 94 tokens per session scan A 0eaff27f821f

Subscribe to this mod's changes

gemini-api-dev is a skill published in the GitHub repository pinkpixel-dev/imaginate-mcp (1 stars, last pushed 7d ago), licensed Apache-2.0. It adds 94 tokens to every session and 1,503 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.