Skip to main content

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

Desktop app (Windows)

pip install -e ".[dev]"
pip install -r keyway-desktop/requirements.txt
python keyway-desktop/main.py
# or: cd keyway-desktop && pyinstaller Keyway.spec  → dist/Keyway.exe

Data and secrets persist under %APPDATA%\Keyway. See keyway-desktop/README.md.

Logo / icon assets live in src/keyway/web/assets/ and keyway-desktop/keyway.ico. Regenerate with:

python scripts/generate_logo_assets.py

Next Steps

Docs site: https://deconbear.github.io/keyway/

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keyway_router-0.2.0.tar.gz (118.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keyway_router-0.2.0-py3-none-any.whl (105.4 kB view details)

Uploaded Python 3

File details

Details for the file keyway_router-0.2.0.tar.gz.

File metadata

  • Download URL: keyway_router-0.2.0.tar.gz
  • Upload date:
  • Size: 118.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for keyway_router-0.2.0.tar.gz
Algorithm Hash digest
SHA256 80dd0f25b50ae3999f38de72ea1f4e19e48e72772473b0bbba5ee849c9be5028
MD5 be9b814cfe0cdf8174c410129a8d654f
BLAKE2b-256 1b9099a59d899cf10fabb5ab99e19ead3f168fec5dd4bfe23ee8c5d7ec0e4d8e

See more details on using hashes here.

File details

Details for the file keyway_router-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: keyway_router-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 105.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for keyway_router-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7812fa2e14be26d163e7e5af01fad3da14f8ba75ac4cf5e90f153580e8b00a60
MD5 9d5b2b0c2bb58af471209fa8de00e39e
BLAKE2b-256 499e1549d35297dda35fc3c45fe1857aae6b6cd686a9ba42e32e9849f1419cff

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page