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

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.1.4.tar.gz (94.5 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.1.4-py3-none-any.whl (87.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for keyway_router-0.1.4.tar.gz
Algorithm Hash digest
SHA256 998551626125d85f312206cf359614722d4fb29fe9c3c9edf66ead9a4d149953
MD5 0ce09b42e96cad23eae6ecd5d8aa83ca
BLAKE2b-256 dc575ea5e1fb57797797bc2dd45586b5c454c54f1d3ede15563157c3dc4a5fa1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for keyway_router-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 98c23a6a58b6e1634a12c21fe2b32bf72751d964ad9d8f30f395db383569b183
MD5 123eb130f526ba2523a49bb4b30c6b21
BLAKE2b-256 5e5c763dac910cb6ecfeefa12ad2afec2b23e1614048bc43dc79f0441ef6fe69

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.4 This release

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