Awesome Infra for AI › LLM Gateways & Proxies

zexadev/gemini-web2api-go

⭐ 480 Go repository created 2026-05-29

gemini-web2api-go is a single-binary Go server that exposes the consumer Gemini web interface (gemini.google.com) as an OpenAI-compatible API, rather than wrapping Google's official paid `generativelanguage.googleapis.com` endpoint. It implements `/v1/chat/completions`, `/v1/models`, an OpenAI-Responses-shaped `/v1/responses`, and an asynchronous Sora-style `/v1/videos` endpoint for video generation, alongside image, music and canvas generation. It authenticates clients via Bearer token or `x-api-key`, with keys rotatable from an admin panel, and computes usage with tiktoken, excluding reasoning tokens from the completion count. Exposed models include flash-tier variants usable anonymously and a pro-tier reasoning model that requires an attached Google account cookie and returns a reasoning trace; thinking-enabled variants exist for each model. To avoid detection and blocking, the proxy impersonates a real Chrome TLS fingerprint via utls rather than relying on an SDK's default handshake, applies per-outbound-IP concurrency/RPM/RPH limits, rotates through a pool of proxies with automatic retirement of failing ones, and maintains a pool of Google account cookies that are automatically renewed and kept alive, each pinned to its own egress IP. Persistence defaults to an embedded SQLite database but can be switched to MySQL or PostgreSQL via a `SQL_DSN` environment variable, sharing one schema; it stores only request metadata (length, latency, model, status), never prompt or response content. A Chinese-language admin UI covers overview stats, request logs, the proxy pool, the cookie pool and live-applied settings. Deployment options include prebuilt binaries for six platforms, a distroless Docker image, docker-compose, or building from source. It documents compatibility with OpenAI SDKs, Cherry Studio, Open WebUI, dify, Cursor, newapi/one-api and Codex CLI, but explicitly does not support the official Gemini CLI, which requires Google's native endpoint shape.

https://github.com/zexadev/gemini-web2api-go

llm-gatewayopenai-compatible-apireverse-proxyapi-proxyself-hostedrate-limitinggolanggemini

Also in LLM Gateways & Proxies

diegosouzapw/OmniRoute

OmniRoute is a free AI gateway that unifies access to over 170 AI providers, offering token compression, auto-fallback, and aggregating free tiers to provide billions of free tokens monthly.

Mintplex-Labs/anything-llm

AnythingLLM is an all-in-one local-first AI application for chatting with documents, managing AI agents, and integrating with various LLMs and vector databases, offering dynamic model routing and m...

BerriAI/litellm

LiteLLM is an open-source AI Gateway and Python SDK providing a unified interface to over 100 LLM providers, with features like cost tracking, guardrails, load balancing, and observability.

QuantumNous/new-api

new-api is a unified LLM gateway and AI asset management system that enables aggregation, distribution, and cross-conversion of various LLMs into OpenAI, Claude, or Gemini compatible formats, offer...

Kong/kong

Kong Gateway is a cloud-native API and AI gateway offering high performance, extensibility via plugins, and advanced AI traffic capabilities including multi-LLM support, semantic security, and cach...

decolua/9router

9Router is an AI router and token saver that connects various AI coding tools to over 40 AI providers, optimizing usage with auto-fallback, quota tracking, and token compression.

apache/apisix

Apache APISIX is a dynamic, real-time, high-performance API Gateway that can also function as an AI Gateway, providing AI proxying, load balancing for LLMs, and robust security for AI agents.

lidge-jun/opencodex

OpenCodex is a universal local proxy that enables OpenAI Codex, Claude Code, and Grok Build to utilize any LLM provider, offering advanced model routing, account pooling, and API key management.