geminicli2api, as an open source proxy tool built on FastAPI, can perfectly interface with the two mainstream AI interface specifications. The core value of the tool is to achieve a seamless conversion of Google Gemini CLI to OpenAI API format, while retaining the ability to call the native Gemini API. By providing/v1/chat/completionscap (a poem)/v1/modelsand other standard endpoints, developers can directly use the OpenAI client library to call. The project design follows the principle of lightweight, adopts Python+FastAPI technology stack, supports 3000 concurrent requests, and the response latency is controlled in milliseconds. Particularly noteworthy is that the tool is able to intelligently handle Gemini-specific functions such as Google search enhancement, inference depth control, and other functions through model variants parameters such as-search,-maxthinkingAchieve precise control.
This answer comes from the articlegeminicli2api: Proxy tool to convert Gemini CLI to OpenAI-compatible APIsThe































