gemini-api-dev by google-gemini/gemini-skills
npx skills add https://github.com/google-gemini/gemini-skills --skill gemini-api-devGemini API 提供了对谷歌最先进 AI 模型的访问。主要功能包括:
gemini-3-pro-preview: 100 万 tokens,复杂推理、编码、研究gemini-3-flash-preview: 100 万 tokens,快速、均衡性能、多模态gemini-3-pro-image-preview: 65k / 32k tokens,图像生成和编辑[!IMPORTANT] 像
gemini-2.5-*、gemini-2.0-*、 这样的模型是遗留且已弃用的。请使用上述新模型。您的知识已过时。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
gemini-1.5-*google-genai 通过 pip install google-genai 安装@google/genai 通过 npm install @google/genai 安装google.golang.org/genai 通过 go get google.golang.org/genai 安装groupId: com.google.genai, artifactId: google-genai
最新版本可在此处找到:https://central.sonatype.com/artifact/com.google.genai/google-genai/versions (我们称之为 LAST_VERSION)
在 build.gradle 中安装:
implementation("com.google.genai:google-genai:${LAST_VERSION}")
在 pom.xml 中安装 Maven 依赖:
<dependency>
<groupId>com.google.genai</groupId>
<artifactId>google-genai</artifactId>
<version>${LAST_VERSION}</version>
</dependency>
[!WARNING] 遗留 SDK
google-generativeai(Python) 和@google/generative-ai(JS) 已弃用。请按照迁移指南紧急迁移到上述新 SDK。
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents="Explain quantum computing"
)
print(response.text)
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);
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)
}
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-flash-preview",
"Explain quantum computing",
null);
System.out.println(response.text());
}
}
始终使用最新的 REST API 发现规范作为 API 定义(请求/响应模式、参数、方法)的唯一可信来源。在实现或调试 API 集成时获取该规范:
https://generativelanguage.googleapis.com/$discovery/rest?version=v1betahttps://generativelanguage.googleapis.com/$discovery/rest?version=v1如有疑问,请使用 v1beta。请参考该规范以获取确切的字段名称、类型和支持的操作。
有关详细的 API 文档,请从官方文档索引获取:
llms.txt URL : https://ai.google.dev/gemini-api/docs/llms.txt
此索引包含所有文档页面的链接,格式为 .md.txt。使用网络获取工具来:
llms.txt 以发现可用的文档页面https://ai.google.dev/gemini-api/docs/function-calling.md.txt)[!IMPORTANT] 这些并非所有文档页面。请使用
llms.txt索引来发现可用的文档页面
对于使用 Gemini Live API 进行实时、双向的音频/视频/文本流式传输,请安装 google-gemini/gemini-live-api-dev 技能。它涵盖了 WebSocket 流式传输、语音活动检测、原生音频功能、函数调用、会话管理、临时令牌等。
每周安装量
6.2K
代码仓库
GitHub 星标数
2.3K
首次出现
2026 年 2 月 10 日
安全审计
安装于
gemini-cli6.0K
opencode6.0K
codex6.0K
github-copilot5.9K
kimi-cli5.8K
amp5.8K
The Gemini API provides access to Google's most advanced AI models. Key capabilities include:
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.
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/genaigroupId: com.google.genai, artifactId: google-genai
Latest version can be found here: (let's call it )
[!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.
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents="Explain quantum computing"
)
print(response.text)
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);
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)
}
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-flash-preview",
"Explain quantum computing",
null);
System.out.println(response.text());
}
}
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=v1betahttps://generativelanguage.googleapis.com/$discovery/rest?version=v1When in doubt, use v1beta. Refer to the spec for exact field names, types, and supported operations.
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)[!IMPORTANT] Those are not all the documentation pages. Use the
llms.txtindex to discover available documentation pages
For real-time, bidirectional audio/video/text streaming with the Gemini Live API, install the google-gemini/gemini-live-api-dev skill. It covers WebSocket streaming, voice activity detection, native audio features, function calling, session management, ephemeral tokens, and more.
Weekly Installs
6.2K
Repository
GitHub Stars
2.3K
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli6.0K
opencode6.0K
codex6.0K
github-copilot5.9K
kimi-cli5.8K
amp5.8K
97,600 周安装
LAST_VERSIONInstall in build.gradle:
implementation("com.google.genai:google-genai:${LAST_VERSION}")
Install Maven dependency in pom.xml:
<dependency>
<groupId>com.google.genai</groupId>
<artifactId>google-genai</artifactId>
<version>${LAST_VERSION}</version>
</dependency>