Gemini
Gemini is a family of multimodal large language models developed by Google DeepMind.
Getting Started
First, ensure you have both opik
and google-genai
packages installed:
In addition, you can configure Opik using the opik configure
command which will prompt you for the correct local server address or if you are using the Cloud platform your API key:
Configuring Gemini
In order to configure Gemini, you will need to have:
- Your Gemini API Key: See the following documentation page how to retrieve it.
Once you have these, you can set them as environment variables:
{pytest_codeblocks_skip=true}
Tracking Gemini calls

Cost Tracking
The track_genai
wrapper automatically tracks token usage and cost for all supported Google AI models.
Cost information is automatically captured and displayed in the Opik UI, including:
- Token usage details
- Cost per request based on Google AI pricing
- Total trace cost
View the complete list of supported models and providers on the Supported Models page.