Table of Contents

Namespace GenerativeAI.Clients

Low-level REST clients for individual API resources: files, models, caching, batch, File Search stores, Interactions, tuning, webhooks, ephemeral auth tokens, agent APIs and semantic retrieval.

Classes

AgentApiClientBase

Shared plumbing of the clients of the agent-related Gemini API resources (Voices, Agents, Environments, Triggers, Credentials and Decisions), which — like the Interactions API — use snake_case JSON and live directly under the API version ({base}/{version}/{collection}, or .../projects/{project}/locations/{location}/{collection} on Vertex AI).

AgentsClient

A client for the managed Agents API (/agents): create reusable agent definitions (base agent, agent configuration, system instruction, tools and base environment) and reference them from interactions. Follows python-genai's client.agents (experimental).

AuthTokensClient

Creates ephemeral auth tokens for the Live API, so client-side apps (browsers, mobile apps) can open Live sessions without holding your API key. Gemini API only; uses the v1alpha API.

BaseClient

Represents the base implementation for API clients that interact with an underlying platform. This class provides shared functionality such as HTTP communication and authorization handling to its derived client classes.

BatchClient

A client for interacting with the Gemini API Batch endpoint. Provides methods for creating, managing, and monitoring batch processing jobs.

CachingClient

A client for interacting with the Gemini API Caching endpoint.

ChunkClient

A client for interacting with the Chunks API.

CorporaClient

A client for interacting with the Gemini API Corpora endpoint.

CorporaManager

The CorpusManager class provides a client interface for managing corpora, documents, chunks, and permissions within a generative AI platform. It supports creating, retrieving, listing, querying, and deleting entities related to the corpus resources.

CorpusPermissionClient

A client for interacting with the Corpus Permissions endpoint.

CredentialsClient

A client for the Credentials API (/credentials): store secrets (environment variables, bearer tokens, OAuth 2.0 refresh tokens) that agent environments can use without exposing them. Secrets are write-only. Follows python-genai's client.credentials (experimental).

DecisionsClient

A client for the Decisions API (POST /decisions): evaluates structured questions (yes/no "NOUL", choice and score) against a shared multimodal input with a decision model such as GeminiDecision1, returning calibrated probabilities. Follows python-genai's client.decisions.

DocumentsClient

A client for interacting with the Documents API.

EnvironmentsClient

A client for the Environments API (/environments): sandbox environments used by agent interactions, with mounted sources (e.g. your own GCS bucket, inline files, repositories) and workspace files that can be listed, uploaded (resumable upload, optionally extracting a tar archive) and downloaded. Follows python-genai's client.environments (experimental).

FileClient

A client for interacting with the Gemini API Files endpoint.

FileSearchStoresClient

A client for the Gemini API File Search stores and documents endpoints (managed retrieval-augmented generation).

ImageTextModel

Provides functionality for image-to-text generative AI tasks including image captioning and visual question answering (VQA). Offers methods to interact with both local image files and images hosted on cloud storage.

ImagenModel

A client for interacting with the Imagen API to generate images.

InteractionsClient

A client for the Gemini Interactions API (/interactions): stateful model and agent interactions (e.g. Deep Research, Antigravity) with server-side state, background execution, Server-Sent Event streaming, stream resumption and continuation of long decodes. Works with the Gemini Developer API and Vertex AI.

ModelClient

A client for interacting with the Gemini API Models endpoint.

OperationsClient

Provides functionality for interacting with long-running operations. The OperationsClient allows for querying, listing, canceling, and deleting operations on a given platform.

TriggersClient

A client for the Triggers API (/triggers): run an agent interaction on a cron schedule, pause/resume it, run it on demand and inspect its executions. Follows python-genai's client.triggers (experimental).

TuningClient

A client for model tuning, mirroring client.tunings of the google-genai SDK.

VoicesClient

A client for the Voices API (/voices): design voices from a prompt, remix an existing voice, replicate a voice from recorded audio, and list custom and prebuilt voices for text-to-speech. Follows python-genai's client.voices.

WebhooksClient

A client for the Gemini Webhooks API (/webhooks): register endpoints that receive event notifications for batch jobs, interactions and video generation instead of polling, ping them and rotate their signing secrets.