The Gemini API has Free Tier with generous limits, but there are still many tools that work exclusively with the OpenAI API.
This project provides a personal OpenAI-compatible endpoint for free.
Although it runs in the cloud, it does not require server maintenance. It can be easily deployed to various providers for free (with generous limits suitable for personal use).
[!TIP] Running the proxy endpoint locally is also an option!
You will need a personal Google API key.
[!IMPORTANT] Even if you are located outside of the supported regions, it is still possible to acquire one using a VPN.
Deploy the project to one of the providers, using the instructions below. You will need to set up an account there.
If you opt for “button-deploy”, you’ll be guided through the process of forking the repository first, which is necessary for continuous integration (CI).
vercel deployvercel devnetlify deploynetlify devsrc/worker.mjs
to https://workers.cloudflare.com/playground (see there Deploy button).wrangler deploywrangler devSee details here.
Only for Node: npm install.
Then npm run start / npm run start:deno / npm run start:bun.
Only for Node: npm install --include=dev
Then: npm run dev / npm run dev:deno / npm run dev:bun.
If you open your newly-deployed site in a browser, you will only see a 404 Not Found message. This is expected, as the API is not designed for direct browser access.
To utilize it, you should enter your API address and your Gemini API key into the corresponding fields in your software settings.
[!NOTE] Not all software tools allow overriding the OpenAI endpoint, but many do (however these settings can sometimes be deeply hidden).
Typically, you should specify the API base in this format:
https://my-super-proxy.vercel.app/v1
The relevant field may be labeled as “OpenAI proxy”. You might need to look under “Advanced settings” or similar sections. Alternatively, it could be in some config file (check the relevant documentation for details).
For some command-line tools, you may need to set an environment variable, e.g.:
OPENAI_BASE_URL="https://my-super-proxy.vercel.app/v1"
..or:
OPENAI_API_BASE="https://my-super-proxy.vercel.app/v1"
Requests use the specified model if its name starts with “gemini-“, “gemma-“, or “models/”. Otherwise, these defaults apply:
chat/completions: gemini-flash-latestembeddings: gemini-embedding-001To use the web search tool, append “:search” to the model name (e.g., “gemini-2.5-flash:search”).
Note: The annotations message property is not implemented.
Vision and audio input supported as per OpenAI specs.
Implemented via inlineData.
There are several features supported by Gemini that are not available in OpenAI models
but can be enabled using the extra_body field.
The most notable of these is thinking_config.
For more details, refer to the Gemini API docs.
chat/completions
Currently, most of the parameters that are applicable to both APIs have been implemented.
completionsembeddings
dimensionsmodels