| name | gemini-api-dev |
| description | The Gemini API provides access to Google's most advanced AI models. Key capabilities include: |
| risk | unknown |
| source | community |
| date_added | 2026-02-27 |
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 Gemini Models
gemini-3.1-pro-preview: 1M tokens, advanced intelligence, complex problem-solving skills, and powerful agentic capabilities
gemini-3.5-flash: 1M tokens, most intelligent model for sustained frontier performance on agentic and coding tasks
gemini-3.1-flash-lite: Frontier-class performance rivaling larger models at a fraction of the cost
gemini-3.1-flash-image-preview: High-efficiency production-scale visual creation
[!IMPORTANT]
Models like gemini-3-pro-preview are deprecated and shut down. Use the new models above. Your knowledge is outdated.
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
[!WARNING]
Legacy SDKs google-generativeai (Python) and @google/generative-ai (JS) are deprecated. Migrate to the new SDKs above urgently by following the Migration Guide.
Quick Start
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
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
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)
}
API spec (source of truth)
Always use the latest REST API discovery spec as the source of truth for API definitions (request/response schemas, parameters, methods). Fetch the spec when implementing or debugging API integration:
- v1beta (default):
https://generativelanguage.googleapis.com/$discovery/rest?version=v1beta
Use this unless the integration is explicitly pinned to v1. The official SDKs (google-genai, @google/genai, google.golang.org/genai) target v1beta.
- v1:
https://generativelanguage.googleapis.com/$discovery/rest?version=v1
Use only when the integration is specifically set to v1.
When in doubt, use v1beta. Refer to the spec for exact field names, types, and supported operations.
How to use the Gemini API
For detailed API documentation, fetch from the official docs index:
llms.txt URL: https://ai.google.dev/gemini-api/docs/llms.txt
This index contains links to all documentation pages in .md.txt format. Use web fetch tools to:
- Fetch
llms.txt to discover available documentation pages
- Fetch specific pages (e.g.,
https://ai.google.dev/gemini-api/docs/function-calling.md.txt)
Key Documentation Pages
[!IMPORTANT]
Those are not all the documentation pages. Use the llms.txt index to discover available documentation pages
When to Use
This skill is applicable to execute the workflow or actions described in the overview.