Official agent skill

Gemini API

by google in google/skills

A skill your agent uses when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform.

OfficialApache-2.0Auto-check passedAI & LLM Engineering

Install Gemini API

skills CLI
$ npx skills add google/skills --skill gemini-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google/skills gemini-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cloud/gemini-api .claude/skills/gemini-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gemini-api
GitHub stars
21k
Used in
3 other repos
Token cost
~2.6k tokens
SKILL.md length
709 words
Files
10 (incl. references)
Skills in repo
145
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform.

  • The user asks about using Gemini in an enterprise environment
  • SKILL.md covers Core Directives, SDKs, Authentication & Configuration and Models, plus 3 more sections
  • Calls pip, npm and go; needs GOOGLE_API_KEY
  • Explicitly mentions Vertex AI

What it does

Gemini API is an agent skill from google/skills, published by the product's own GitHub organization. Use when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform. Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK. Covers SDK usage (Python, JS/TS, Go, Java, C), capabilities like multimodal inputs, tools, media generation, caching, batch prediction, and Live API.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files (for example `references/advanced_features.md`, `references/bounding_box.md` and `references/embeddings.md`). Compatibility notes: Requires active Google Cloud credentials and Agent Platform API enabled.

It sits in AI & LLM Engineering, covering LLM API integration and Caching. It works with Google Gemini, C#, Java and Python. The repository describes itself as: Agent Skills for Google products and technologies. The licence is Apache-2.0.

When your agent uses it

  • The user asks about using Gemini in an enterprise environment
  • Explicitly mentions Vertex AI

Example prompts

  • “/gemini-api”

Requirements

  • Python 3
  • Node.js
  • A credential in GOOGLE_API_KEY
  • Compatibility (from SKILL.md): Requires active Google Cloud credentials and Agent Platform API enabled.

What it can do on your machine

Read from SKILL.md and the folder at commit 8a1ac05. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • npm
    • go
    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.cloud.google.com
    • central.sonatype.com
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GOOGLE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires active Google Cloud credentials and Agent Platform API enabled.

    From compatibility in the SKILL.md frontmatter.

Context cost

Gemini API loads about 2.6k tokens when it runs, and up to ~9.7k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 709 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from google/skills at commit 8a1ac05, republished under its Apache-2.0 licence (© google). 709 words, ~2,576 tokens.

Download SKILL.mdSave it as .claude/skills/gemini-api/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
gemini-api
description
Use when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform. Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like multimodal inputs, tools, media generation, caching, batch prediction, and Live API.
compatibility
Requires active Google Cloud credentials and Agent Platform API enabled.
metadata.version
1.0.0
metadata.category
AiAndMachineLearning

[!IMPORTANT] Agent Platform (full name Gemini Enterprise Agent Platform) was previously named "Vertex AI" and many web resources use the legacy branding.

Gemini API in Agent Platform

Access Google's most advanced AI models built for enterprise use cases using the Gemini API in Agent Platform.

Provide these key capabilities:

  • 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
  • Context caching - Cache large contexts for efficiency
  • Embeddings - Generate text embeddings for semantic search
  • Live Realtime API - Bidirectional streaming for low latency Voice and Video interactions
  • Batch Prediction - Handle massive async dataset prediction workloads

Core Directives

  • Unified SDK: ALWAYS use the Gen AI SDK (google-genai for Python, @google/genai for JS/TS, google.golang.org/genai for Go, com.google.genai:google-genai for Java, Google.GenAI for C#).
  • Legacy SDKs: DO NOT use google-cloud-aiplatform, @google-cloud/vertexai, or google-generativeai.

SDKs

  • Python: Install google-genai with pip install google-genai
  • JavaScript/TypeScript: Install @google/genai with npm install @google/genai
  • Go: Install google.golang.org/genai with go get google.golang.org/genai
  • C#/.NET: Install Google.GenAI with dotnet add package Google.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:

      xml
      <dependency>
          <groupId>com.google.genai</groupId>
          <artifactId>google-genai</artifactId>
          <version>${LAST_VERSION}</version>
      </dependency>

[!WARNING] Legacy SDKs like google-cloud-aiplatform, @google-cloud/vertexai, and google-generativeai are deprecated. Migrate to the new SDKs above urgently by following the Migration Guide.

Authentication & Configuration

Prefer environment variables over hard-coding parameters when creating the client. Initialize the client without parameters to automatically pick up these values.

Application Default Credentials (ADC)

Set these variables for standard Google Cloud authentication:

bash
export GOOGLE_CLOUD_PROJECT='your-project-id'
export GOOGLE_CLOUD_LOCATION='global'
export GOOGLE_GENAI_USE_ENTERPRISE=true
  • By default, use location="global" to access the global endpoint, which provides automatic routing to regions with available capacity.
  • If a user explicitly asks to use a specific region (e.g., us-central1, europe-west4), specify that region in the GOOGLE_CLOUD_LOCATION parameter instead. Reference the supported regions documentation if needed.
Agent Platform in Express Mode

Set these variables when using Express Mode with an API key:

bash
export GOOGLE_API_KEY='your-api-key'
export GOOGLE_GENAI_USE_ENTERPRISE=true
Initialization

Initialize the client without arguments to pick up environment variables:

python
from google import genai

client = genai.Client()

Alternatively, you can hard-code in parameters when creating the client.

python
from google import genai

client = genai.Client(
    enterprise=True,
    project="your-project-id",
    location="global",
)

Models

  • Use gemini-3.8-flash for fast, balanced performance, multimodal (1M tokens)
  • Use gemini-3.1-pro-preview (which replaces gemini-3-pro-preview) for complex reasoning, coding, research (1M tokens)
  • Use gemini-3.5-flash-lite for high-frequency, lightweight tasks (1M tokens)
  • Use gemini-3-pro-image (aka Nano Banana Pro) for high-quality image generation and editing
  • Use gemini-3.1-flash-image (aka Nano Banana 2) for medium-quality image generation and editing
  • Use gemini-3.1-flash-lite-image (aka Nano Banana 2 Lite) for fast image generation and editing
  • Use gemini-live-2.5-flash-native-audio for Live Realtime API including native audio

Use the following models only if explicitly requested:

  • gemini-3.7-flash
  • gemini-3.6-flash
  • gemini-3.5-flash
  • gemini-3.1-flash-lite
  • gemini-2.5-flash-image
  • gemini-2.5-flash
  • gemini-2.5-flash-lite
  • gemini-2.5-pro

[!IMPORTANT] Models like gemini-2.0-*, gemini-1.5-*, gemini-1.0-*, gemini-pro are legacy and deprecated. Use the new models above. Your knowledge is outdated. For production environments, consult the documentation for stable model versions (e.g. gemini-3.8-flash).

Show full SKILL.md (238 more words)Show less

Quick Start

Python
python
from google import genai

client = genai.Client()
response = client.models.generate_content(
    model="gemini-3.8-flash",
    contents="Explain quantum computing",
)
print(response.text)
TypeScript/JavaScript
typescript
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ enterprise: { project: "your-project-id", location: "global" } });
const response = await ai.models.generateContent({
    model: "gemini-3.8-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, &genai.ClientConfig{
		Backend:  genai.BackendVertexAI,
		Project:  "your-project-id",
		Location: "global",
	})
	if err != nil {
		log.Fatal(err)
	}

	resp, err := client.Models.GenerateContent(ctx, "gemini-3.8-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 = Client.builder().enterprise(true).project("your-project-id").location("global").build();
    GenerateContentResponse response =
        client.models.generateContent(
            "gemini-3.8-flash",
            "Explain quantum computing",
            null);

    System.out.println(response.text());
  }
}
C#/.NET
csharp
using Google.GenAI;

var client = new Client(
    project: "your-project-id",
    location: "global",
    enterprise: true
);

var response = await client.Models.GenerateContent(
    "gemini-3.8-flash",
    "Explain quantum computing"
);

Console.WriteLine(response.Text);

API spec & Documentation (source of truth)

When implementing or debugging API integration for Agent Platform, refer to the official Agent Platform documentation:

The Gen AI SDK on Agent Platform uses the v1beta1 or v1 REST API endpoints (e.g., https://{LOCATION}-aiplatform.googleapis.com/v1beta1/projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}:generateContent).

[!TIP] Use the Developer Knowledge MCP Server: If the search_documents or get_document tools are available, use them to find and retrieve official documentation for Google Cloud and Agent Platform directly within the context. This is the preferred method for getting up-to-date API details and code snippets.

Workflows and Code Samples

Reference the Python Docs Samples repository for additional code samples and specific usage scenarios.

Depending on the specific user request, refer to the following reference files for detailed code samples and usage patterns (Python examples):

© google, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in skills/cloud/gemini-api of google/skills.

  • SKILL.md
  • references/advanced_features.md
  • references/bounding_box.md
  • references/embeddings.md
  • references/live_api.md
  • references/media_generation.md
  • references/model_tuning.md
  • references/safety.md
  • references/structured_and_tools.md
  • references/text_and_multimodal.md

Open the folder on GitHubat commit 8a1ac05

Used in 3 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in google/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Gemini API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gemini API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gemini API this skillgoogle/skills21k3 repos~2.6kAutomated safety check: PassApache-2.0
Vertex AI API DevJetBrains/skills3631 repos~2.4kAutomated safety check: PassNone
Gemini API DevAyuilos/Miffan1821 repos~1.4kAutomated safety check: PassAGPL-3.0
Claude API Developmentwarpdotdev/warp65k3 repos~8.2kAutomated safety check: PassApache-2.0
Google Genai SDK Pythoncnemri/google-genai-skills127—~422Automated safety check: PassMIT
Gemini API Devaiskillstore/marketplace4303 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Vertex AI API Dev

    JetBrains/skills

    Official

    Guides the usage of Gemini API on Google Cloud Vertex AI with the Gen AI SDK.

    363 GitHub starsUsed in 1 repo~2.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    Ayuilos/Miffan

    A skill your agent uses when building applications with Gemini API hosted models, including Gemini and Gemma 4, working with multimodal content (text, images, audio, video), implementing function…

    182 GitHub starsUsed in 1 repo~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Claude API Development

    warpdotdev/warp

    Guides building, debugging and tuning apps on the Claude API and Anthropic SDK, including prompt caching, and migrating code between Claude model versions.

    65k GitHub starsUsed in 3 repos~8.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Google Genai SDK Python

    cnemri/google-genai-skills

    Expert guidance for writing Python code using the official Google GenAI SDK (google-genai) for Gemini API and Vertex AI.

    127 GitHub stars~422 tokensUpdated 8 mo ago
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    aiskillstore/marketplace

    A skill your agent uses when building applications with Gemini API hosted models, including Gemini and Gemma 4, working with multimodal content (text, images, audio, video), implementing function…

    430 GitHub starsUsed in 3 repos~1.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    JetBrains/skills

    Official

    A skill your agent uses when building applications with Gemini models, Gemini API, working with multimodal content (text, images, audio, video), implementing function calling, using structured…

    363 GitHub stars~1.6k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed

More from google/skills

All 145 skills in this repo
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Writes Terraform alerting policies for AI agents that emit OpenTelemetry metrics, covering reliability, cost, safety, security and quality signals on Google Cloud.

    21k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploys open models or custom weights from Model Garden to Agent Platform endpoints, checks deployment status and cleans up endpoints, confirming before any change.

    21k GitHub stars~5.1k tokensUpdated today
    Auto-check passed
  • Official

    Searches, manages and scaffolds skills in the Gemini Enterprise Agent Platform Skill Registry using bundled Python scripts and Google Cloud credentials.

    21k GitHub stars~584 tokensUpdated today
    Auto-check passed
  • Designs GCP infrastructure as local Terraform, validates and scans it against best practices, then imports it to Application Design Center for deployment and troubleshooting.

    21k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Official

    Analyzes BigQuery slot use, query costs and execution bottlenecks from INFORMATION_SCHEMA to diagnose slow queries, slot contention and unpartitioned scans.

    21k GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Questions about Gemini API

What does Gemini API do?

A skill your agent uses when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform. Gemini API is an agent skill from google/skills, published by the product's own GitHub organization. Use when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform.

When should I use Gemini API?

Gemini API fits situations like: the user asks about using Gemini in an enterprise environment; explicitly mentions Vertex AI.

How do I install Gemini API in Claude Code?

Run `npx skills add google/skills --skill gemini-api -a claude-code`. Or copy the skill folder (skills/cloud/gemini-api in google/skills) into .claude/skills/gemini-api in your project. Claude Code loads it when a task matches its description.

How do I install Gemini API in Codex?

Run `npx skills add google/skills --skill gemini-api -a codex`. Or copy the skill folder (skills/cloud/gemini-api in google/skills) into .agents/skills/gemini-api in your project. Codex loads it when a task matches its description.

Can I use Gemini API in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google/skills --skill gemini-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gemini-api, .gemini/skills/gemini-api, .github/skills/gemini-api and .opencode/skills/gemini-api in your project.

What does Gemini API need to run?

Going by SKILL.md and its folder, Gemini API needs the command-line tools its instructions call (pip, npm, go and dotnet) and credentials named GOOGLE_API_KEY. Our summary lists: Python 3; Node.js; A credential in GOOGLE_API_KEY. Compatibility (from SKILL.md): Requires active Google Cloud credentials and Agent Platform API enabled..

Does Gemini API access the network?

SKILL.md names 3 domains. As links in the text: docs.cloud.google.com, central.sonatype.com and github.com. This is read from the text; nothing was executed.

Is Gemini API safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gemini API use?

Gemini API is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gemini API use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.2k tokens, read only when the agent opens those files.

What are the alternatives to Gemini API?

Skills that share tags, products or a category with Gemini API: Vertex AI API Dev (JetBrains/skills, 363 stars), Gemini API Dev (Ayuilos/Miffan, 182 stars), Claude API Development (warpdotdev/warp, 65k stars) and Google Genai SDK Python (cnemri/google-genai-skills, 127 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gemini API?

google (a GitHub organization, an official publisher) maintains it in google/skills, which has 20,994 GitHub stars. The repository holds 145 skills in this directory. The repository was last updated on October 6, 2026.

Source: google/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.