Use Metrion as a proxy for Google Gemini. Because Metrion connects to Gemini’s OpenAI-compatible endpoint, you can use the standard OpenAI SDK — only theDocumentation Index
Fetch the complete documentation index at: https://metrion.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
baseURL changes.
Metrion routes Gemini requests through Google’s OpenAI-compatible API endpoint (
generativelanguage.googleapis.com/v1beta/openai/chat/completions). You use the OpenAI SDK, and Metrion handles the translation.Prerequisites
- A Metrion account with your
sk-metrion-xxxtoken (find it on the Integrate page) - A Google Gemini API key saved in Metrion’s Integrate page
Setup
Set
baseURL to Metrion’s Gemini proxy and pass your sk-metrion-xxx token as apiKey. Metrion injects your Gemini key and forwards the request to Google’s API.Direct HTTP
Supported models
| Model ID | Notes |
|---|---|
gemini-2.0-flash | Fast, multimodal, low cost |
gemini-2.5-pro | Most capable Gemini model |
gemini-2.5-flash | Fast and cost-efficient |
gemini-1.5-pro | Long context (1M tokens) |
gemini-1.5-flash | Fast and lightweight |
Pass-through mode
To use your own Gemini key without storing it in Metrion, pass it inAuthorization: Bearer and identify your Metrion account with the x-metrion-token header:
In pass-through mode, your Gemini key is forwarded directly to Google’s API and is never stored by Metrion.
Track requests by user or service
Add the optionalx-metrion-user header to tag individual requests. These labels appear in your Metrion logs and dashboards.