openai-gemini is an OpenAI API proxy that routes requests to Google's Gemini API and can be deployed serverlessly.
The project solves the problem of tool incompatibility: many applications work exclusively with the OpenAI API, but developers may want to use Gemini, which offers a free tier with generous limits. The proxy presents a personal OpenAI-compatible endpoint by accepting requests in OpenAI format and translating them to Gemini API calls. It requires only a Google API key and can be deployed to cloud providers including Vercel, Netlify, Cloudflare, and Deno, or run locally with Node, Deno, or Bun.
Adoption suits developers building personal projects or prototypes who want free access to a capable model without maintaining infrastructure. The tool works with any software that allows overriding the OpenAI endpoint URL, though some applications hide this setting in advanced configuration sections or environment variables. It supports vision and audio input according to OpenAI specifications, implements the web search tool via model name suffixes, and exposes Gemini-specific features like extended thinking through the extra_body field. The proxy defaults to gemini-flash-latest for chat completions and gemini-embedding-001 for embeddings, but respects model names starting with "gemini-", "gemma-", or "models/".
Development shows consistent maintenance with regular updates addressing user-reported issues and feature requests. The project maintains active discussion channels for deployment questions and implementation details. Code changes reflect responsiveness to edge cases, such as handling API key acquisition for users outside supported regions and clarifying expected behavior for direct browser access to the endpoint.