Enabled when
GOOGLE_API_KEY is set in your environment.Overview
The@standardagents/google package provides a Standard Agents provider for Google’s Gemini and Imagen APIs. It uses the official @google/genai SDK, supports Gemini text/tool/image requests, and routes Imagen generation and editing through Google’s dedicated image endpoints.
Key Features
- Official
@google/genaiSDK integration - Gemini text, multimodal, JSON, streaming, and tool calling support
- Imagen image generation and edit support
- Built-in pricing for documented Gemini models used in request logs
- Public model discovery through
models.list()
Installation
pnpm
Quick Start
Common Models
gemini-2.5-progemini-2.5-flashgemini-2.5-flash-litegemini-2.5-flash-imagegemini-3-pro-image-previewimagen-4.0-generate-001imagen-3.0-capability-001
Provider Options
Common Gemini options includeresponseModalities, candidateCount, cachedContent, thinkingConfig, imageConfig, and safetySettings.
Common Imagen options include numberOfImages, negativePrompt, aspectRatio, outputMimeType, imageSize, and editMode.
Pricing
The provider includes built-in pricing for current documented Gemini models such asgemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-flash-image, and gemini-3-pro-image-preview.
For Imagen models and undocumented Google models, set explicit pricing on your model definitions if you need guaranteed cost tracking.
Environment Setup
.dev.vars