Skip to content

gemini-proxy

by @product-on-purpose

A self-hosted, OpenAI-compatible proxy for Google Gemini that authenticates with OAuth 2.0 + PKCE (the same credentials as the Gemini CLI) — no paid API key — with token refresh, SSE streaming, tool calls and multi-modal input.

View on GitHub ☆ Save Report
★ 0 saves GitHub ★ 45

Installation & usage

README summary

A self-hosted, OpenAI-compatible proxy for Google Gemini that authenticates with OAuth 2.0 + PKCE (the same credentials as the Gemini CLI) — no paid API key — with token refresh, SSE streaming, tool calls and multi-modal input.

A self-hosted, OpenAI-compatible HTTP proxy for Google Gemini, authenticated with OAuth 2.0 + PKCE using the same credentials as the official Gemini CLI. No paid API key, no gcloud. Built with Bun + Hono + TypeScript. OpenAI wire-compatible — drop-in for any tool that speaks the OpenAI API. Browser-based login, silent token refresh, static bearer auth on /v1/*. SSE streaming, function calling and base64 inline images. Auto-provisions a free-tier managed GCP project on first login. Uses internal Google endpoints embedded in the Gemini CLI; may violate provider ToS. Intended for personal and internal development only.

Auto-extracted from the repository README. The authoritative steps live in the repository on GitHub.

Full README

gemini-proxy

A self-hosted, OpenAI-compatible HTTP proxy for Google Gemini, authenticated with OAuth 2.0 + PKCE using the same credentials as the official Gemini CLI. No paid API key, no gcloud. Built with Bun + Hono + TypeScript.

What's inside

  • OpenAI wire-compatible — drop-in for any tool that speaks the OpenAI API
  • Browser-based login, silent token refresh, static bearer auth on /v1/*
  • SSE streaming, function calling and base64 inline images
  • Auto-provisions a free-tier managed GCP project on first login

Note

Uses internal Google endpoints embedded in the Gemini CLI; may violate provider ToS. Intended for personal and internal development only.

Product Artifact Hub — a registry for Product people. GitHub is the source of truth for code. All rights reserved - Wagner Borba (WBTech Studio) © 2026.