tbphp/gpt-load
Self-hosted Go gateway for routing LLM traffic across providers and credentials
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
GPT-Load is a self-hosted Go gateway with Gin in its dependency stack and an embedded management console. A request enters through a client-protocol endpoint with a gateway AccessKey. The key limits which groups and protocols the client can use; the group defines available models and runtime policy for a channel, and the gateway selects an upstream credential from that channel. This separates application access from provider credentials, so operators can change upstream credentials without reconfiguring every client.
Bifrost Core supports provider authentication, request and response conversion, streaming, and usage normalization. CLIProxyAPI handles OAuth and execution for subscription channels. GPT-Load itself owns encrypted credential storage, account selection, retries, health, affinity, logging, and usage policy. The integration surface is a set of built-in channels and a custom OpenAI-compatible upstream option; the client protocol and the upstream channel are separate configuration decisions.
Key Capabilities & Differentiators
The endpoint surface goes beyond chat. It includes OpenAI Chat Completions and Responses, Anthropic Messages, Gemini model and embedding routes, plus dedicated routes for images, embeddings, reranking, speech, and Mistral OCR and transcription. Built-in channels cover official APIs, Azure OpenAI, AWS Bedrock, Google Vertex AI, services such as DeepSeek and OpenRouter, and Codex, Claude, Antigravity, and Grok subscription accounts. The endpoint list is not a guarantee that every upstream supports every operation; validate the protocol, model, and channel combinations your clients actually use.
Multiple credentials can be scheduled with configurable weights. Retries, cooldown, and blacklisting help isolate failures, while session affinity keeps related requests on the same credential. The console exposes routing, health, request logs, and usage, including token categories, cache hit rates, and cost estimates. Those estimates are useful for tracking trends, not as replacements for provider invoices.
Trade-offs & Limitations
Compared with calling the OpenAI API directly, GPT-Load gives teams one place to manage access, credentials, routing, and usage, at the cost of an additional network hop and another service to operate. If only one upstream and one credential policy are needed, direct integration is simpler. The gateway does not run model inference or make upstream access available offline. Size it for concurrent requests, open streams, and log and database growth rather than model VRAM, and benchmark with the traffic you intend to serve.
Local credential encryption shifts key custody to the operator. Back up the database and encryption.key together: replacing or losing the key makes existing encrypted credentials unrecoverable, and master key rotation is not supported in this version. Treat OAuth as another operational dependency, and verify upstream terms before using subscription accounts for shared traffic. The gateway's MIT license does not grant rights to upstream services; bundled dependencies also have their own notices.
Hardware & Deployment Guide
The provided Compose setup uses ghcr.io/tbphp/gpt-load:2, publishes HTTP on 127.0.0.1:3001 by default, and checks /health. It persists application-managed SQLite, auth.key, and encryption.key in the gpt-load-data volume at /app/data. DATABASE_DSN supports external MySQL or PostgreSQL; portable binaries are also available. The main listener and fixed OAuth callback ports (1455, 54545, 51121) have separate host bind overrides. Those fixed mappings conflict if you run two default Compose instances on one host.
The supplied release history lists v2.0.0-rc.69 as a release candidate that adds HTTPS forward-proxy support. The :2 image tracks verified beta and RC builds before GA; latest remains on 1.x. Pin an exact image tag for reproducible rollouts. The 2.x rewrite cannot open or import 1.x data: deploy it alongside 1.x with a fresh database and encryption.key, a separate data directory and volume, and non-conflicting ports. Verify client behavior before cutover and keep 1.x available for rollback.
encryption.key; 2.x requires fresh state rather than an in-place upgrade from 1.x.Teams that need one managed endpoint for multiple LLM providers or credentials, with scoped client access, failover policies, and shared usage visibility.
One upstream API already meets your needs, you need offline inference, or you cannot operate a separate gateway and protect its credential store.
Quick Start & Installation
git clone --depth 1 https://github.com/tbphp/gpt-load.git cd gpt-load cp .env.example .env docker compose up -d
Comparison vs. Top LLMs & Inference Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| gpt-load ★ | 7.2k | +6 | Go | MIT | Self-hosted Go gateway for routing LLM traffic across providers and credentials |
| bifrost | 10.2k | +125 | Go | Apache-2.0 | Self-hosted Go gateway for routing and governing multi-provider LLM traffic |
| freellmapi | 62k | +2.6k | TypeScript | MIT | Self-hosted LLM gateway for routing across free tiers and custom endpoints |
| OmniRoute | 92.1k | +1.5k | TypeScript | MIT | Self-hosted OpenAI-compatible gateway for multi-provider routing and fallback |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/tbphp/gpt-load.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about gpt-load
How do I connect an existing OpenAI, Anthropic, or Gemini client?
Does GPT-Load need a GPU, and how should I size the host?
Can we self-host it commercially, and what compliance work remains?
encryption.key.When is GPT-Load preferable to calling the OpenAI API directly?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy