Google (Gemini)
Gemini models can be added to Tresor via API key authentication. This is the Gemini Developer API, not a Gemini subscription or a regional Vertex AI deployment.
- Web UI
- config.yaml
Web UI is more intuitive, but requires more manual operations.
In the "Downstreams" tab:
- Click + Add Provider if Google is not already listed.
- Enter
Google Geminior any name you like. - Under "API Formats", select Gemini.
- Under "Authentication", select API key and enter a key from Google AI Studio.
- Under "API Host", enter
https://generativelanguage.googleapis.com. - Under "Models", click Fetch Models and add the models you need. If discovery is unavailable, enter model IDs from AI Studio manually.
Editing YAML is less intuitive, but requires fewer manual operations.
Replace YOUR-GEMINI-API-KEY with your API key. The model ID below follows Tresor's example configuration; replace it with a model available to your account.
# Other settings omitted. Add this entry to your existing downstreams list.
downstreams:
- id: gemini
name: Google Gemini
base_url: https://generativelanguage.googleapis.com
api_formats:
- gemini
output_model_ids:
- gemini-3.8-flash
is_enabled: true
auth:
type: api_key
api_key: YOUR-GEMINI-API-KEY
Restart Tresor to apply the YAML changes.
Optional OpenAI compatibility
Google also supports OpenAI Chat Completions in a separate namespace. To enable it alongside Gemini:
- Select OpenAI under "API Formats".
- Click Advanced and set the OpenAI entry under "Per-format URLs" to
https://generativelanguage.googleapis.com. - Set its per-format request path to
/v1beta/openai/chat/completions.
The equivalent additions to the downstream YAML entry are:
api_formats:
- gemini
- openai
format_urls:
openai: https://generativelanguage.googleapis.com
format_paths:
openai: /v1beta/openai/chat/completions
Do not select OpenAI Responses or Anthropic: the supplied compatibility report does not document these endpoints for the Gemini Developer API. Google's Interactions API is distinct from Tresor's native Gemini generateContent integration.
Done! Clients accessing Tresor can now use your configured Gemini models.
Gemini subscription access: not planned
Google AI Pro/Ultra subscription quotas are separate from public Gemini API usage. Due to restrictions from Google, they explicitly restrict third-party access through that authentication path and warn of possible account suspension or termination.