Google Genai Sdk Python

🌐Community
by cnemri · vlatest · Repository

Provides Python guidance and assistance for developing backend services and APIs.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add google-genai-sdk-python npx -- -y @trustedskills/google-genai-sdk-python
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "google-genai-sdk-python": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/google-genai-sdk-python"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill provides Python guidance and assistance specifically for developing backend services and APIs that interact with the Gemini API. It helps users write high-quality, idiomatic Python code by referencing relevant documentation and examples related to setup, model selection, text generation, chat functionality, reasoning processes, structured output formats, multimodal inputs, tool usage, media generation, and even access to the raw SDK source code. The skill is designed for use with the google-genai package.

When to use it

  • When you need help installing and authenticating with the Gemini API using Python.
  • When you want guidance on selecting the appropriate Gemini model (Flash, Pro, Lite, Imagen, Veo) for your specific task.
  • If you're building a chatbot application requiring multi-turn conversations and history management.
  • For generating structured output like JSON or utilizing Pydantic models with your Gemini API calls.

Key capabilities

  • Installation and authentication guidance.
  • Model selection recommendations (Flash, Pro, Lite, Imagen, Veo).
  • Text generation assistance including streaming and safety considerations.
  • Chat functionality for multi-turn conversations.
  • Reasoning configuration using thinking_level and thinking_budget.
  • Support for structured output formats like JSON schemas and Pydantic models.
  • Handling of multimodal inputs (images, audio, video, PDFs).
  • Tool integration including function calling and Google Search grounding.
  • Image generation/editing with Imagen and video generation with Veo.

Example prompts

  • "How do I initialize a client for the Gemini API in Python?"
  • "What's the best model to use for generating short, fast responses?"
  • "Can you show me an example of how to structure a chat message with history?"

Tips & gotchas

  • Always use the google-genai package.
  • Use client.models for single requests and client.chats for managing conversations.
  • Refer to google.genai.types for type definitions related to Gemini API interactions.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
cnemri
Installs
40

🌐 Community

Passed automated security scans.