progy
connecting
Self‑hosted·Source‑available·Your keys

Any agent. Any model. One gateway you run.

progy is a metered AI gateway you self-host in front of your own Anthropic, OpenAI, Gemini, Grok, and OpenAI-compatible keys. Point any agent at one base URL - progy meters tokens, tracks cost, and routes across providers.

Your keys.·Your infrastructure.·Your data.

Providers
Anthropic·OpenAI·Gemini·Grok·OpenAI‑compatible
Run it
Docker (compose up)·or Node 20+
License
SSPL‑1.0 (or commercial)

self-host progy on your own provider keys - clone, set your keys, docker compose up, point your agent at your instance. The status dot above tracks x.progy.ai - a live instance of this exact self-hosted stack.

# 1. clone and configure with YOUR provider keys
$ git clone https://github.com/whatl3y/progy && cd progy
$ cp .env.example .env   # set ANTHROPIC_API_KEY / OPENAI_API_KEY / …
# 2. bring up the stack (postgres + redis + proxy on :8080)
$ docker compose up -d
# 3. issue yourself a progy key (admin), then point your agent at it
$ export ANTHROPIC_BASE_URL=https://x.progy.ai
$ export ANTHROPIC_AUTH_TOKEN=progy_sk_…  # Bearer; bypasses Claude Code's OAuth picker
$ claude
# …prefer codex? add your instance as a provider, then run it
$ cat >> ~/.codex/config.toml <<'TOML'
model = "gpt-5-codex"
model_provider = "progy"
[model_providers.progy]
base_url = "https://x.progy.ai/v1"
wire_api = "responses"
env_key  = "PROGY_API_KEY"
TOML
$ codex

A gateway in front of your own provider keys

progy is a self-hosted reverse proxy you run on your own Anthropic, OpenAI, Gemini, Grok, and OpenAI‑compatible keys. Your agents talk to one base URL; progy injects your real provider key, meters every request to the token, and tracks cost in integer micro‑USDC. You operate the instance, so your keys, your traffic, and your data stay on infrastructure you control.

01

One base URL across every provider

Switch between Anthropic, OpenAI, Gemini, Grok, and OpenAI‑compatible endpoints from a single gateway - no rewiring agents or juggling SDKs.

02

See exactly what your agents cost

Per-request token metering and cost accounting in integer micro‑USDC - no float drift, full per-request usage history for your own spend.

03

Capped internal keys for your agents

Issue keys with their own balance ceiling for each agent, teammate, or CI job - a hard cap on spend and no shared provider account to expose. Revoke anytime.

04

Drop-in for Claude Code, Codex & scripts

Set one base URL and one token. Existing Anthropic / OpenAI SDKs and coding agents work unchanged against your instance.

05

Your keys, your infrastructure

progy holds your provider keys server-side and forwards traffic. By default it does not persist prompt or response bodies - only token counts and metadata.

06

Optional prepaid billing (advanced)

The metered card / USDC top-up path is in the tree but experimental. Charging third parties for access makes you a provider Customer with real obligations - read OPERATING.md before enabling it.

v1·self-hosted ai gateway·live example·github·terms·privacy