[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6992J7RHD08G4K3YK2WQBNT":3,"skill-same:01M6992J7RHD08G4K3YK2WQBNT":127},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":53,"linkOnly":54,"markdownContent":55,"markdownBody":56,"frontMatter":57,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":6,"ownerHtmlUrl":67,"ownerBlogUrl":68,"ownerDescription":69,"updatedAt":70,"install":71,"resources":84},"01M6992J7RHD08G4K3YK2WQBNT","gemini-api",null,"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.","google\u002Fskills","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698WR0H76ENHE587T9EJT89",24122,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,9],"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":58,"description":7,"compatibility":61},{"version":59,"category":60},"1.0.2","AiAndMachineLearning","Requires active Google Cloud credentials and Agent Platform API enabled.","main","0b14183791fb3d017b06b7c7718078d82a4afc33","skills\u002Fcloud\u002Fgemini-api",2005,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-14 01:51:35",{"source":8,"skillName":5,"commands":72,"prompt":82,"zipAvailable":83},[73,76,79],{"tool":74,"command":75},"npx","npx skills add google\u002Fskills --skill gemini-api",{"tool":77,"command":78},"bunx","bunx skills add google\u002Fskills --skill gemini-api",{"tool":80,"command":81},"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,[85,91,95,99,103,107,111,115,119,123],{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fadvanced_features.md","REFERENCE","参考文档",4878,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fadvanced_features.md",{"path":92,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fattribution.md",1878,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fattribution.md",{"path":96,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fbounding_box.md",1863,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fbounding_box.md",{"path":100,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fembeddings.md",3058,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fembeddings.md",{"path":104,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002Flive_api.md",1064,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Flive_api.md",{"path":108,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":109,"sourceHtmlUrl":110},"references\u002Fmedia_generation.md",8610,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fmedia_generation.md",{"path":112,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":113,"sourceHtmlUrl":114},"references\u002Fmodel_tuning.md",1095,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fmodel_tuning.md",{"path":116,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":117,"sourceHtmlUrl":118},"references\u002Fsafety.md",1873,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fsafety.md",{"path":120,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":121,"sourceHtmlUrl":122},"references\u002Fstructured_and_tools.md",3761,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Fstructured_and_tools.md",{"path":124,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Ftext_and_multimodal.md",2475,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgemini-api\u002Freferences\u002Ftext_and_multimodal.md",[128,160,184,212,239,264],{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":138,"publishedAt":53},"01M6998S2EZKD3GEJ7F943RZTE","sign-in-with-google-web","Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS \u002F `https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React\u002FNext.js\u002FAngular\u002FHTML, verifying ID tokens on backend runtimes (Python\u002FNode.js\u002FGo\u002FJava), enforcing Google Workspace domain restrictions (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding in cross-origin iframes via the Intermediate Iframe API (`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`), configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`), Google Cloud IAM service accounts, or Android\u002FiOS native Credential Manager.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002FSKILL.md",[134,137],{"categoryNo":135,"categoryName":136,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[9,139,140,141,142,143,52,144,145,51,146,147,148,149,150,151,152,153,154,155,156,157,158,159],"sign in with google web","sign","with","web","android","security","google workspace","implement","policy","python","implementing","react","iam","permissions","buttons","secure","manager","identity","architectures","domain","runtimes",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":169,"publishedAt":53},"01M6998PHPDCAD684VW5WRG83D","dpop-adoption","Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for authorization code exchange and token refresh, or handling 400 use_dpop_nonce challenge retry loops at oauth2.googleapis.com\u002Ftoken. Don't use for unconstrained OAuth 2.0 flows (where refresh tokens are not bound to a client key pair), or for Google Cloud IAM \u002F service account authentication.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fdpop-adoption\u002FSKILL.md",[166,167,168],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},[170,171,9,51,172,173,174,175,176,177,151,178,179,180,181,182,183,156,159,38,35],"dpop adoption","adoption","es6","retry","authentication","flows","challenge","code","browser","loops","at","node","token","pair",{"skillNo":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":196,"publishedAt":53},"01M6998M72TC73EEAQH4XC7EXW","retrieving-developer-knowledge","Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI\u002FGemini, Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms. Integrates with the Developer Knowledge MCP server (search_documents, get_documents, answer_query) or the Developer Knowledge REST API fallback. Use when searching for gcloud CLI commands, API syntax, IAM permissions, official documentation, architectural comparisons, or product choice overviews. Don't use for local filesystem lookups or non-Google documentation.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fretrieving-developer-knowledge\u002FSKILL.md",[190,191,194,195],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":192,"categoryName":193,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},[197,198,199,200,51,201,202,203,204,205,206,207,208,35,209,34,210,151,211,152],"retrieving developer knowledge","knowledge","developer","MCP","mcp server","official","developer documentation","get","search","local","choice","documents","query","across","documentation",{"skillNo":213,"name":214,"nameZh":6,"description":215,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":216,"categories":217,"keywords":218,"publishedAt":53},"01M6998J2CZEXS9BES9S3WWFKC","migrate-to-rust","Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure\u002Ffix cycle, and Profile-Guided Optimization (PGO) stage, and producing a first-person AI storytelling report and interactive HTML infographic. Use when migrating a GitHub repository or local codebase to Rust, porting legacy C++, Fortran, Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays (SoA) or SIMD Rust architectures, or optimizing Rust ports with LLVM PGO. Don't use for unrelated non-Rust refactoring or single-line syntax questions.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fmigrate-to-rust\u002FSKILL.md",[],[219,220,221,222,223,224,225,226,148,227,228,229,230,231,232,206,233,234,235,35,236,237,210,238],"migrate to rust","rust","migrate","github","memory","performance","directory","safe","ports","llvm","soa","cycle","porting","fix","arrays","infographic","high-performance","URL","architecture","unrelated",{"skillNo":240,"name":241,"nameZh":6,"description":242,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":243,"categories":244,"keywords":248,"publishedAt":53},"01M6998GCC3K29WZ82KXMB9E02","finding-google-skills","Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or setting up part of their stack, such as where to run a service, a database, storage, messaging, authentication, analytics, ads, or AI model serving, and a Google product is a reasonable candidate - whether or not a vendor is named - or when a request names a Google product or API. Brings in the matching Google skill so the answer can weigh Google options, their trade-offs, and when they are not the right fit. Skip when the stack is already settled on another provider and no Google product is named, or the task involves no platform choice.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Ffinding-google-skills\u002FSKILL.md",[245,246,247],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},[9,249,250,251,252,38,253,254,255,256,257,174,258,259,260,207,261,262,35,263,34],"finding google skills","storage","as","messaging","model","trade-offs","provider","answer","fit","catalog","up","decision","use","database","candidate",{"skillNo":265,"name":266,"nameZh":6,"description":267,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":268,"categories":269,"keywords":272,"publishedAt":53},"01M6998DWNHTH0BS6W1CY8ZXMP","workload-manager-basics","Use this skill to manage Google Cloud Workload Manager evaluations, rules, scanned resources, and validation results by using public client libraries and the REST API. Use when you need to inspect workload best-practice rules, create and run evaluations for Google Cloud general best practices, SAP, SQL Server, or custom organizational rules, review violations, export results to BigQuery, or automate Workload Manager through client libraries because no service-specific public CLI or MCP server is available. Don't use for general Google Compute Engine instance management, VPC configuration, or standard IAM auditing.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fworkload-manager-basics\u002FSKILL.md",[270,271],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[273,274,155,275,9,200,276,51,201,277,278,279,280,35,281,34,151,282,283,284,285],"workload manager basics","workload","basics","cli","review","vpc","resources","inspect","you","create","libraries","server","run"]