OpenAI-compatible API wrapper for Google's Gemini models.
This proxy allows you to use Google's Gemini models with any tool, library, or script designed for OpenAI's API. It handles authentication, stream adaptation, and multimodal input conversion automatically.
We have comprehensive documentation available in the docs/
directory:
What is this project and why should I use it?
How do I secure my proxy and connect to Google?
- Consumer Auth: Protect your proxy with
PROXY_API_KEY. - Provider Auth: Use API Keys, OAuth (Local), or Vertex AI.
Endpoints, parameters, and cURL examples.
How to host this server anywhere.
- VPS Guide: Secure deployment with BuildKit secrets.
- Local Docker: Quick start for development.
🏗️ Architecture
Deep dive into how the proxy works internally.
Common errors and solutions.
-
Install & Build:
npm install npm run build
-
Run:
# With Google AI Studio Key export GEMINI_API_KEY="AIzaSy..." npm run start
-
Test:
curl http://localhost:3000/v1/models