这是一个反向代理端点,用于在受网络限制的环境中访问 Google Gemini 接口。
将客户端的 Gemini API 请求转发到上游
generativelanguage.googleapis.com,使国内网络环境能够稳定访问。
本代理不保存任何密钥,API Key 由你的请求头携带并原样透传。
x-goog-api-key: <你的Key> 或
Authorization: Bearer <你的Key>。
curl https://your-domain.com/v1beta/models/gemini-2.0-flash:generateContent \
-H "x-goog-api-key: $GEMINI_KEY" \
-H "Content-Type: application/json" \
-d '{"contents":[{"parts":[{"text":"你好"}]}]}'
X-Access-Token。streamGenerateContent 或
?alt=sse 参数。