generativelanguage.googleapis.com, not Vertex AI.
Use the native Gemini paths when you want Google’s generateContent and streamGenerateContent request format:
| Gemini API operation | Catalyst path |
|---|---|
| Non-streaming generation | /v1beta/models/{model}:generateContent |
| Streaming generation | /v1beta/models/{model}:streamGenerateContent |
gemini provider. You can still set x-inference-provider: gemini explicitly to make routing obvious.
Looking for Gemini through Google Cloud Vertex AI instead? Use the Vertex AI guide.
Setup
Get your API keys
You need two keys:
- Inference Catalyst project API key — from your dashboard under API Keys
- Gemini API key — from Google AI Studio
Use the Google Gen AI SDK
The Google Gen AI SDK can point at the Catalyst gateway with
httpOptions.baseUrl. The SDK sends your Gemini key as x-goog-api-key; Catalyst forwards that header downstream and uses Authorization for your Catalyst project key.Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <your-project-api-key> authenticates the request to Catalyst and links telemetry to your project. |
x-inference-provider | No | Set to gemini to make routing explicit. Native Gemini paths default to Gemini when omitted. |
x-inference-provider-api-key | Yes for cURL | Your Gemini API key. Catalyst forwards it to Gemini as x-goog-api-key. |
x-inference-environment | No | Tags requests with an environment, such as production or staging. |
x-inference-task-id | No | Groups requests under a logical task for filtering and analytics. |
Supported paths
Catalyst currently supports the direct Gemini generation paths:/v1beta/models/{model}:generateContent/v1beta/models/{model}:streamGenerateContent/v1/models/{model}:generateContent/v1/models/{model}:streamGenerateContent
OpenAI-compatible endpoint
If you would rather use the OpenAI request format (for example, to reuse an existing OpenAI SDK setup), Gemini exposes an OpenAI-compatible surface athttps://generativelanguage.googleapis.com/v1beta/openai. Catalyst can route to it by combining the OpenAI-format path with a provider URL override:
| Header | Value |
|---|---|
x-inference-provider | gemini |
x-inference-provider-url | https://generativelanguage.googleapis.com/v1beta/openai |
x-inference-provider-api-key | Your Gemini API key. Catalyst forwards it as Authorization: Bearer <key> because the OpenAI-compat endpoint requires bearer auth. |
cURL
:generateContent paths above remain the recommended surface — they expose Gemini features (system instructions, thinking traces, response schemas, image inputs) that the OpenAI-compat shim does not pass through.