Skip to content
FossShelf
Home / Categories / For AI Engineers

Gpt Load

Self-hosted AI gateway for multi-channel routing

Replaces —

7.22K starsMITlast commit 15 Nov 2026
Screenshot of Gpt Load

Who it's for

Developer using multiple AI providers

A developer with accounts on OpenAI, Anthropic, and DeepSeek configures each as a separate Group in GPT-Load. All applications in their stack point to one gateway URL, and provider-specific retry and rate-limit logic is handled once in the gateway rather than in each app.

You use only one AI provider with a single API key and have no need for failover or credential pooling.

Team managing Codex and Claude subscription accounts

Teams sharing Codex or Claude subscription accounts across multiple developers or services can pool those credentials in GPT-Load. The gateway handles the OAuth flow once, schedules requests across available accounts, and isolates a cooling-down account from the rest of the pool.

Your team uses only API-key-based access and does not operate subscription accounts.

Self-hosted AI infrastructure operator

An operator running their own AI infrastructure stack deploys GPT-Load as the single entry point for all model traffic. Local credential encryption, SQLite or PostgreSQL storage, and an embedded UI mean no credentials or usage data leave the host.

You need a managed, horizontally scalable gateway with SLA guarantees rather than a self-hosted single-instance deployment.

Platform team standardising AI access

A platform team issues AccessKeys to internal services with per-key rate and cost limits. Each service uses its AccessKey without knowing which upstream provider or credential handles its requests, and the team monitors usage and costs for all services from one UI.

The problem

Teams using multiple AI providers must implement credential rotation, retry logic, rate-limit handling, and usage tracking separately in every application that calls an AI API. Subscription-based accounts like Codex and Claude add OAuth flows that differ from key-based APIs. The result is duplicated boilerplate, inconsistent failure handling, and no single place to observe usage across providers.

How it works

35 built-in channels

Official APIs (OpenAI, Anthropic, Gemini, xAI), cloud platforms (Azure OpenAI, AWS Bedrock, Google Vertex AI), over a dozen model services including DeepSeek, OpenRouter, Groq, and Mistral, plus subscription accounts for Codex, Claude, Antigravity, and Grok are all built in and share the same scheduling and health machinery.

Four client protocols, native or converted

OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, and Gemini are accepted on the client side. The gateway routes each request through the native upstream path or converts it as declared by the selected channel, so existing clients typically only need a new base URL and AccessKey.

Scheduling, retries, and failure isolation

Credentials within a Group are scheduled with configurable weights. Rate-limited or invalid credentials trigger cooldown and automatic blacklisting before they can affect the full pool. Session affinity and configurable retries are available per Group.

Embedded management UI and observability

The management UI ships inside the Go binary with no separate frontend deployment. It surfaces credential health, cooldown timers, request logs, usage summaries, and per-model cost estimates derived from upstream token counts.

Local credential encryption and self-contained data

Upstream credentials are encrypted with a locally held key and never pass through a third party. The service defaults to application-managed SQLite; an external MySQL or PostgreSQL database is supported via a single `DATABASE_DSN` environment variable.

Single binary, multiple deployment targets

Native binaries are published for Linux and macOS on amd64 and arm64, and for Windows on amd64. A Windows installer registers a low-privilege system service. Docker Compose with a single command is the recommended path for server deployments.

Features

  • 35 built-in channels
  • Four client protocols, native or converted
  • Scheduling, retries, and failure isolation
  • Embedded management UI and observability
  • Local credential encryption and self-contained data
  • Single binary, multiple deployment targets

How to install

git clone --depth 1 --branch main https://github.com/tbphp/gpt-load.git cd gpt-load && cp .env.example .env docker compose up -d # Read the generated management key docker compose exec gpt-load sh -c 'cat /app/data/auth.key'

Recommended for this setup

Strengths

  • One mechanism for API keys and subscriptions: API-key channels and OAuth-based subscription accounts (Codex, Claude, Antigravity, Grok) share the same Group abstraction, scheduler, and health handling. Applications do not need to know which credential type an upstream uses.
  • No external dependencies to start: The management UI is embedded in the Go binary. SQLite is managed by the application itself, so a new deployment needs only Docker Compose with no external database, no separate UI server, and no additional services to provision.
  • Keeps clients' native authentication style: The gateway preserves each client protocol's authentication header: `Authorization: Bearer` for OpenAI clients, `x-api-key` for Anthropic clients, and `x-goog-api-key` or the key query parameter for Gemini clients. Most existing codebases need only a base URL change.
  • Transparent cost and usage accounting: Per-model cost estimates, token category breakdowns, cache hit rates, and request trends are visible in the embedded UI and scoped down to the individual credential handling a request, without sending data to any external analytics service.

Trade-offs

  • Single-instance only in v2.0: Version 2.0 guarantees correctness within one instance. Instances do not share state and horizontal scaling is not supported. Larger workloads must be split into independent deployments rather than scaling the gateway horizontally.
  • No in-place upgrade from 1.x: Version 2.0 is a full rewrite and cannot open, import, or migrate 1.x data. Upgrading requires a separate database, data directory, and port, with traffic switched over manually after validation.
  • Cost figures are estimates, not invoices: Usage and cost numbers are derived from upstream responses for capacity planning purposes. They are not provider invoices, cannot be used for financial reconciliation, and price changes do not recalculate historical figures.
  • Encryption key loss is unrecoverable: The `encryption.key` file decrypts all stored channel credentials. If it is lost or replaced, existing credentials cannot be recovered. This release does not support master-key rotation, so the key must be backed up alongside the database.

Tech stack

Languages
Go, Vue, TypeScript, Python, CSS, Inno Setup, JavaScript, Dockerfile, Makefile, HTML
Frameworks
Vue
Databases
—
Tooling
—

FAQ

Does my application need to change its code to work with GPT-Load?

Usually only the base URL and API key need to change. GPT-Load accepts OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, and Gemini protocols and preserves each client's native authentication header, so existing SDK usage typically works without code changes.

What database does GPT-Load use?

By default, GPT-Load manages its own SQLite database in the data directory, requiring no external setup. You can switch to an external SQLite file, MySQL, or PostgreSQL by setting the `DATABASE_DSN` environment variable.

How are upstream credentials protected?

Credentials are encrypted locally using an `encryption.key` file generated on first start. They are never sent to a third party. The key must be backed up alongside the database — if it is lost or replaced, existing encrypted credentials cannot be recovered, and this release does not support master-key rotation.

Can I run multiple instances of GPT-Load for high availability?

Not in v2.0. The current release guarantees correctness within a single instance; multiple instances do not share state and horizontal scaling is not supported. The recommended approach for larger workloads is to split them into independent deployments.

Can I upgrade from GPT-Load 1.x to 2.0?

There is no in-place migration path. Version 2.0 is a full rewrite and cannot open or import 1.x data. The recommended approach is to deploy 2.0 with a separate database, data directory, and port, reconfigure channels and credentials, then switch traffic after validation.

Similar tools

More in AI Engineers