gemini-api-agent-platform

Implements Gemini API integrations on Agent Platform using the Google Gen AI SDK.

30.5k|3.5k|Updated Jul 4, 2025
One-click install
npx skills add https://github.com/davila7/claude-code-templates --skill gemini-api-agent-platform
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-api-agent-platform
Source: https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/ai-research/gemini-api-agent-platform
Command: npx skills add https://github.com/davila7/claude-code-templates --skill gemini-api-agent-platform

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-genai, @google/genai, Google.GenAI, and includes references (resource) components.

What problem does it solve?

Integrating Google's Gemini models into enterprise applications requires navigating SDK choices, authentication setup, model selection, and many API capabilities, and outdated legacy SDKs and deprecated model names often lead to broken or suboptimal implementations.

Core Features & Use Cases

  • Unified Gen AI SDK Guidance: Provides correct installation and initialization patterns for Python, JavaScript/TypeScript, Go, Java, and C#, while steering away from deprecated SDKs like google-cloud-aiplatform.
  • Full Capability Coverage: Reference guides for text and multimodal generation, embeddings, structured output, function calling, search grounding, image and video generation, Live API streaming, context caching, batch prediction, and model tuning.
  • Use Case: A developer building an enterprise document-analysis app can follow this Skill to authenticate with Application Default Credentials, pick the right Gemini 3 model, cache a large PDF context, and generate structured JSON output with correct, current API calls.

Quick Start

Use the gemini-api-agent-platform skill to write a Python script that generates text with the Gemini API on Agent Platform using Application Default Credentials.

Frequently Asked Questions about gemini-api-agent-platform

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use the Gemini API with Vertex AI in Python?

Install the google-genai package with pip, set GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION, and GOOGLE_GENAI_USE_VERTEXAI=true environment variables, then create a client with genai.Client() and call client.models.generate_content with a current model like gemini-3-flash-preview.

What is the difference between google-genai and google-cloud-aiplatform SDKs?

google-genai is the current unified Gen AI SDK for the Gemini API on Agent Platform, while google-cloud-aiplatform, @google-cloud/vertexai, and google-generativeai are deprecated legacy SDKs. New development should use google-genai across all supported languages.

Which Gemini model should I use for my application?

Use gemini-3.1-pro-preview for complex reasoning and coding, gemini-3-flash-preview for fast balanced multimodal tasks, and gemini-3.1-flash-lite-preview for high-frequency lightweight tasks. Legacy models like gemini-2.0 and gemini-1.5 are deprecated.

Does the Gemini API support image and video generation?

Yes, image generation and editing use gemini-3.1-flash-image-preview or gemini-3-pro-image-preview, and video generation uses the Veo model such as veo-3.1-fast-generate-001 through an asynchronous operation that you poll for completion.

How do I authenticate the Gemini API with an API key?

Use Agent Platform Express Mode by setting the GOOGLE_API_KEY environment variable and GOOGLE_GENAI_USE_VERTEXAI=true. The client picks up these values automatically when initialized without parameters.

Why is my Gemini API response blocked or empty?

Responses return None when safety filters block the content. Check response.candidates[0].finish_reason and safety_ratings, and adjust thresholds with SafetySetting entries for categories like dangerous content or harassment if appropriate.