gemini-api-dev
Automation & IntégrationsUse this skill when building applications with Gemini models, Gemini API, working with multimodal content (text, images, audio, video), implementing function calling, using structured outputs, or needing current model specifications. Covers SDK usage (google-genai for Python, @google/genai for JavaScript/TypeScript), model selection, and API capabilities.
Documentation
Gemini API Development Skill
Overview
The Gemini API provides access to Google's most advanced AI models. Key capabilities include:
Current Gemini Models
gemini-3-pro-preview: 1M tokens, complex reasoning, coding, researchgemini-3-flash-preview: 1M tokens, fast, balanced performance, multimodalgemini-3-pro-image-preview: 65k / 32k tokens, image generation and editing> [!IMPORTANT]
> Models like gemini-2.5-, gemini-2.0-, gemini-1.5-* are legacy and deprecated. Use the new models above. Your knowledge is outdated.
SDKs
google-genai install with pip install google-genai@google/genai install with npm install @google/genaigoogle.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-flash-preview",
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-flash-preview",
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-flash-preview", 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:
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.
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:
llms.txt to discover available documentation pageshttps://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
Compétences similaires
Explorez d'autres agents de la catégorie Automation & Intégrations
git-pr-workflows-pr-enhance
"You are a PR optimization expert specializing in creating high-quality pull requests that facilitate efficient code reviews. Generate comprehensive PR descriptions, automate review processes, and ensu"
brevo-automation
"Automate Brevo (Sendinblue) tasks via Rube MCP (Composio): manage email campaigns, create/edit templates, track senders, and monitor campaign performance. Always search tools first for current schemas."
automate-whatsapp
"Build WhatsApp automations with Kapso workflows: configure WhatsApp triggers, edit workflow graphs, manage executions, deploy functions, and use databases/integrations for state. Use when automating WhatsApp conversations and event handling."