{"id":27876817,"url":"https://github.com/mjtechguy/gemini-openai-api-proxy","last_synced_at":"2025-05-05T02:52:41.257Z","repository":{"id":224863394,"uuid":"764435107","full_name":"mjtechguy/gemini-openai-api-proxy","owner":"mjtechguy","description":"An OpenAI API compatible proxy for Google Gemini running in Docker.","archived":false,"fork":false,"pushed_at":"2024-02-28T04:41:11.000Z","size":22,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T04:10:44.840Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mjtechguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-28T04:14:45.000Z","updated_at":"2024-04-30T08:25:35.000Z","dependencies_parsed_at":"2024-02-28T05:28:52.193Z","dependency_job_id":"b9f04c24-2260-4910-bf8c-17ccb5e4a815","html_url":"https://github.com/mjtechguy/gemini-openai-api-proxy","commit_stats":null,"previous_names":["mjtechguy/gemini-openai-api-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjtechguy%2Fgemini-openai-api-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjtechguy%2Fgemini-openai-api-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjtechguy%2Fgemini-openai-api-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjtechguy%2Fgemini-openai-api-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjtechguy","download_url":"https://codeload.github.com/mjtechguy/gemini-openai-api-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252429945,"owners_count":21746571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-05T02:52:40.742Z","updated_at":"2025-05-05T02:52:41.245Z","avatar_url":"https://github.com/mjtechguy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gemini OpenAI API Proxy\n\nThis is a simple proxy server that allows you to use the OpenAI API with the the currently ***FREE*** Google Gemini API.\n\nIt runs as a Docker container and is very easy to set up.\n\nBased on [openai-gemini](https://github.com/PublicAffairs/openai-gemini).\n\nAlso, I am not a developer and I am not familiar with the best practices. I am just a user that wanted to use this service in a different way. If you have any suggestions, please let me know. \n\nAlso also, this thing may be buggy as hell...sooo...yeah.\n\n- [Gemini OpenAI API Proxy](#gemini-openai-api-proxy)\n  - [Security Warning](#security-warning)\n  - [Pre-requisites](#pre-requisites)\n  - [Usage](#usage)\n    - [Starting Up](#starting-up)\n    - [Stopping](#stopping)\n  - [Testing](#testing)\n  - [Compatibility](#compatibility)\n  - [EndPoints](#endpoints)\n  - [Recognition](#recognition)\n\n## Security Warning\n\nThis is a very simple proxy server and does not have any security features. It is not recommended to use this in a production environment or to be exposed to the internet. It is recommended to use this only for development purposes.\n\n## Pre-requisites\n\n- Docker\n- Docker Compose\n- A Personal Google [API key](https://makersuite.google.com/app/apikey)\n\n## Usage\n\n### Starting Up\n\n1. Clone this repository\n2. `cd` into the repository\n3. Run `docker compose up --build -d`\n4. The server will be running on `http://0.0.0.0:8080`\n5. When you use another client to connect to the server, you will need to provide the Google API key as a Bearer token in the `Authorization` header.\n\n### Stopping\n\n1. `cd` into the repository\n2. Run `docker compose down`\n\n## Testing\n\nYou can test the server by running the following command:\n\n```bash\ncurl -X POST \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Authorization: Bearer YOUR-GOOGLE-API-KEY\" \\\n     -d '{\"model\": \"gpt-4\", \"prompt\": \"What is the capital of France?\", \"temperature\": 0.5, \"max_tokens\": 500}' \\\n     http://YOUR-MACHINE-IP:8080/v1/chat/completions\n```\n\n## Compatibility\n\nI have tested with the following clients:\n\n- `curl`\n- [MindMac](https://mindmac.app/)\n- [LibreChat](https://github.com/danny-avila/LibreChat) - This is redundant because it already has a built-in support for Gemini.\n  \n\n## EndPoints\n\nEnpoints support right now:\n\n- [x] `/v1/chat/completions` \n\nThis is the endpoint that is used to generate text completions.\n\nI may forget about this project in the future and next track updates from the main project. See below if you want to contribute or see if they have added more endpoints.\n\n## Recognition\n\nThis project is based on the great work from https://github.com/PublicAffairs/openai-gemini. They provide a way to run this in a serverless environment. I modified it to run as a Docker container because I like to host my own services.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjtechguy%2Fgemini-openai-api-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjtechguy%2Fgemini-openai-api-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjtechguy%2Fgemini-openai-api-proxy/lists"}