Google Gemini Proxy

 1---
 2# Passthrough access to the Google Gemini API, with the platform's API key.
 3# Use the Google Gen AI SDK, with this Proxy's URL as its base URL and a Smarter API key as its
 4# api_key, which the SDK sends in the x-goog-api-key header:
 5#
 6#   client = genai.Client(
 7#       api_key="<Smarter API key>",
 8#       http_options={"base_url": "https://<smarter>/api/v1/proxy/googleai/"},
 9#   )
10#
11# The SDK adds the API version, e.g. v1beta/, to its paths, so the Proxy's baseUrl does not
12# include it. Only the models endpoints, e.g. models/gemini-2.5-flash:generateContent, are allowed.
13apiVersion: smarter.sh/v1
14kind: Proxy
15metadata:
16  name: googleai
17  description: Passthrough access to the Google Gemini API's native generateContent, embedContent and models endpoints.
18  version: 1.0.0
19  tags:
20    - google
21    - gemini
22    - builtin
23  annotations:
24    - smarter.sh/proxy/builtin: "true"
25    - smarter.sh/proxy/documentation: https://ai.google.dev/api
26spec:
27  provider: googleai
28  apiKey: gemini_api_key
29  baseUrl: https://generativelanguage.googleapis.com/
30  auth:
31    header: x-goog-api-key
32    scheme: ""
33  allowedPaths:
34    - v1beta/models
35    - v1beta/models/*
36    - v1/models
37    - v1/models/*
38  timeout: 300
39  isActive: true