---
title: "Deploy GPT-Load"
description: "Self-hosted AI API proxy: pool and load-balance OpenAI, Gemini, Claude keys"
category: "AI/ML"
url: https://railway.com/deploy/gpt-load
---

# Deploy GPT-Load

Self-hosted AI API proxy: pool and load-balance OpenAI, Gemini, Claude keys

**[Deploy GPT-Load on Railway](https://railway.com/template/gpt-load)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/gpt-load/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### GPT-Load https://raw.githubusercontent.com/tbphp/gpt-load/v1.4.14/web/src/assets/logo.png

- **Source:** https://github.com/aalfath/gpt-load-railway-template
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host GPT-Load on Railway

GPT-Load is an open-source, self-hosted proxy for AI APIs, written in Go. It keeps pools of upstream API keys for OpenAI, Google Gemini and Anthropic Claude format services, rotates and load-balances them, takes failing keys out of rotation and retries them later, and logs every request. Clients call it with the provider's native API format.

## About Hosting GPT-Load

This template runs GPT-Load 1.4.14 as one service, built from a small GitHub repo that pins the official image by version and digest. Its SQLite database lives on a Railway volume at `/app/data`, so groups, keys, settings and request logs survive redeploys and updates. Railway generates the admin key (`AUTH_KEY`) and the key that encrypts stored API keys (`ENCRYPTION_KEY`) on each deploy, so there's no default password and nothing to fill in. The service gets a public HTTPS domain and a `/health` check. On first boot a start script saves the domain as GPT-Load's App URL, so the UI shows correct proxy endpoints.

## Common Use Cases

* Spread requests across many OpenAI, Gemini or Claude API keys to stay under per-key rate limits
* Give apps and teammates one stable endpoint and proxy keys instead of handing out provider keys
* Track request logs, failures and key health for all your AI API traffic in one dashboard

## Dependencies for GPT-Load Hosting

* One Railway volume for the SQLite database (mounted at `/app/data`)
* API keys from the AI providers you want to proxy (added in the web UI after the deploy)

### Deployment Dependencies

* [GPT-Load on GitHub](https://github.com/tbphp/gpt-load)
* [GPT-Load 1.4.14 release](https://github.com/tbphp/gpt-load/releases/tag/v1.4.14)
* [GPT-Load documentation](https://www.gpt-load.com/v1)
* [Template repo (Dockerfile and changelog)](https://github.com/aalfath/gpt-load-railway-template)

### Implementation Details

**First login.** Open the service's **Variables** tab, copy `AUTH_KEY`, open your domain and log in with it. Then create a group (for example `openai`, channel type OpenAI, upstream `https://api.openai.com`) and paste your API keys into it.

**Calling it.** Point a client at `https://YOUR-DOMAIN/proxy/openai/v1` (the path uses the group name) and authenticate with a proxy key. The global proxy key starts as `AUTH_KEY`; change it under **Settings**, or set group-level proxy keys, so the admin key isn't shared.

**Keep `ENCRYPTION_KEY`.** It encrypts the stored API keys. If you lose or change it without GPT-Load's migrate command, the stored keys can't be read.

**Optional settings**, not in the template: `DATABASE_DSN` (MySQL or PostgreSQL instead of SQLite), `REDIS_DSN` (needed to run several nodes), `MAX_CONCURRENT_REQUESTS`, CORS (`ENABLE_CORS`, `ALLOWED_ORIGINS`) and logging (`LOG_LEVEL`, `LOG_FORMAT`). Add them on the service if you need them.

**Updates.** The service builds from the template repo's `main` branch. When a new GPT-Load release is pinned there, Railway shows you an "update available" notice and you choose when to apply it. Read the repo's `CHANGELOG.md` first. This template follows GPT-Load's stable 1.x line; 2.0 is still a release candidate.

## Why Deploy GPT-Load on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying GPT-Load on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/gpt-load
