Self-host GPT-Load
v2.0.0-rc.57AI gateway for API keys and subscription accounts
docker compose up -d- Stars
- 7 176
- Ports
- 3001 (HTTP service (API gateway and embedded management UI)), 1455 (OAuth callback port for subscription channels), 54545 (OAuth callback port for subscription channels), 51121 (OAuth callback port for subscription channels)
ghcr.io/tbphp/gpt-loadWhat is GPT-Load?
GPT-Load is an open-source gateway for AI traffic that you run on your own hardware: applications get a single base URL plus an issued AccessKey, and the service spreads requests over many providers and credentials. Client-side it speaks the native OpenAI Chat Completions and Responses, Anthropic Messages, and Gemini protocols (also images, embeddings, rerank, and some Mistral routes), routing out to roughly thirty-five built-in channels: official vendor APIs, cloud offerings such as AWS Bedrock, Azure OpenAI and Vertex AI, model services, subscription accounts (Codex, Claude, Antigravity, Grok) and any OpenAI-compatible relay. Scheduling is the main job — weights across credentials, retries, per-model cooldowns, blacklisting with recovery probes, session affinity, and a route-check tool in the console that explains why a call failed. The management UI is baked into the same binary and covers groups, model aliases, AccessKeys with rate or cost limits, request logs, credential health and per-model cost estimates, while upstream secrets are encrypted locally. Installation is the official Compose file, a portable native binary for Linux, macOS or Windows, or a Windows service installer; storage starts on a managed SQLite file and can point to MySQL or PostgreSQL. Caveats: the 2.0 line is a pre-GA rewrite that cannot read or import 1.x data, it is designed for one instance only, and cost figures are operational estimates rather than invoices.
Should you self-host GPT-Load?
GPT-Load scores 64/100 on selfhost.directory (how scoring works) and ranks #7 of 39 in API Gateway. It has 7 176 GitHub stars.
It shipped 2 stable releases in the past year. The latest, v1.4.14, came out on 27 October 2026. New versions land roughly every 5 days.
Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Go.
Its closest alternative on selfhost.directory is Kong Gateway (82/100, 44 314 stars). It scores higher overall, so compare the two before you pick. See GPT-Load vs Kong Gateway side by side.
Features
- AccessKey management
- Automatic failover and retries
- Codex live voice relay
- Credential blacklisting and recoverySubscription credentials need reauthorization or manual handling instead of probing.
- Credential encryption at restLosing encryption.key makes stored credentials unrecoverable; no master-key rotation.
- Embedded management web UI
- Management API
- Model aliases
- Multi-credential load balancing
- Multi-protocol AI gateway
- Outbound proxy support
- Request logging
- Route check diagnostics
- Subscription account channels
- Usage and cost analyticsCosts are estimates derived from upstream usage, not provider invoices.
GPT-Load README
FAQ
Why did the account switch while quota was still available?
Displayed quota does not drive rotation order — upstream rate-limit responses put an account into cooldown immediately, though refreshing quota can release eligible cooldowns early.
Why does a subscription account ask for reauthorization?
Start with the Refresh credentials action on the account card, and reconnect or re-import the account if that still fails; refreshing quota does not bring authorization back.
Why can't a remote deployment complete OAuth authorization?
The browser resolves localhost to your own machine, so the redirect never reaches the server; paste the full callback URL back into the console or forward the port over SSH.
Why does streaming output disconnect midway?
Raise the stream idle timeout, and make sure a fronting reverse proxy does not buffer responses — Nginx for example needs proxy_buffering off.
Why do inference models always time out?
Reasoning-heavy models can think for a long time before producing output, so raise the first-byte timeout rather than the overall request timeout.
What happens when a credential gets blacklisted?
Blacklisting kicks in after a configurable run of consecutive failures; API-key groups are probed periodically and restored on a successful probe, while subscription credentials must be reauthorized or handled manually.
Why do occasional failures recover on retry?
That pattern is normally upstream rate limiting: only the throttled model cools down on that credential while its other models stay available, and adding credentials is the simplest mitigation.
How can a client use a different model name?
Define a model alias so the name the client asks for is forwarded as a different upstream model, letting you change providers without touching application code.
Why does the gateway say a model does not exist?
Use route inspection to find out whether the AccessKey, the Group or the credential is responsible, adjust the configuration, and run the check again.
Can I access the gateway remotely?
Loopback-only binding is deliberate; reach the console over SSH forwarding or a hardened reverse proxy instead of switching to 0.0.0.0, because an exposed UI leaks every stored credential.
Why do I get an unauthorized / 401 response?
Requests must carry a gateway AccessKey; the management key and upstream provider keys serve different purposes.
What should I check when a client cannot connect?
Probe the service with a /health request first; if that succeeds the problem is client-side, usually an extra or missing /v1 suffix on the URL.
Why does startup report a permission error?
The managed data directory must be owner-only; when ownership or link type cannot be verified the program refuses to start rather than loosening the checks, so inspect the DATA_DIR owner.
Why doesn't changing HOST take effect inside the container?
Inside the container HOST and DATA_DIR are pinned, and published host reachability is decided by Compose port mapping, where BIND_ADDRESS wins over HOST.
What if the port is already occupied?
Port 3001 is the default and can be moved with PORT in .env, but the subscription callback ports 1455, 54545 and 51121 are fixed upstream, so only one default Compose instance per host can do local callback authorization.
More in API Gateway
graviteeSelf-hosted, open-source API management: gateway, 50+ policies, developer portal and analytics for REST, GraphQL and gRPC APIs, run via Docker Compose or Helm.
grokbuild-proxySelf-hosted proxy translating Anthropic and OpenAI API requests to Grok Build, letting you use your personal Grok account with Claude Code and compatible clients.
HarnessRouterSelf-hosted, open-source gateway running Codex, Claude Code and other agent harnesses behind one OpenAI Responses-compatible API with sessions, streaming and files.
inference-gatewaySelf-hosted gateway that routes requests to 16+ LLM providers through a single OpenAI-compatible endpoint with MCP tools, A2A agents, guardrails, and observability.
IsartorA self-hosted, open-source gateway that sits between AI coding assistants and LLM providers, using local caching and small models to eliminate most repeated cloud calls.
Jentic OneJentic One is a self-hosted, open-source execution layer letting AI agents securely call real APIs without handling credentials.
Kong GatewayKong is a self-hosted, open-source API and AI Gateway for proxying, routing, load balancing, auth, and LLM/MCP traffic with 60+ AI features.
krakendSelf-hosted, open-source API gateway: a single stateless binary that aggregates, secures and transforms microservice APIs, with Docker, deb/rpm and brew installs.
llm-gatewaySelf-hosted open-source API gateway routing 250+ LLM models from 40+ providers via unified OpenAI-compatible API with cost tracking, caching, and failover.
llm-gatewaySelf-hosted OpenAI-compatible API gateway routing to OpenAI, Anthropic, and local backends with semantic routing, load balancing, and zero-trust networking via zrok.
lmgateSelf-hosted gateway adding enterprise auth, rate limits, and model ACLs to Ollama, llama.cpp, and LM Studio via Docker Compose.
LumenLumen is a self-hosted AI gateway. It provides a web chat interface and an OpenAI-compatible API proxy/



0 comments