Repolode
tbphp

tbphp/gpt-load

Self-hosted AI gateway that puts API keys and subscription accounts from many providers behind one endpoint, with scheduling, failover and usage logs.

Open-source alternative to:OpenRouter

Stars
7,150
Forks
812
Open issues
10
Last commit
12 hours ago

What is it?

GPT-Load is a self-hosted gateway that sits between your applications and upstream AI services. Applications only need one base URL and one AccessKey, while providers, accounts, credentials, models and routing policy are configured in an embedded management UI.

It accepts requests in the OpenAI, Anthropic and Gemini native protocols and forwards them to official APIs, cloud platforms, model services and compatible relays. API-key channels and subscription channels such as Codex, Claude, Antigravity and Grok share one credential management, scheduling and health-handling mechanism. Scheduling supports weights, retries, cooldown, blacklisting and session affinity.

The service records request logs, health status, token usage and cost estimates. It runs on SQLite by default and can use MySQL or PostgreSQL, and local credentials are encrypted at rest.

Key features

  • 01Single entry point with OpenAI, Anthropic and Gemini native interfaces.
  • 02Manages API-key and subscription credentials under one scheduling mechanism.
  • 03Weighted multi-credential scheduling with retries, cooldown and blacklisting.
  • 04Request logs, health views and usage and cost statistics in an embedded UI.
  • 05Runs on SQLite by default, with MySQL and PostgreSQL supported.

Use cases

  • Pooling several API keys for one provider to spread load and survive rate limits.
  • Giving a team one AccessKey per application with group and protocol restrictions.
  • Routing Claude Code or Codex traffic through a self-hosted gateway with usage tracking.
  • Switching between official APIs and compatible relays without changing application code.

Quick start

  1. 1

    Clone the repository

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

    Enter the project directory and copy the environment template

    cd gpt-load && cp .env.example .env
  3. 3

    Start the service with Docker Compose

    docker compose up -d
  4. 4

    Open http://127.0.0.1:3001, read the generated management key from the container, and sign in to the console

Things to know

  • Requires Docker and Docker Compose for the quickest setup.
  • Upgrading from 1.x is not in-place; 2.0 cannot open or migrate 1.x data.
  • Losing the encryption.key makes stored channel credentials unrecoverable, and master key rotation is not supported.

Topics

FAQ

What is gpt-load?
Self-hosted AI gateway that puts API keys and subscription accounts from many providers behind one endpoint, with scheduling, failover and usage logs. GPT-Load is a self-hosted gateway that sits between your applications and upstream AI services. Applications only need one base URL and one AccessKey, while providers, accounts, credentials, models and routing policy are configured in an embedded management UI.
Is gpt-load free to use? What license does it have?
gpt-load is open source under the MIT license. Check the license terms before using it in commercial products.
Is gpt-load still maintained?
Actively maintained. The last commit to gpt-load was on Oct 20, 2026.
What can I use gpt-load for?
Pooling several API keys for one provider to spread load and survive rate limits. Giving a team one AccessKey per application with group and protocol restrictions. Routing Claude Code or Codex traffic through a self-hosted gateway with usage tracking. Switching between official APIs and compatible relays without changing application code.
How do I install gpt-load?
Clone the repository: git clone --depth 1 https://github.com/tbphp/gpt-load.git Enter the project directory and copy the environment template: cd gpt-load && cp .env.example .env Start the service with Docker Compose: docker compose up -d Open http://127.0.0.1:3001, read the generated management key from the container, and sign in to the console
Where can I get gpt-load?
The source code and installation instructions are on GitHub: https://github.com/tbphp/gpt-load

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects