Skip to content

spectre-pro/gemini-proxy

Repository files navigation

GitHub stars
GitHub forks
GitHub watchers
GitHub repo size
GitHub language count
GitHub top language
GitHub last commit

Gemini API Proxy

This is a proxy server designed specifically for the Google Gemini API. It allows you to securely consolidate multiple API keys into a single endpoint and randomly select one for use with each request. This is useful for managing keys, load balancing, and integrating with front-end applications.

✨ Features

  • Multi-Key Management: Pass multiple Google AI API keys, separated by commas, in the x-goog-api-key header.
  • Random Key Selection: A key is randomly selected from your provided list for each request, helping to distribute the load.
  • Request Forwarding: Seamlessly forwards all requests to the Google Generative Language API (https://generativelanguage.googleapis.com).
  • Flexible Deployment: Optimised for Vercel, but also supports deployment using Docker.

🚀 Deployment Guide

We highly recommend using Docker + Claw Cloud for a quick and easy one-click deployment.

Vercel

Caution

The uploaded file can't be bigger than 3MB

Deploy to Vercel

  1. Click the "Deploy to Vercel" button above.
  2. Follow the instructions on Vercel to clone this repository and deploy it.
  3. Once deployed, you will receive a dedicated proxy URL.

Docker (Recommended)

You can also use Docker to deploy on any supported platform, such as Claw Cloud.

docker run -d \
  -p 80:80 \
  --name gemini-proxy \
  --restart unless-stopped \
  ghcr.io/spectre-pro/gemini-proxy
  1. Your proxy server will be running at http://localhost:80.

Star History

Star History Chart

About

The proxy for gemini, can use Vercel and Docker deploy

Resources

License

Stars

Watchers

Forks

Packages