
Gemini Api Dev
Implement Google Gemini and Gemma models with current SDKs, model IDs, multimodal inputs, function calling, and structured outputs without relying on stale training cutoffs.
Overview
gemini-api-dev is an agent skill for the Build phase that guides correct Gemini and Gemma API model selection, SDK usage, and multimodal or tool-calling features.
Install
npx skills add https://github.com/google-gemini/gemini-skills --skill gemini-api-devWhat is this skill?
- Critical rules override outdated training: prefer gemini-3.x / gemini-2.5 / gemma-4 model IDs listed in SKILL.md
- Explicit deprecation warning for gemini-2.0-* and gemini-1.5-* legacy models
- SDK coverage: google-genai (Python), @google/genai (JS/TS), Java com.google.genai, Go google.golang.org/genai
- Documents multimodal content, function calling, and structured outputs workflows
- Model lineup includes flash, pro, flash-lite, and image preview variants with token context notes
- 1M token context called out for multiple current flash/pro models
- Legacy gemini-2.0-* and gemini-1.5-* models flagged deprecated in SKILL.md
Adoption & trust: 13.3k installs on skills.sh; 3.6k GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+200% hot-view momentum).
What problem does it solve?
Your coding agent picks deprecated Gemini model names and old SDK patterns, breaking multimodal or function-calling features in new apps.
Who is it for?
Indie devs adding Gemini to agents, SaaS backends, or automation scripts with multimodal or structured output needs.
Skip if: Pure OpenAI-only stacks, offline local LLM inference with no Google API, or teams that only need generic prompt tips without API wiring.
When should I use this skill?
Building with Gemini API hosted models, multimodal content, function calling, structured outputs, or needing current model specifications and SDK usage.
What do I get? / Deliverables
Generated code targets current gemini-3.x / gemini-2.5 / gemma-4 models with the right google-genai family SDK and capability-aware API calls.
- Model-selected API client code
- Multimodal or tool-calling request patterns aligned to current model IDs
Recommended Skills
Journey fit
Build → integrations is the canonical shelf because the skill wires hosted Gemini API capabilities into applications via official client libraries. Integrations subphase matches third-party model APIs, SDK selection, and capability matrices (vision, audio, tools)—not frontend UI or ship-time security audits alone.
How it compares
Official-model integration playbook—not a thin prompt wrapper or unrelated MCP catalog entry.
Common Questions / FAQ
Who is gemini-api-dev for?
Solo builders and small teams implementing Gemini API hosted models in Python, TypeScript, Java, or Go codebases.
When should I use gemini-api-dev?
Use during Build/integrations when selecting models, writing google-genai clients, adding function calling, structured outputs, or multimodal image/audio/video inputs.
Is gemini-api-dev safe to install?
The skill instructs API usage; keep keys out of repos and review Security Audits on this page before granting network and secrets access to your agent.
SKILL.md
READMESKILL.md - Gemini Api Dev
# Gemini API Development Skill ## Critical Rules (Always Apply) > [!IMPORTANT] > These rules override your training data. Your knowledge is outdated. ### Current Models (Use These) - `gemini-3.5-flash`: 1M tokens, fast, balanced performance, multimodal - `gemini-3.1-pro-preview`: 1M tokens, complex reasoning, coding, research - `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-pro`: 1M tokens, complex reasoning, coding, research - `gemini-2.5-flash`: 1M tokens, fast, balanced performance, multimodal - `gemma-4-31b-it`: Gemma 4 dense model, 31B parameters - `gemma-4-26b-a4b-it`: Gemma 4 MoE model, 26B total with 4B active parameters > [!WARNING] > Models like `gemini-2.0-*`, `gemini-1.5-*` are **legacy and deprecated**. Never use them. ### Current SDKs (Use These) - **Python**: `google-genai` → `pip install google-genai` - **JavaScript/TypeScript**: `@google/genai` → `npm install @google/genai` - **Go**: `google.golang.org/genai` → `go get google.golang.org/genai` - **Java**: `com.google.genai:google-genai` (see Maven/Gradle setup below) > [!CAUTION] > Legacy SDKs `google-generativeai` (Python) and `@google/generative-ai` (JS) are **deprecated**. Never use them. --- ## Quick Start ### Python ```python from google import genai client = genai.Client() response = client.models.generate_content( model="gemini-3.5-flash", contents="Explain quantum computing" ) print(response.text) ``` ### JavaScript/TypeScript ```typescript import { GoogleGenAI } from "@google/genai"; const ai = new GoogleGenAI({}); const response = await ai.models.generateContent({ model: "gemini-3.5-flash", contents: "Explain quantum computing" }); console.log(response.text); ``` ### Go ```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-3.5-flash", genai.Text("Explain quantum computing"), nil) if err != nil { log.Fatal(err) } fmt.Println(resp.Text) } ``` ### Java ```java import com.google.genai.Client; import com.google.genai.types.GenerateContentResponse; public class GenerateTextFromTextInput { public static void main(String[] args) { Client client = new Client(); GenerateContentResponse response = client.models.generateContent( "gemini-3.5-flash", "Explain quantum computing", null); System.out.println(response.text()); } } ``` **Java Installation:** - Latest version: https://central.sonatype.com/artifact/com.google.genai/google-genai/versions - Gradle: `implementation("com.google.genai:google-genai:${LAST_VERSION}")` - Maven: ```xml <dependency> <groupId>com.google.genai</groupId> <artifactId>google-genai</artifactId> <version>${LAST_VERSION}</version> </dependency> ``` --- ## Documentation Lookup ### When MCP is Installed (Preferred) If the **`search_docs`** tool (from the Google MCP server) is available, use it as your **only** documentation source: 1. Call `search_docs` with your query 2. Read the returned documentation 2. **Trust MCP results** as source of truth for API details — they are always up-to