gpt-load is a free, open source api development & testing project written in Go and released under MIT. It has 6,821 GitHub stars, 747 forks and 21 open issues, and was last pushed 8 hours ago. On this registry it ranks #33 of 103 tracked projects in API Development & Testing, with 5 head-to-head comparisons available. It gained 46 stars over the last 3 tracked days.

What is gpt-load?

What it is

GPT-Load is a self-hosted AI gateway written in Go and released under the MIT license. It gives applications a single entry point — one base URL and one AccessKey — for reaching many AI providers at once. Providers, accounts, credentials, models, and routing policy are configured in the bundled management UI rather than in application code.

The problem it solves is credential sprawl across a fragmented provider landscape. Teams accumulate official APIs, cloud platform endpoints, model services, and compatible relays, each with its own keys, rates, and failure modes, and clients then have to speak each vendor's dialect. GPT-Load keeps clients on their native OpenAI, Anthropic, or Gemini interfaces while it handles credential management, scheduling, and health handling behind the gateway. API-key channels and subscription accounts are treated through one mechanism, so Codex, Claude, Antigravity, Grok, and key-based channels all share the same scheduling and health logic.

Key capabilities

  • Single gateway that preserves native OpenAI, Anthropic, and Gemini client interfaces while managing providers and relays behind one base URL.
  • Unified credential handling for both API keys and subscription accounts, covering Codex, Claude, Antigravity, Grok, and API-key channels.
  • Multi-credential scheduling with configurable weights across the available credentials.
  • Retries, cooldown, and blacklisting that isolate overloaded or failing credentials.
  • Session affinity that keeps related requests pinned to a consistent credential.
  • Request logs, usage accounting, and cost estimates viewable in the embedded management UI.
  • Storage backends of SQLite, MySQL, or PostgreSQL, with local encryption of stored credentials.

Who uses it and how

  • Teams running several provider accounts who want client applications to keep a single base URL and AccessKey.
  • Operators mixing official APIs, cloud platforms, model services, and compatible relays under one console.
  • Users of subscription-based coding tools such as Codex and Claude Code who want those accounts scheduled and health-checked alongside API-key channels.
  • Developers who need request logs, usage, and cost visibility without sending traffic through a third-party service.
  • Deployments that need credential material encrypted at rest on infrastructure they control.

Getting started

Clone the repository, copy .env.example to .env, and run `docker compose up -d

project readme (upstream, from github) — read inline

GPT-Load

A self-hosted AI gateway for multi-channel, multi-credential setups

API keys, subscription accounts, traffic scheduling, failure handling, request logs, and usage accounting — behind a single entry point.

English · 中文 · 日本語 | Official Website

Release Docker Go License

tbphp/gpt-load | Trendshift Featured|HelloGitHub


Sponsors

Become a sponsor

Sponsor details (collapsible)
OfoxAI: Text, image, and video AI in one platform
OfoxAI is a unified AI API platform bringing together text, image, and video models from multiple providers. With OpenAI-compatible endpoints and native Anthropic and Gemini interfaces, developers can access models for AI applications, agents, and content creation through one platform. Explore OfoxAI models and APIs →
One entry point to connect and manage the world's leading AI models
Fluxion AI serves individual developers, technical teams, and enterprises with a unified API for connecting to and managing leading AI models worldwide. Dynamic multi-route scheduling improves availability, while model performance, response times, and costs remain transparent and easy to review. Depending on the model and route, API calls can cost 40%–98% less than official or benchmark prices. Visit and sign up now to receive $7 in API credits. (Dedicated link)
Protect and accelerate websites and APIs, serving users in mainland China and around the world, and extend acceleration and security capabilities to native/mobile apps through a client SDK — self-built private-deployment CDN | subscription-based high-protection CDN | an independently controllable, flexibly composable CDN network.
Thanks to APIMart for sponsoring this project! APIMart is a low-cost API platform for AI image & video generation — GPT-Image-2 from $0.006/image, 160+ images per dollar. One async API covers both image and video: submit a task, get an ID, fetch results via polling or callback. Batch tens of thousands of images without timeouts, switch models without changing code. Pay-as-you-go with no monthly fee — sign up here to get started.

Why GPT-Load

Your application only needs one base URL and one AccessKey. Providers, accounts, credentials, models, and routing policy are all configured in the management UI.

  • One gateway, native protocols — Manage official APIs, cloud platforms, model services, and compatible relays together while clients keep their OpenAI, Anthropic, or Gemini native interfaces.
  • One mechanism for API keys and subscriptions — Codex, Claude, Antigravity, Grok, and API-key channels share credential management, scheduling, and health handling.
  • Scheduling and failure isolation built in — Multi-credential scheduling, configurable weights, retries, cooldown, blacklisting, and session affinity reduce the impact of overloaded or failing credentials.
  • Observable, self-hosted, and simple to deploy — Inspect health, routes, logs, usage, and cost estimates in an embedded UI backed by SQLite, MySQL, or PostgreSQL with local credential encryption.

Quick start

[!WARNING] If you are using 1.x, read Moving from 1.x first. 2.0 cannot open, import, or migrate 1.x data in place.

1. Start the service

Requires Docker and Docker Compose.

git clone --depth 1 https://github.com/tbphp/gpt-load.git
cd gpt-load

cp .env.example .env
docker compose up -d

Confirm the service is up:

curl --fail http://127.0.0.1:3001/health

The first start generates a management key. Read it and store it safely:

docker compose exec gpt-load sh -c 'cat /app/data/auth.key'

Open and sign in to the console with that key.

You can also set AUTH_KEY explicitly in .env before starting. By default the service listens on the loopback address only and is not exposed to the internet.

2. Initial configuration

Initial setup takes three steps:

  1. Add a channel — Choose an upstream service and add one or more API keys. For subscription channels, complete the OAuth flow or import credentials as prompted.
  2. Create a group — Pick a channel, then configure available models and runtime policy.
  3. Create an AccessKey — Set the groups and client protocols it may use, then give the generated AccessKey to your application.
OAuth callback ports for subscription channels

The Codex, Claude, and Antigravity OAuth clients use fixed callback ports. Compose publishes them on the address configured by HOST, which defaults to 127.0.0.1; setting HOST=0.0.0.0 also publishes these callback ports on all host interfaces. Because the ports are fixed by the upstream clients, only one default Compose instance can run on a host at a time.

When working over SSH or from a remote browser, the browser's localhost may not reach GPT-Load — paste the full callback URL into the authorization dialog to finish the flow.

Screenshots

Groups — View channels, models, credential counts, and health in one place

Subscription accounts — Track account availability, quota windows, reset times, and runtime diagnostics

AccessKey read-only home — Sign in with an AccessKey to view only its own groups, models, requests, usage, and cost allowance

Usage and cost — Review request trends, cache hit rate, token categories, and cost estimates

Scope

Client protocols

Protocol Main entry
OpenAI Chat Completions POST /v1/chat/completions
OpenAI Responses /v1/responses and its resource paths
OpenAI Images POST /v1/images/...
OpenAI Embeddings POST /v1/embeddings
Rerank POST /v1/rerank
Anthropic Messages POST /v1/messages
Gemini /v1beta/models/...

Each channel declares exactly which protocols and capabilities it can execute. GPT-Load converts between su

readme truncated — read the full docs on github

Frequently asked questions

Is gpt-load free to use?

gpt-load is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does gpt-load do?

Self-hosted AI gateway for multi-channel, multi-credential setups — API keys and subscription accounts, scheduling, failover, request logs and usage. 自托管 AI 网关:

What is gpt-load written in?

gpt-load is primarily written in Go. Its source is publicly available at https://github.com/tbphp/gpt-load, and it has 6,821 GitHub stars.