Skip to content

DeconBear/keyway

Repository files navigation

Keyway

A lightweight self-hosted LLM routing gateway with OpenAI & Anthropic dual-protocol support.

English | 中文


Keyway routes LLM requests from any OpenAI/Anthropic-compatible client (Claude Code, Cursor, OpenAI SDK, etc.) to multiple upstream providers — all through a single self-issued db_sk_ API key.

Quick Start

pip

pip install keyway-router

# Generate a secret and create .env
python -c "import secrets; print('KEYWAY_SECRET=' + secrets.token_urlsafe(48))" > .env
echo "KEYWAY_ADMIN_TOKEN=my-admin-token" >> .env

# Run
keyway
# → http://localhost:9233

Docker

cd docker
cp .env.example .env   # edit: set KEYWAY_SECRET and KEYWAY_ADMIN_TOKEN
docker compose up -d
# → http://localhost:9233

From source

git clone https://github.com/DeconBear/keyway.git
cd keyway
pip install -e ".[dev]"
cp .env.example .env   # edit: set KEYWAY_SECRET (required) and KEYWAY_ADMIN_TOKEN
python -m keyway

Next Steps

License

MIT — see LICENSE.

About

A lightweight self-hosted LLM routing gateway with OpenAI & Anthropic dual-protocol support

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors