Your OpenAI-to-Gemini adapter, now officially out of a job
It lets apps built for OpenAI's API talk to Google's Gemini models by translating requests on the fly.

What it does
This Go service sits between an OpenAI client and Google Gemini, translating requests and responses so that chat completions, embeddings, and model-list calls meant for api.openai.com work against Google’s endpoints instead. It includes a hardcoded model mapping table—gpt-4 becomes gemini-1.5-flash-002, gpt-4o becomes gemini-2.0-flash-exp, and so on—which you can disable if you prefer to call Gemini models by their actual names.
The interesting bit The project’s most notable feature is now its own README warning: Google AI Studio launched an official OpenAI-compatible endpoint, so this proxy has effectively been promoted from infrastructure to historical artifact. Before that announcement, it was a pragmatic bit of protocol glue for anyone with a Google API key who wanted to keep their existing client code untouched.
Key highlights
- Supports chat completion, embeddings, and model listing endpoints.
- Maps familiar OpenAI model names to Gemini equivalents via environment variables, or lets you bypass mapping entirely.
- Handles vision inputs by translating
gpt-4-vision-previewrequests to Gemini’s multimodal models. - Ships as a lightweight Go binary with a Docker image.
- The README explicitly recommends migrating to Google’s official compatibility API.
Caveats
- Google now provides native OpenAI protocol support, making this proxy largely redundant for new projects.
- The README is essentially a quickstart guide with a “please stop using this” notice at the bottom.
Verdict Grab the code if you need a self-hosted example of how to shim two LLM protocols, or if you are maintaining legacy infrastructure that cannot migrate to Google’s official endpoint. Everyone else should probably just read the README’s own advice and use the native compatibility layer.
Frequently asked
- What is zhu327/gemini-openai-proxy?
- It lets apps built for OpenAI's API talk to Google's Gemini models by translating requests on the fly.
- Is gemini-openai-proxy open source?
- Yes — zhu327/gemini-openai-proxy is open source, released under the MIT license.
- What language is gemini-openai-proxy written in?
- zhu327/gemini-openai-proxy is primarily written in Go.
- How popular is gemini-openai-proxy?
- zhu327/gemini-openai-proxy has 720 stars on GitHub.
- Where can I find gemini-openai-proxy?
- zhu327/gemini-openai-proxy is on GitHub at https://github.com/zhu327/gemini-openai-proxy.