Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

gemini-api-2026Gemini API 2026 搜索

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

272

周安装

12

GitHub Stars

公开资料未说明

下载量

97
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gemini-api-2026(Gemini API 2026 搜索)
来源仓库:https://github.com/krishamaze/skills
仓库路径:skills/gemini-api-2026
安装命令:
npx skills add https://github.com/krishamaze/skills --skill gemini-api-2026
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/krishamaze/skills --skill gemini-api-2026

简介

用于辅助 API 设计、接口文档和请求响应结构梳理。

  • 适合生成 OpenAPI 草稿、检查字段命名或整理错误码。
  • 使用时需确认真实业务语义、鉴权方式和分页规则。gemini-api-2026 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 安装方式:通过 npx skills add 命令从指定仓库添加技能。
  • 涉及接口文档时应避免凭空补字段,优先从现有代码或样例提取事实。

SKILL.md

Gemini API Development Skill

Source: Official Gemini API documentation scraped 2026-02-27 Coverage: All 81 documentation files

Quick Start

from google import genai  # CRITICAL: NOT google.generativeai

client = genai.Client()  # Uses GEMINI_API_KEY env var automatically

response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="Hello world"
)
print(response.text)

JavaScript:

import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});  // Uses GEMINI_API_KEY env var
const response = await ai.models.generateContent({
    model: "gemini-3-flash-preview",
    contents: "Hello world"
});
console.log(response.text);

CRITICAL GOTCHAS (Read First)

  1. SDK import: from google import genai — NOT google.generativeai (legacy)
  2. Temperature: Default is 1.0 for Gemini 3 — do NOT lower it; causes loops/degraded performance
  3. Thinking params: Gemini 3 uses thinking_level ("low"/"medium"/"high"); Gemini 2.5 uses thinking_budget (integer tokens)
  4. Thought signatures: Gemini 3 REQUIRES thought signatures echoed back during function calling or you get a 400 error. SDKs handle this automatically in chat mode.
  5. API default: SDK defaults to v1beta. Use http_options={'api_version': 'v1alpha'} for experimental features.
  6. REST auth header: x-goog-api-key: $GEMINI_API_KEY (not Authorization Bearer)

Models Reference

Gemini 3 Series (Current)

ModelStringNotes
Gemini 3.1 Pro Previewgemini-3.1-pro-previewLatest; also gemini-3.1-pro-preview-customtools variant
Gemini 3 Flash Previewgemini-3-flash-previewDefault workhorse; shutdown: no date
Gemini 3 Pro Image Previewgemini-3-pro-image-preview"Nano Banana Pro" — native image gen
Gemini 3.1 Flash Image Previewgemini-3.1-flash-image-preview"Nano Banana 2" — fast image gen

⚠️ Gemini 3 Pro Preview (gemini-3-pro-preview) shuts down March 9, 2026 → migrate to gemini-3.1-pro-preview

Gemini 2.5 Series (Stable)

ModelStringShutdown
Gemini 2.5 Progemini-2.5-proJune 17, 2026
Gemini 2.5 Flashgemini-2.5-flashJune 17, 2026
Gemini 2.5 Flash Litegemini-2.5-flash-liteJuly 22, 2026
Gemini 2.5 Flash Imagegemini-2.5-flash-imageOct 2, 2026

Gemini 2.0 Series (Deprecating)

  • gemini-2.0-flash, gemini-2.0-flash-lite → shutdown June 1, 2026

Specialized Models

  • TTS: gemini-2.5-flash-preview-tts
  • Live API: gemini-2.5-flash-native-audio-preview-12-2025
  • Computer Use: gemini-2.5-computer-use-preview-10-2025, gemini-3-flash-preview
  • Deep Research: deep-research-pro-preview-12-2025 (via Interactions API only)
  • Embeddings: gemini-embedding-001
  • Video (Veo): veo-3.1-generate-preview
  • Images (Imagen): imagen-4.0-generate-001
  • Music (Lyria): models/lyria-realtime-exp
  • Robotics: gemini-robotics-er-1.5-preview
  • LearnLM: experimental tutor model

Latest Aliases

  • gemini-pro-latestgemini-3-pro-preview
  • gemini-flash-latestgemini-3-flash-preview

Libraries & Installation

pip install google-genai          # Python
npm install @google/genai          # JavaScript
go get google.golang.org/genai     # Go
# Java: com.google.genai:google-genai:1.0.0
# C#: dotnet add package Google.GenAI

OpenAI compatibility (3 line change):

from openai import OpenAI
client = OpenAI(
    api_key="GEMINI_API_KEY",
    base_url="https://generativelanguage.googleapis.com/v1beta/openai/"
)
response = client.chat.completions.create(model="gemini-3-flash-preview", messages=[...])

Core Generation

System Instructions

from google.genai import types

response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="User message",
    config=types.GenerateContentConfig(
        system_instruction="You are a helpful assistant.",
        temperature=1.0,
        max_output_tokens=1024,
    )
)

Multi-turn Chat

chat = client.chats.create(model="gemini-3-flash-preview")
response = chat.send_message("Hello")
print(response.text)
response2 = chat.send_message("Tell me more")
print(response2.text)

Streaming

for chunk in client.models.generate_content_stream(
    model="gemini-3-flash-preview",
    contents="Write a long story"
):
    print(chunk.text, end="")

Token Counting

# Before sending:
count = client.models.count_tokens(model="gemini-3-flash-preview", contents=prompt)
print(count.total_tokens)

# After generating:
print(response.usage_metadata)
# Fields: prompt_token_count, candidates_token_count, thoughts_token_count, total_token_count

1 token ≈ 4 characters; 100 tokens ≈ 60-80 English words.


Thinking (Reasoning)

Gemini 3 — thinking_level

config=types.GenerateContentConfig(
    thinking_config=types.ThinkingConfig(thinking_level="low")  # "low", "medium", "high"
)

Gemini 2.5 — thinking_budget

config=types.GenerateContentConfig(
    thinking_config=types.ThinkingConfig(thinking_budget=1024)  # token budget; 0=disabled
)

Thinking is enabled by default on 2.5 and 3 models — causes higher latency/tokens. Disable if optimizing for speed.


Multimodal Input

Images (Inline — under 20MB)

with open('image.jpg', 'rb') as f:
    image_bytes = f.read()

response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents=[
        types.Part.from_bytes(data=image_bytes, mime_type='image/jpeg'),
        "Caption this image."
    ]
)

Images (URL fetch)

import requests
image_bytes = requests.get("https://example.com/image.jpg").content
image = types.Part.from_bytes(data=image_bytes, mime_type="image/jpeg")

PDF Documents (Inline — under 50MB)

import pathlib
filepath = pathlib.Path('file.pdf')
response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents=[
        types.Part.from_bytes(data=filepath.read_bytes(), mime_type='application/pdf'),
        "Summarize this document"
    ]
)

Audio (via Files API)

myfile = client.files.upload(file="sample.mp3")
response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents=["Describe this audio", myfile]
)

Audio capabilities: transcription, translation, speaker diarization, emotion detection, timestamps. For real-time audio → use Live API.

Video (via Files API)

myfile = client.files.upload(file="video.mp4")
response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents=[myfile, "Summarize this video"]
)

YouTube URLs

# Include YouTube URL directly in contents
response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents=["https://www.youtube.com/watch?v=XXXXX", "Summarize this video"]
)

File Input Methods Comparison

MethodMax SizeBest ForPersistence
Inline data100MB (50MB PDF)Small files, one-offNone
Files API2GB/file, 20GB/projectLarge files, reuse48 hours
GCS URI2GB/file, unlimited storageGCS files30 days (registration)
External URLs100MBPublic URLs, AWS/Azure/GCSNone (fetched per request)

Files API

# Upload
myfile = client.files.upload(file="path/to/file.pdf")
print(myfile.uri)  # use in requests

# List
for file in client.files.list():
    print(file.name)

# Delete
client.files.delete(name=myfile.name)

Files API limits: 2GB per file, 20GB per project, 48-hour TTL.


Structured Output

from pydantic import BaseModel

class Recipe(BaseModel):
    name: str
    ingredients: list[str]
    steps: list[str]

response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="Give me a chocolate cake recipe",
    config=types.GenerateContentConfig(
        response_mime_type="application/json",
        response_schema=Recipe,
    )
)
import json
recipe = json.loads(response.text)

Tools: Built-in

Google Search (Grounding)

grounding_tool = types.Tool(google_search=types.GoogleSearch())
config = types.GenerateContentConfig(tools=[grounding_tool])
response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="Who won Euro 2024?",
    config=config
)
# Check response.candidates[0].grounding_metadata for citations

Response includes groundingMetadata with webSearchQueries, groundingChunks, groundingSupports.

URL Context

config = types.GenerateContentConfig(tools=[{"url_context": {}}])
# Include URLs in the prompt text

Google Maps (NOT available with Gemini 3)

# Only for Gemini 2.5 models
config = types.GenerateContentConfig(
    tools=[types.Tool(google_maps=types.GoogleMaps())],
    tool_config=types.ToolConfig(retrieval_config=types.RetrievalConfig(
        lat_lng=types.LatLng(latitude=34.05, longitude=-118.25)
    ))
)

Code Execution

config = types.GenerateContentConfig(
    tools=[types.Tool(code_execution=types.CodeExecution())]
)

Function Calling

def get_weather(location: str) -> dict:
    return {"temp": 72, "condition": "sunny"}

response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="What's the weather in NYC?",
    config=types.GenerateContentConfig(
        tools=[get_weather],
        tool_config=types.ToolConfig(
            function_calling_config=types.FunctionCallingConfig(mode="AUTO")
        )
    )
)

# Check for function calls
for part in response.candidates[0].content.parts:
    if part.function_call:
        result = get_weather(**part.function_call.args)
        # Send result back...

⚠️ Gemini 3 Thought Signatures in Function Calling: When Gemini 3 returns function calls, each step includes a thoughtSignature. You MUST echo it back exactly — omitting it causes a 400 error. The SDK handles this automatically if you use the chat API or append the full response object to history.

Manual handling pattern:

# After getting FC response, include the full model turn (with signatures) in next request
contents = [
    {"role": "user", "parts": [{"text": "original request"}]},
    model_response.candidates[0].content,  # includes thoughtSignature
    {"role": "user", "parts": [{"function_response": {"name": "fn", "response": result}}]}
]

Embeddings

result = client.models.embed_content(
    model="gemini-embedding-001",
    contents="What is the meaning of life?"
)
print(result.embeddings)

# Batch
result = client.models.embed_content(
    model="gemini-embedding-001",
    contents=["text 1", "text 2", "text 3"]
)

Model: gemini-embedding-001 (GA until July 14, 2026) Use case: semantic search, RAG, classification, clustering.


File Search (RAG)

Managed RAG — free file storage and free embedding generation at query time. Pay only for initial indexing + model tokens.

# Create store
file_search_store = client.file_search_stores.create(
    config={'display_name': 'my-store'}
)

# Upload directly
operation = client.file_search_stores.upload_to_file_search_store(
    file='document.pdf',
    file_search_store_name=file_search_store.name,
    config={'display_name': 'My Doc'}
)
while not operation.done:
    time.sleep(5)
    operation = client.operations.get(operation)

# Query
response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="What does the document say about X?",
    config=types.GenerateContentConfig(
        tools=[types.Tool(
            file_search=types.FileSearch(
                file_search_store_names=[file_search_store.name]
            )
        )]
    )
)

Context Caching

Reduces cost by caching repeated large contexts. Paid tier only.

from google.genai import types

# Create cache
cache = client.caches.create(
    model="gemini-3-flash-preview",
    config=types.CreateCachedContentConfig(
        contents=[large_document_content],
        system_instruction="You are an expert analyst.",
        ttl="3600s",  # 1 hour
        display_name="my-cache"
    )
)

# Use cache
response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="What are the key findings?",
    config=types.GenerateContentConfig(cached_content=cache.name)
)
print(response.usage_metadata.cached_content_token_count)

Implicit caching: 2048+ token prefix is automatically cached at 75% discount. Explicit caching: manual TTL control.


Batch API

50% cost reduction for non-urgent workloads. 24-hour SLO.

# Create batch job (see batch-api.md for full syntax)
batch_job = client.batches.create(
    model="gemini-3-flash-preview",
    src="gs://bucket/requests.jsonl",
    config=types.CreateBatchJobConfig(dest="gs://bucket/responses/")
)

# Poll
while batch_job.state not in ["JOB_STATE_SUCCEEDED", "JOB_STATE_FAILED"]:
    time.sleep(30)
    batch_job = client.batches.get(name=batch_job.name)

Interactions API

Used for agents (Deep Research). Not accessible via generate_content.

import time

interaction = client.interactions.create(
    input="Research the history of quantum computing",
    agent='deep-research-pro-preview-12-2025',
    background=True  # REQUIRED for long tasks
)

while True:
    interaction = client.interactions.get(interaction.id)
    if interaction.status == "completed":
        print(interaction.outputs[-1].text)
        break
    elif interaction.status == "failed":
        break
    time.sleep(10)

For combining with your own data:

interaction = client.interactions.create(
    input="Compare our Q4 report to public benchmarks",
    agent="deep-research-pro-preview-12-2025",
    background=True,
    tools=[{"type": "file_search", "file_search_store_names": ["fileSearchStores/my-store"]}]
)

Live API (Real-time Voice/Video)

For interactive, streaming audio/video sessions via WebSocket.

import asyncio
from google import genai

client = genai.Client()
model = "gemini-2.5-flash-native-audio-preview-12-2025"

async def main():
    async with client.aio.live.connect(
        model=model,
        config={"response_modalities": ["AUDIO"]}
    ) as session:
        await session.send_client_content(
            turns="Hello, how are you?",
            turn_complete=True
        )
        async for response in session.receive():
            if response.data:
                # raw PCM audio bytes (24kHz, 16-bit, little-endian)
                pass
            if response.server_content and response.server_content.turn_complete:
                break

asyncio.run(main())

Audio format: raw PCM, little-endian, 16-bit. Output: 24kHz. Input: natively 16kHz (resampled if different).

Session limits:

  • Audio-only: 15 min (without compression)
  • Audio+video: 2 min
  • Connection: ~10 min → use Session Resumption

Session Resumption:

config=types.LiveConnectConfig(
    session_resumption=types.SessionResumptionConfig(handle=previous_handle)
)
# Save new handle from session_resumption_update messages

Context window compression (for long sessions):

config=types.LiveConnectConfig(
    context_window_compression=types.ContextWindowCompressionConfig(
        sliding_window=types.SlidingWindow()
    )
)

Tools in Live API: Google Search ✅, Function calling ✅, Google Maps ❌, Code execution ❌, URL context ❌

Live API function calling (manual tool response required):

# After receiving tool_call in response:
await session.send_tool_response(function_responses=[
    types.FunctionResponse(id=fc.id, name=fc.name, response={"result": "ok"})
    for fc in response.tool_call.function_calls
])

Ephemeral Tokens (Live API Security)

For client-side Live API connections. Short-lived tokens that expire, reducing risk vs. exposing API keys.

import datetime
now = datetime.datetime.now(tz=datetime.timezone.utc)

client = genai.Client(http_options={'api_version': 'v1alpha'})
token = client.auth_tokens.create(config={
    'uses': 1,
    'expire_time': now + datetime.timedelta(minutes=30),
    'new_session_expire_time': now + datetime.timedelta(minutes=1),
    'http_options': {'api_version': 'v1alpha'},
})
# Send token.name to client; use as API key for Live API only

Can lock token to specific config:

'live_connect_constraints': {
    'model': 'gemini-2.5-flash-native-audio-preview-12-2025',
    'config': {'response_modalities': ['AUDIO']}
}

Image Generation (Nano Banana)

  • Nano Banana 2 = gemini-3.1-flash-image-preview — fast/high-volume
  • Nano Banana Pro = gemini-3-pro-image-preview — pro quality, thinking
  • Nano Banana = gemini-2.5-flash-image — speed/efficiency
from PIL import Image

response = client.models.generate_content(
    model="gemini-3.1-flash-image-preview",
    contents="Create a picture of a tropical beach at sunset"
)

for part in response.parts:
    if part.text:
        print(part.text)
    elif part.inline_data:
        image = part.as_image()
        image.save("output.png")

All generated images include SynthID watermark.


Video Generation (Veo 3.1)

operation = client.models.generate_videos(
    model="veo-3.1-generate-preview",
    prompt="A serene mountain lake at dawn"
)

while not operation.done:
    time.sleep(10)
    operation = client.operations.get(operation)

video = operation.response.generated_videos[0]
client.files.download(file=video.video)
video.video.save("output.mp4")

Capabilities: 8-second 720p/1080p/4K, portrait (9:16) or landscape (16:9), audio, video extension, first/last frame specification, up to 3 reference images.


Image Generation (Imagen — Standalone)

response = client.models.generate_images(
    model='imagen-4.0-generate-001',
    prompt='Robot holding a red skateboard',
    config=types.GenerateImagesConfig(number_of_images=4)
)
for gen_image in response.generated_images:
    gen_image.image.show()

TTS (Text-to-Speech)

import wave

response = client.models.generate_content(
    model="gemini-2.5-flash-preview-tts",
    contents="Say cheerfully: Have a wonderful day!",
    config=types.GenerateContentConfig(
        response_modalities=["AUDIO"],
        speech_config=types.SpeechConfig(
            voice_config=types.VoiceConfig(
                prebuilt_voice_config=types.PrebuiltVoiceConfig(voice_name='Kore')
            )
        )
    )
)

data = response.candidates[0].content.parts[0].inline_data.data
with wave.open("out.wav", "wb") as wf:
    wf.setnchannels(1)
    wf.setsampwidth(2)
    wf.setframerate(24000)
    wf.writeframes(data)

Multi-speaker TTS (up to 2 speakers):

config=types.GenerateContentConfig(
    response_modalities=["AUDIO"],
    speech_config=types.SpeechConfig(
        multi_speaker_voice_config=types.MultiSpeakerVoiceConfig(
            speaker_voice_configs=[
                types.SpeakerVoiceConfig(
                    speaker='Joe',
                    voice_config=types.VoiceConfig(
                        prebuilt_voice_config=types.PrebuiltVoiceConfig(voice_name='Kore')
                    )
                ),
                types.SpeakerVoiceConfig(
                    speaker='Jane',
                    voice_config=types.VoiceConfig(
                        prebuilt_voice_config=types.PrebuiltVoiceConfig(voice_name='Aoede')
                    )
                ),
            ]
        )
    )
)

Prompt must name speakers matching the config: "TTS the conversation between Joe and Jane: Joe:... Jane:..."


Music Generation (Lyria RealTime)

Experimental. Real-time streaming music via WebSocket.

client = genai.Client(http_options={'api_version': 'v1alpha'})

async with client.aio.live.music.connect(model='models/lyria-realtime-exp') as session:
    await session.set_weighted_prompts(prompts=[
        types.WeightedPrompt(text='minimal techno', weight=1.0)
    ])
    await session.set_music_generation_config(
        config=types.LiveMusicGenerationConfig(bpm=90, temperature=1.0)
    )
    await session.play()

    # Receive audio chunks
    async for message in session.receive():
        audio_data = message.server_content.audio_chunks[0].data
        # process PCM audio...

Control: session.play(), session.pause(), session.stop(), session.reset_context() Steer by sending new weighted prompts mid-stream. Reset context after BPM/scale changes.


Computer Use

Browser automation agent. Requires Playwright or similar for action execution.

config = genai.types.GenerateContentConfig(
    tools=[types.Tool(
        computer_use=types.ComputerUse(
            environment=types.Environment.ENVIRONMENT_BROWSER,
            excluded_predefined_functions=["drag_and_drop"]  # optional
        )
    )]
)

response = client.models.generate_content(
    model='gemini-2.5-computer-use-preview-10-2025',
    contents=[{"role": "user", "parts": [{"text": "Search Amazon for wireless headphones"}]}],
    config=config
)

# Model returns function_calls with actions like type_text_at, click_at
# Check response.candidates[0].content.parts for function_call items
# Coordinates are normalized 0-999; convert to actual pixels
# Recommended screen: 1440x900

Safety: Check safety_decision in response — require_confirmation means pause before executing.


Safety Settings

response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="Your prompt",
    config=types.GenerateContentConfig(
        safety_settings=[
            types.SafetySetting(
                category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH,
                threshold=types.HarmBlockThreshold.BLOCK_LOW_AND_ABOVE
            )
        ]
    )
)

Threshold options: OFF, BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE

Default for Gemini 2.5/3: All filters OFF by default.

Categories: Harassment, Hate speech, Sexually explicit, Dangerous

Built-in protections (cannot be disabled): Child safety, etc.

Check blocked response: response.candidates[0].finish_reason == "SAFETY" → inspect safety_ratings.


Media Resolution

Control token usage for images/videos/PDFs:

Global (all models):

config = types.GenerateContentConfig(
    media_resolution=types.MediaResolution.MEDIA_RESOLUTION_HIGH  # LOW, MEDIUM, HIGH
)

Per-part (Gemini 3 only, experimental):

client = genai.Client(http_options={'api_version': 'v1alpha'})
image_part = types.Part.from_bytes(
    data=image_bytes, mime_type='image/jpeg',
    media_resolution=types.MediaResolution.MEDIA_RESOLUTION_HIGH
)

Long Context

Most Gemini models support 1M+ token context windows.

1M tokens ≈ 50K lines of code, 8 novels, 200 podcast transcripts.

Optimization: Use context caching when reusing large contexts — 4x cheaper (Flash) + lower latency.

Best practice: Put your query at the END of the prompt (after all context material).

Multi-needle limitation: Model performs ~99% on single retrieval but degrades with many simultaneous retrievals.


API Versions

VersionUseDefault?
v1Stable, productionNo
v1betaNew features, may changeYes (SDK default)
v1alphaExperimental onlyNo
client = genai.Client(http_options={'api_version': 'v1'})  # force stable

Authentication

API Key (default):

export GEMINI_API_KEY=your_key_here

REST header: x-goog-api-key: $GEMINI_API_KEY

OAuth (for production with stricter controls):

  1. Enable Generative Language API in Cloud console
  2. Configure OAuth consent screen
  3. Create OAuth 2.0 Client ID
  4. Use application-default-credentials

Rate Limits & Billing

Tiers: Free Tier → Paid Tier (pay-as-you-go)

Upgrade: AI Studio → API Keys → Set up Billing

Paid tier benefits: Higher rate limits, advanced models, data not used for training.

Rate limit headers: Check x-goog-quota-* headers in responses.

Error 429: Rate limit exceeded → implement exponential backoff or request quota increase.


Common Error Codes

HTTPStatusCauseFix
400INVALID_ARGUMENTMalformed requestCheck API reference
400Missing thought_signatureGemini 3 FC without signatureUse SDK chat or echo signatures
403PERMISSION_DENIEDWrong API keyCheck key permissions
429RESOURCE_EXHAUSTEDRate limit hitBackoff, upgrade tier
500INTERNALContext too long / server errorReduce context, retry
503UNAVAILABLEOverloadedRetry or switch model
504DEADLINE_EXCEEDEDRequest too largeIncrease timeout

Framework Integrations

CrewAI

from crewai import LLM
gemini_llm = LLM(model='gemini/gemini-3-flash-preview', api_key=api_key, temperature=1.0)

LangGraph

from langchain_google_genai import ChatGoogleGenerativeAI
llm = ChatGoogleGenerativeAI(model="gemini-3-flash-preview")

LlamaIndex

from llama_index.llms.google_genai import GoogleGenAI
llm = GoogleGenAI(model="gemini-3-flash-preview")

Vercel AI SDK

npm install ai @ai-sdk/google

See Also

For detailed reference on specific topics:

  • Function calling deep-divereferences/tools-and-agents.md
  • Files API & multimodalreferences/files-and-media.md
  • Caching, Batch, Live deep-divereferences/advanced-features.md
  • Embeddings & RAGreferences/embeddings-and-rag.md
  • Image/Video generationreferences/generation.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.44%
按下载量换算38

Claude

29.46%
按下载量换算29

Cursor

20.03%
按下载量换算19

Gemini CLI

9.05%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills