google-gemini-api

Integrate Google Gemini API via @google/genai SDK for text generation and function calling.

204|30|Updated Nov 8, 2025
One-click install
npx skills add https://github.com/secondsky/claude-skills --skill google-gemini-api-secondsky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: google-gemini-api
Source: https://github.com/secondsky/claude-skills/tree/main/plugins/google-gemini-api/skills/google-gemini-api
Command: npx skills add https://github.com/secondsky/claude-skills --skill google-gemini-api-secondsky

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Integrates Google Gemini API v2 with @google/genai, including multimodal inputs, function calls, and grounding.

Core Features & Use Cases

  • Gemini model selection with thinking, grounding, and function calls
  • Multimodal inputs (images, PDFs, video, audio)
  • Grounding via Google Search and retrieval patterns

Quick Start

Install @google/genai, set GEMINI_API_KEY, and start issuing Gemini prompts with tools.

Frequently Asked Questions about google-gemini-api

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

FAQPage Schema
How do I integrate Google Gemini API for text generation and multimodal inputs?

Use the @google/genai SDK to integrate Gemini API by setting your GEMINI_API_KEY environment variable and issuing prompts with the Gemini model. The SDK supports text generation, multimodal inputs (images, PDFs, video, audio), function calling, and grounding via Google Search across Gemini 2.5 family models.

Can I use Gemini API function calling for agentic workflows?

Yes, Gemini API supports both parallel and compositional function calling through @google/genai. This enables production agentic workflows where the model selects and executes multiple functions in sequence or parallel, integrated with code execution and streaming endpoints.

What are the token limits and context caching requirements for Gemini API?

Gemini 2.5 models support up to 1,048,576 input tokens. Context caching requires explicit model version suffixes and is useful for large-scale data analysis and multi-turn chat. Streaming endpoints are available to handle responses incrementally across long contexts.

How do I ground Gemini API responses with real-time web sources?

Grounding via Google Search is built into the @google/genai SDK integration. You can configure retrieval patterns and enable real-time web grounding to augment generated responses with current information, useful for production applications requiring factual accuracy.

Does Gemini API support thinking mode for complex reasoning tasks?

Yes, Gemini 2.5 models include thinking mode support through the @google/genai SDK. This enables extended reasoning for complex problem-solving within agentic workflows, though it increases token consumption within the 1,048,576 token window.

What should I know about deprecated SDKs before using Gemini API?

Avoid deprecated Gemini SDKs and use only @google/genai for production integration. The current SDK provides proper model version suffix handling, token window awareness, and access to the full feature set including function calling, streaming, and grounding.