gemini-api

Integrate Gemini models using the @google/genai SDK for API calls.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/lengjing/google-aistudio-skills --skill gemini-api-lengjing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-api
Source: https://github.com/lengjing/google-aistudio-skills/tree/main/skills/gemini_api
Command: npx skills add https://github.com/lengjing/google-aistudio-skills --skill gemini-api-lengjing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance on utilizing the @google/genai SDK for model selection, API calls, and best practices, simplifying AI integration.

Core Features & Use Cases

  • Model Selection & Aliases: Helps choose appropriate Gemini models based on task requirements.
  • API Calling & SDK Usage: Demonstrates correct API invocation patterns avoiding deprecated methods.
  • Use Case: Assisting developers in implementing AI features like text generation or image creation with proper SDK calls and configuration.

Quick Start

Use the gemini API skill to generate a simple text response with the recommended model.

Frequently Asked Questions about gemini-api

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

FAQPage Schema
How do I integrate Gemini models into my application using the SDK?

To integrate Gemini models, use the @google/genai SDK to handle configuration and API calls, ensuring you follow secure API key practices to build reliable AI features. This Skill guides correct SDK invocation patterns for seamless model integration.

What is the best way to select a Gemini model for a specific AI task?

Selecting a Gemini model involves matching task requirements like text generation or image creation to specific model aliases. This Skill provides guidance on choosing appropriate models based on your exact application needs.

How to avoid deprecated API methods when calling the Gemini API?

Avoiding deprecated Gemini API methods requires using correct invocation patterns demonstrated by the @google/genai SDK. This Skill helps developers implement secure and reliable API calls by steering clear of outdated approaches.

Do I need an API key to generate text with the Gemini API?

Yes, generating text with the Gemini API requires proper API key handling and configuration. This Skill enables developers to set up keys securely and make reliable model calls for AI features without deprecated methods.

Can I use the Gemini API for both text generation and image creation?

Yes, you can use the Gemini API for text generation and image creation by selecting appropriate models and applying correct SDK calls. This Skill assists developers in implementing these AI features with proper configuration.