Google Gen AI
The official Google Gen AI SDK is the client for Google’s Gemini models, supporting text, multimodal, tool use, and structured outputs. Respan gives you full observability over every Gemini call, streamed response, and tool invocation — and gateway routing through the Respan endpoint.
Set up Respan
Create an account at platform.respan.ai and grab an API key. For gateway, also add credits or a provider key.
Run npx @respan/cli setup to set up with your coding agent.
Example projects
Tracing
Gateway
Setup
Set environment variables
GOOGLE_API_KEY is used for Gemini requests. RESPAN_API_KEY is used to export traces to Respan.
View your trace
Open the Traces page to see your auto-instrumented Gemini spans with prompts, tokens, and tool calls.
Configuration
Attributes
In Respan()
Set defaults at initialization — these apply to all spans.
With propagate_attributes
Override per-request using a context scope.