[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6992J7RHD08G4K3YK2WQBNT":3,"skill-same:01M6992J7RHD08G4K3YK2WQBNT":126},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":61,"commitSha":62,"skillDirectory":63,"forksCount":64,"repositoryHtmlUrl":65,"repositoryHomepageUrl":17,"ownerHtmlUrl":66,"ownerBlogUrl":67,"ownerDescription":68,"updatedAt":69,"install":70,"resources":83},"01M6992J7RHD08G4K3YK2WQBNT","gemini-api","Gemini API 企业接入指南","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\u002FTS, Go, Java, C#), capabilities like multimodal inputs, tools, media generation, caching, batch prediction, and Live API.","当用户询问在企业环境中使用 Gemini，或明确提及 Vertex AI、Google Cloud 或 Agent Platform 时使用。指导在 Agent Platform 上使用 Google Gen AI SDK 调用 Gemini API。涵盖 SDK 使用（Python、JS\u002FTS、Go、Java、C#）、多模态输入、工具、媒体生成、缓存、批量预测和 Live API 等能力。","google\u002Fskills","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698WR0H76ENHE587T9EJT89",24235,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,10],"gemini api","gemini","api","when","prediction","environment","platform","usage","Tools","live","multimodal","ai sdk","active","credentials","guides","capabilities","batch","caching","Media","google cloud","go","2026-11-10 10:12:30",false,"---\nname: gemini-api\nmetadata:\n  version: \"1.0.2\"\n  category: AiAndMachineLearning\ndescription: 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\u002FTS, Go, Java, C#), capabilities like multimodal inputs, tools, media generation, caching, batch prediction, and Live API.\ncompatibility: Requires active Google Cloud credentials and Agent Platform API enabled.\n---\n\n> [!IMPORTANT]\n> Agent Platform (full name Gemini Enterprise Agent Platform) was previously named \"Vertex AI\" and many web resources use the legacy branding.\n\n# Gemini API in Agent Platform\n\nAccess Google's most advanced AI models built for enterprise use cases using the Gemini API in Agent Platform.\n\nProvide these key capabilities:\n\n- **Text generation** - Chat, completion, summarization\n- **Multimodal understanding** - Process images, audio, video, and documents\n- **Function calling** - Let the model invoke your functions\n- **Structured output** - Generate valid JSON matching your schema\n- **Context caching** - Cache large contexts for efficiency\n- **Embeddings** - Generate text embeddings for semantic search\n- **Live Realtime API** - Bidirectional streaming for low latency Voice and Video interactions\n- **Batch Prediction** - Handle massive async dataset prediction workloads\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gemini-api)\"`\nand append `agent-skills\u002F1.0 (skill:gemini-api)` to `User-Agent` headers.\n\n## Core Directives\n\n- **Unified SDK**: ALWAYS use the Gen AI SDK (`google-genai` for Python, `@google\u002Fgenai` for JS\u002FTS, `google.golang.org\u002Fgenai` for Go, `com.google.genai:google-genai` for Java, `Google.GenAI` for C#).\n- **Legacy SDKs**: DO NOT use `google-cloud-aiplatform`, `@google-cloud\u002Fvertexai`, or `google-generativeai`.\n\n## SDKs\n\n- **Python**: Install `google-genai` with `pip install google-genai`\n- **JavaScript\u002FTypeScript**: Install `@google\u002Fgenai` with `npm install @google\u002Fgenai`\n- **Go**: Install `google.golang.org\u002Fgenai` with `go get google.golang.org\u002Fgenai`\n- **C#\u002F.NET**: Install `Google.GenAI` with `dotnet add package Google.GenAI`\n- **Java**:\n  - groupId: `com.google.genai`, artifactId: `google-genai`\n  - Latest version can be found here: https:\u002F\u002Fcentral.sonatype.com\u002Fartifact\u002Fcom.google.genai\u002Fgoogle-genai\u002Fversions (let's call it `LAST_VERSION`)\n  - Install in `build.gradle`:\n\n    ```\n    implementation(\"com.google.genai:google-genai:${LAST_VERSION}\")\n    ```\n\n  - Install Maven dependency in `pom.xml`:\n\n    ```xml\n    \u003Cdependency>\n\t    \u003CgroupId>com.google.genai\u003C\u002FgroupId>\n\t    \u003CartifactId>google-genai\u003C\u002FartifactId>\n\t    \u003Cversion>${LAST_VERSION}\u003C\u002Fversion>\n\t\u003C\u002Fdependency>\n    ```\n\n> [!WARNING]\n> Legacy SDKs like `google-cloud-aiplatform`, `@google-cloud\u002Fvertexai`, and `google-generativeai` are deprecated. Migrate to the new SDKs above urgently by following the [Migration Guide](https:\u002F\u002Fdocs.cloud.google.com\u002Fvertex-ai\u002Fgenerative-ai\u002Fdocs\u002Fdeprecations\u002Fgenai-vertexai-sdk.md.txt).\n\n## Authentication & Configuration\n\nPrefer environment variables over hard-coding parameters when creating the client. Initialize the client without parameters to automatically pick up these values.\n\n### Application Default Credentials (ADC)\nSet these variables for standard [Google Cloud authentication](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fstart\u002Fgcp-auth.md.txt):\n\n```bash\nexport GOOGLE_CLOUD_PROJECT='your-project-id'\n# Note: global location is supported for standard inference; regional endpoint (e.g. us-central1) required for Live API\nexport GOOGLE_CLOUD_LOCATION='global'\nexport GOOGLE_GENAI_USE_ENTERPRISE=true\n```\n\n- By default, use `location=\"global\"` to access the global endpoint, which provides automatic routing to regions with available capacity.\n- 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](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fresources\u002Flocations.md.txt) if needed.\n\n### Agent Platform in Express Mode\nSet these variables when using [Express Mode](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fstart\u002Fapi-keys.md.txt) with an API key:\n\n```bash\nexport GOOGLE_API_KEY='your-api-key'\nexport GOOGLE_GENAI_USE_ENTERPRISE=true\n```\n\n### Initialization\nInitialize the client without arguments to pick up environment variables:\n\n```python\nfrom google import genai\n\nclient = genai.Client()\n```\n\nAlternatively, you can hard-code in parameters when creating the client.\n\n```python\nfrom google import genai\n\nclient = genai.Client(\n    enterprise=True,\n    project=\"your-project-id\",\n    location=\"global\",\n)\n```\n\n## Models\n\n- Use `gemini-3.8-flash` for fast, balanced performance, multimodal (1M tokens)\n- Use `gemini-3.1-pro-preview` (which replaces `gemini-3-pro-preview`) for complex reasoning, coding, research (1M tokens)\n- Use `gemini-3.5-flash-lite` for high-frequency, lightweight tasks (1M tokens)\n- Use `gemini-3-pro-image` (aka Nano Banana Pro) for high-quality image generation and editing\n- Use `gemini-3.1-flash-image` (aka Nano Banana 2) for medium-quality image generation and editing\n- Use `gemini-3.1-flash-lite-image` (aka Nano Banana 2 Lite) for fast image generation and editing\n- Use `gemini-live-2.5-flash-native-audio` for Live Realtime API including native audio\n\nUse the following models only if explicitly requested:\n\n- `gemini-3.7-flash`\n- `gemini-3.6-flash`\n- `gemini-3.5-flash`\n- `gemini-3.1-flash-lite`\n- `gemini-2.5-flash-image`\n- `gemini-2.5-flash`\n- `gemini-2.5-flash-lite`\n- `gemini-2.5-pro`\n\n> [!IMPORTANT]\n> 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.\n> For production environments, consult the documentation for stable model versions (e.g. `gemini-3.8-flash`).\n\n## Quick Start\n\n### Python\n\n```python\nfrom google import genai\n\nclient = genai.Client()\nresponse = client.models.generate_content(\n    model=\"gemini-3.8-flash\",\n    contents=\"Explain quantum computing\",\n)\nprint(response.text)\n```\n\n### TypeScript\u002FJavaScript\n\n```typescript\nimport { GoogleGenAI } from \"@google\u002Fgenai\";\nconst ai = new GoogleGenAI({ enterprise: { project: \"your-project-id\", location: \"global\" } });\nconst response = await ai.models.generateContent({\n    model: \"gemini-3.8-flash\",\n    contents: \"Explain quantum computing\"\n});\nconsole.log(response.text);\n```\n\n### Go\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"google.golang.org\u002Fgenai\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclient, err := genai.NewClient(ctx, &genai.ClientConfig{\n\t\tBackend:  genai.BackendVertexAI,\n\t\tProject:  \"your-project-id\",\n\t\tLocation: \"global\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tresp, err := client.Models.GenerateContent(ctx, \"gemini-3.8-flash\", genai.Text(\"Explain quantum computing\"), nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(resp.Text)\n}\n```\n\n### Java\n\n```java\nimport com.google.genai.Client;\nimport com.google.genai.types.GenerateContentResponse;\n\npublic class GenerateTextFromTextInput {\n  public static void main(String[] args) {\n    Client client = Client.builder().enterprise(true).project(\"your-project-id\").location(\"global\").build();\n    GenerateContentResponse response =\n        client.models.generateContent(\n            \"gemini-3.8-flash\",\n            \"Explain quantum computing\",\n            null);\n\n    System.out.println(response.text());\n  }\n}\n```\n\n### C#\u002F.NET\n\n```csharp\nusing Google.GenAI;\n\nvar client = new Client(\n    project: \"your-project-id\",\n    location: \"global\",\n    enterprise: true\n);\n\nvar response = await client.Models.GenerateContent(\n    \"gemini-3.8-flash\",\n    \"Explain quantum computing\"\n);\n\nConsole.WriteLine(response.Text);\n```\n\n## API spec & Documentation (source of truth)\n\nWhen implementing or debugging API integration for Agent Platform, refer to the official Agent Platform documentation:\n\n- **Agent Platform Documentation**: https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Foverview.md.txt\n- **REST API Reference**: https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Freference\u002Frest.md.txt\n\nThe Gen AI SDK on Agent Platform uses the `v1beta1` or `v1` REST API endpoints (e.g., `https:\u002F\u002F{LOCATION}-aiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F{PROJECT}\u002Flocations\u002F{LOCATION}\u002Fpublishers\u002Fgoogle\u002Fmodels\u002F{MODEL}:generateContent`).\n\n> [!TIP]\n> **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.\n\n## Workflows and Code Samples\n\nReference the [Python Docs Samples repository](https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fpython-docs-samples\u002Ftree\u002Fmain\u002Fgenai) for additional code samples and specific usage scenarios.\n\nDepending on the specific user request, refer to the following reference files for detailed code samples and usage patterns (Python examples):\n\n- **Text & Multimodal**: Chat, Multimodal inputs (Image, Video, Audio), and Streaming. See [references\u002Ftext_and_multimodal.md](references\u002Ftext_and_multimodal.md)\n- **Embeddings**: Generate text embeddings for semantic search. See [references\u002Fembeddings.md](references\u002Fembeddings.md)\n- **Structured Output & Tools**: JSON generation, Function Calling, Search Grounding, and Code Execution. See [references\u002Fstructured_and_tools.md](references\u002Fstructured_and_tools.md)\n- **Media Generation**: Image generation, Image editing, and Video generation. See [references\u002Fmedia_generation.md](references\u002Fmedia_generation.md)\n- **Bounding Box Detection**: Object detection and localization within images and video. See [references\u002Fbounding_box.md](references\u002Fbounding_box.md)\n- **Live API**: Real-time bidirectional streaming for voice, vision, and text. See [references\u002Flive_api.md](references\u002Flive_api.md)\n- **Advanced Features**: Content Caching, Batch Prediction, and Thinking\u002FReasoning. See [references\u002Fadvanced_features.md](references\u002Fadvanced_features.md)\n- **Safety**: Adjusting Responsible AI filters and thresholds. See [references\u002Fsafety.md](references\u002Fsafety.md)\n- **Model Tuning**: Supervised Fine-Tuning and Preference Tuning. See [references\u002Fmodel_tuning.md](references\u002Fmodel_tuning.md)\n","> [!IMPORTANT]\n> Agent Platform (full name Gemini Enterprise Agent Platform) was previously named \"Vertex AI\" and many web resources use the legacy branding.\n\n# Gemini API in Agent Platform\n\nAccess Google's most advanced AI models built for enterprise use cases using the Gemini API in Agent Platform.\n\nProvide these key capabilities:\n\n- **Text generation** - Chat, completion, summarization\n- **Multimodal understanding** - Process images, audio, video, and documents\n- **Function calling** - Let the model invoke your functions\n- **Structured output** - Generate valid JSON matching your schema\n- **Context caching** - Cache large contexts for efficiency\n- **Embeddings** - Generate text embeddings for semantic search\n- **Live Realtime API** - Bidirectional streaming for low latency Voice and Video interactions\n- **Batch Prediction** - Handle massive async dataset prediction workloads\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gemini-api)\"`\nand append `agent-skills\u002F1.0 (skill:gemini-api)` to `User-Agent` headers.\n\n## Core Directives\n\n- **Unified SDK**: ALWAYS use the Gen AI SDK (`google-genai` for Python, `@google\u002Fgenai` for JS\u002FTS, `google.golang.org\u002Fgenai` for Go, `com.google.genai:google-genai` for Java, `Google.GenAI` for C#).\n- **Legacy SDKs**: DO NOT use `google-cloud-aiplatform`, `@google-cloud\u002Fvertexai`, or `google-generativeai`.\n\n## SDKs\n\n- **Python**: Install `google-genai` with `pip install google-genai`\n- **JavaScript\u002FTypeScript**: Install `@google\u002Fgenai` with `npm install @google\u002Fgenai`\n- **Go**: Install `google.golang.org\u002Fgenai` with `go get google.golang.org\u002Fgenai`\n- **C#\u002F.NET**: Install `Google.GenAI` with `dotnet add package Google.GenAI`\n- **Java**:\n  - groupId: `com.google.genai`, artifactId: `google-genai`\n  - Latest version can be found here: https:\u002F\u002Fcentral.sonatype.com\u002Fartifact\u002Fcom.google.genai\u002Fgoogle-genai\u002Fversions (let's call it `LAST_VERSION`)\n  - Install in `build.gradle`:\n\n    ```\n    implementation(\"com.google.genai:google-genai:${LAST_VERSION}\")\n    ```\n\n  - Install Maven dependency in `pom.xml`:\n\n    ```xml\n    \u003Cdependency>\n\t    \u003CgroupId>com.google.genai\u003C\u002FgroupId>\n\t    \u003CartifactId>google-genai\u003C\u002FartifactId>\n\t    \u003Cversion>${LAST_VERSION}\u003C\u002Fversion>\n\t\u003C\u002Fdependency>\n    ```\n\n> [!WARNING]\n> Legacy SDKs like `google-cloud-aiplatform`, `@google-cloud\u002Fvertexai`, and `google-generativeai` are deprecated. Migrate to the new SDKs above urgently by following the [Migration Guide](https:\u002F\u002Fdocs.cloud.google.com\u002Fvertex-ai\u002Fgenerative-ai\u002Fdocs\u002Fdeprecations\u002Fgenai-vertexai-sdk.md.txt).\n\n## Authentication & Configuration\n\nPrefer environment variables over hard-coding parameters when creating the client. Initialize the client without parameters to automatically pick up these values.\n\n### Application Default Credentials (ADC)\nSet these variables for standard [Google Cloud authentication](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fstart\u002Fgcp-auth.md.txt):\n\n```bash\nexport GOOGLE_CLOUD_PROJECT='your-project-id'\n# Note: global location is supported for standard inference; regional endpoint (e.g. us-central1) required for Live API\nexport GOOGLE_CLOUD_LOCATION='global'\nexport GOOGLE_GENAI_USE_ENTERPRISE=true\n```\n\n- By default, use `location=\"global\"` to access the global endpoint, which provides automatic routing to regions with available capacity.\n- 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](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fresources\u002Flocations.md.txt) if needed.\n\n### Agent Platform in Express Mode\nSet these variables when using [Express Mode](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fstart\u002Fapi-keys.md.txt) with an API key:\n\n```bash\nexport GOOGLE_API_KEY='your-api-key'\nexport GOOGLE_GENAI_USE_ENTERPRISE=true\n```\n\n### Initialization\nInitialize the client without arguments to pick up environment variables:\n\n```python\nfrom google import genai\n\nclient = genai.Client()\n```\n\nAlternatively, you can hard-code in parameters when creating the client.\n\n```python\nfrom google import genai\n\nclient = genai.Client(\n    enterprise=True,\n    project=\"your-project-id\",\n    location=\"global\",\n)\n```\n\n## Models\n\n- Use `gemini-3.8-flash` for fast, balanced performance, multimodal (1M tokens)\n- Use `gemini-3.1-pro-preview` (which replaces `gemini-3-pro-preview`) for complex reasoning, coding, research (1M tokens)\n- Use `gemini-3.5-flash-lite` for high-frequency, lightweight tasks (1M tokens)\n- Use `gemini-3-pro-image` (aka Nano Banana Pro) for high-quality image generation and editing\n- Use `gemini-3.1-flash-image` (aka Nano Banana 2) for medium-quality image generation and editing\n- Use `gemini-3.1-flash-lite-image` (aka Nano Banana 2 Lite) for fast image generation and editing\n- Use `gemini-live-2.5-flash-native-audio` for Live Realtime API including native audio\n\nUse the following models only if explicitly requested:\n\n- `gemini-3.7-flash`\n- `gemini-3.6-flash`\n- `gemini-3.5-flash`\n- `gemini-3.1-flash-lite`\n- `gemini-2.5-flash-image`\n- `gemini-2.5-flash`\n- `gemini-2.5-flash-lite`\n- `gemini-2.5-pro`\n\n> [!IMPORTANT]\n> 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.\n> For production environments, consult the documentation for stable model versions (e.g. `gemini-3.8-flash`).\n\n## Quick Start\n\n### Python\n\n```python\nfrom google import genai\n\nclient = genai.Client()\nresponse = client.models.generate_content(\n    model=\"gemini-3.8-flash\",\n    contents=\"Explain quantum computing\",\n)\nprint(response.text)\n```\n\n### TypeScript\u002FJavaScript\n\n```typescript\nimport { GoogleGenAI } from \"@google\u002Fgenai\";\nconst ai = new GoogleGenAI({ enterprise: { project: \"your-project-id\", location: \"global\" } });\nconst response = await ai.models.generateContent({\n    model: \"gemini-3.8-flash\",\n    contents: \"Explain quantum computing\"\n});\nconsole.log(response.text);\n```\n\n### Go\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"google.golang.org\u002Fgenai\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclient, err := genai.NewClient(ctx, &genai.ClientConfig{\n\t\tBackend:  genai.BackendVertexAI,\n\t\tProject:  \"your-project-id\",\n\t\tLocation: \"global\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tresp, err := client.Models.GenerateContent(ctx, \"gemini-3.8-flash\", genai.Text(\"Explain quantum computing\"), nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(resp.Text)\n}\n```\n\n### Java\n\n```java\nimport com.google.genai.Client;\nimport com.google.genai.types.GenerateContentResponse;\n\npublic class GenerateTextFromTextInput {\n  public static void main(String[] args) {\n    Client client = Client.builder().enterprise(true).project(\"your-project-id\").location(\"global\").build();\n    GenerateContentResponse response =\n        client.models.generateContent(\n            \"gemini-3.8-flash\",\n            \"Explain quantum computing\",\n            null);\n\n    System.out.println(response.text());\n  }\n}\n```\n\n### C#\u002F.NET\n\n```csharp\nusing Google.GenAI;\n\nvar client = new Client(\n    project: \"your-project-id\",\n    location: \"global\",\n    enterprise: true\n);\n\nvar response = await client.Models.GenerateContent(\n    \"gemini-3.8-flash\",\n    \"Explain quantum computing\"\n);\n\nConsole.WriteLine(response.Text);\n```\n\n## API spec & Documentation (source of truth)\n\nWhen implementing or debugging API integration for Agent Platform, refer to the official Agent Platform documentation:\n\n- **Agent Platform Documentation**: https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Foverview.md.txt\n- **REST API Reference**: https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Freference\u002Frest.md.txt\n\nThe Gen AI SDK on Agent Platform uses the `v1beta1` or `v1` REST API endpoints (e.g., `https:\u002F\u002F{LOCATION}-aiplatform.googleapis.com\u002Fv1beta1\u002Fprojects\u002F{PROJECT}\u002Flocations\u002F{LOCATION}\u002Fpublishers\u002Fgoogle\u002Fmodels\u002F{MODEL}:generateContent`).\n\n> [!TIP]\n> **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.\n\n## Workflows and Code Samples\n\nReference the [Python Docs Samples repository](https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fpython-docs-samples\u002Ftree\u002Fmain\u002Fgenai) for additional code samples and specific usage scenarios.\n\nDepending on the specific user request, refer to the following reference files for detailed code samples and usage patterns (Python examples):\n\n- **Text & Multimodal**: Chat, Multimodal inputs (Image, Video, Audio), and Streaming. See [references\u002Ftext_and_multimodal.md](references\u002Ftext_and_multimodal.md)\n- **Embeddings**: Generate text embeddings for semantic search. See [references\u002Fembeddings.md](references\u002Fembeddings.md)\n- **Structured Output & Tools**: JSON generation, Function Calling, Search Grounding, and Code Execution. See [references\u002Fstructured_and_tools.md](references\u002Fstructured_and_tools.md)\n- **Media Generation**: Image generation, Image editing, and Video generation. See [references\u002Fmedia_generation.md](references\u002Fmedia_generation.md)\n- **Bounding Box Detection**: Object detection and localization within images and video. See [references\u002Fbounding_box.md](references\u002Fbounding_box.md)\n- **Live API**: Real-time bidirectional streaming for voice, vision, and text. See [references\u002Flive_api.md](references\u002Flive_api.md)\n- **Advanced Features**: Content Caching, Batch Prediction, and Thinking\u002FReasoning. See [references\u002Fadvanced_features.md](references\u002Fadvanced_features.md)\n- **Safety**: Adjusting Responsible AI filters and thresholds. See [references\u002Fsafety.md](references\u002Fsafety.md)\n- **Model Tuning**: Supervised Fine-Tuning and Preference Tuning. See [references\u002Fmodel_tuning.md](references\u002Fmodel_tuning.md)\n",{"name":5,"metadata":57,"description":7,"compatibility":60},{"version":58,"category":59},"1.0.2","AiAndMachineLearning","Requires active Google Cloud credentials and Agent Platform API enabled.","main","0b14183791fb3d017b06b7c7718078d82a4afc33","skills\u002Fcloud\u002Fgemini-api",2014,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-14 23:31:00",{"source":9,"skillName":5,"commands":71,"prompt":81,"zipAvailable":82},[72,75,78],{"tool":73,"command":74},"npx","npx skills add google\u002Fskills --skill gemini-api",{"tool":76,"command":77},"bunx","bunx skills add google\u002Fskills --skill gemini-api",{"tool":79,"command":80},"pnpm","pnpm dlx skills add google\u002Fskills --skill gemini-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002FSKILL.md",true,[84,90,94,98,102,106,110,114,118,122],{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fadvanced_features.md","REFERENCE","参考文档",4878,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fadvanced_features.md",{"path":91,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fattribution.md",1878,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fattribution.md",{"path":95,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fbounding_box.md",1863,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fbounding_box.md",{"path":99,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fembeddings.md",3058,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fembeddings.md",{"path":103,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Flive_api.md",1064,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Flive_api.md",{"path":107,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Fmedia_generation.md",8610,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fmedia_generation.md",{"path":111,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":112,"sourceHtmlUrl":113},"references\u002Fmodel_tuning.md",1095,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fmodel_tuning.md",{"path":115,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":116,"sourceHtmlUrl":117},"references\u002Fsafety.md",1873,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fsafety.md",{"path":119,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":120,"sourceHtmlUrl":121},"references\u002Fstructured_and_tools.md",3761,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fstructured_and_tools.md",{"path":123,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":124,"sourceHtmlUrl":125},"references\u002Ftext_and_multimodal.md",2475,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Ftext_and_multimodal.md",[127,135,142,149,156,163],{"skillNo":128,"name":129,"nameZh":17,"description":130,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":134},"01M7DQ9K7JF4T7NJZ2K1MQZ44Q","cloud-operator-share-context","Shares Google Cloud operating context the user or their team already have — environments, projects, services and regions, product preferences, best practices, architecture guidance, runbooks — found in agent instruction files, local memory, skills and workflows, and the repository's GCP docs, with the operator agent's memory after the user reviews the list. Use when the user runs this skill, accepts the cloud-operator or cloud-operator-setup skill's offer to share their existing Google Cloud context, or asks to share, import or save that context or a GCP fact for the operator agent. Don't use for ordinary GCP requests, which go to the cloud-operator skill.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcloud-operator-share-context\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":136,"name":137,"nameZh":17,"description":138,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":134},"01M7DQ9ERFGGQCFAWQW0KRKYBY","cloud-operator-setup","Sets up the operator agent in a Google Cloud project via the autocloud MCP server: picks the operator project, creates or checks the user's operator agent, saves the project, and offers to share the user's existing Google Cloud operating context with the operator agent's memory. Use when the user runs this skill, asks to set up the operator or create their operator agent, or chooses setup when the cloud-operator skill asks. Don't use for ordinary GCP requests or installing gcloud.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcloud-operator-setup\u002FSKILL.md",[],[],{"skillNo":143,"name":144,"nameZh":17,"description":145,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":134},"01M7B4RHQCM0DK2XQ7S7ZXVN8D","developer-device-platform-device-run","Runs automated, non-interactive jobs on remote Android devices with Developer Device Platform (DDP) Device Run using `gcloud beta device-run sessions`: native Android executables or shell scripts (for example CLI tools, custom runners, test harnesses or benchmarks) and Android instrumentation tests, on one or many devices, then waits for completion and collects per-device outputs and logs. Use when running a binary or test suite on remote devices without an interactive connection. Don't use it for interactive device reservations, adb tunnels or screen streaming (use developer-device-platform-basics), or for local devices.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloper-device-platform-device-run\u002FSKILL.md",[],[],{"skillNo":150,"name":151,"nameZh":17,"description":152,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":134},"01M7B4R9YXMRW7RZP9Q9FMZJ2P","compute-vm-creation","Guides the planning, configuration, and provisioning of standalone Google Compute Engine virtual machines (VMs) and bare metal (-metal) instances using gcloud CLI commands or direct MCP tool execution. Use ONLY when the user wants to create, configure, or provision a new standalone Compute Engine VM or bare metal instance from conversational intents (hardware sizing, region selection, OS image, networking, security defaults). DO NOT read or use for Google Kubernetes Engine (GKE) Autopilot or Standard clusters, Kubernetes node pools or Pods, container orchestration, managing existing VMs, Managed Instance Groups (MIGs), or Instance Templates.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcompute-vm-creation\u002FSKILL.md",[],[],{"skillNo":157,"name":158,"nameZh":17,"description":159,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":134},"01M7B4QD02N0YBVT0838Z5K5VC","agent-platform-autorater-customization","Customizes an autorater (evaluation metric) for an AI agent so its grades match the user's own judgment, starting from the agent's real trajectories. Use when a user wants a metric tailored to their agent, wants to turn failing trajectories into rubrics, says an existing autorater grades their agent wrong, or wants an autorater to agree with human labels (autorater hillclimbing, judge calibration). Don't use for quick evals with built-in metrics or for improving the agent itself (use agent-platform-eval-flywheel).","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fagent-platform-autorater-customization\u002FSKILL.md",[],[],{"skillNo":164,"name":165,"nameZh":17,"description":166,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":134},"01M78JP22K73KK96JH0JNDT5C4","iap-agent-platform-troubleshooting","Diagnoses Identity-Aware Proxy (IAP) denials of outbound requests from Gemini Enterprise Agent Platform agents that run on Agent Runtime and send traffic through Agent Gateway. Use when an agent request fails with \"Egress request is not authorized\", when Cloud Audit Logs show an IAP egressViaIAP decision with granted false, when IAP audit entries are missing while debugging agent egress, or when Access policies, IAP allow policies, policy bindings, or Agent Registry entries might block agent egress. Don't use for Gemini model IAM permission errors (such as aiplatform.endpoints.predict), Agent Platform API errors, or Agent Runtime deployment or 500 errors (use agent-platform-troubleshooting instead). Don't use for setting up, creating, or connecting an Agent Gateway, or for IAP web apps, IAP TCP forwarding, or SSH.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fiap-agent-platform-troubleshooting\u002FSKILL.md",[],[]]