A lightweight self-hosted LLM routing gateway with OpenAI & Anthropic dual-protocol support
Project description
Keyway
A lightweight self-hosted LLM routing gateway with OpenAI & Anthropic dual-protocol support.
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
- First-time setup (add providers, routes, keys): see Getting Started
- Multi-provider + Claude Code walkthrough: see Multi-Provider Setup
- Auto-select, adapter, fusion modes: see Multi-Mode Processing
- Full API reference: see API Reference
- Architecture & development: see Architecture
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keyway_router-0.1.3.tar.gz.
File metadata
- Download URL: keyway_router-0.1.3.tar.gz
- Upload date:
- Size: 62.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa67f321bc84922f5a94bf21bbd102791ed81d94ae6ab82f06a087c8f9f46739
|
|
| MD5 |
17b74d7762c3b88265c6c610b5749e51
|
|
| BLAKE2b-256 |
317b53f1e2286d40a32a055912f15459d9c53694dd97a792a7b323d6c2182f1f
|
File details
Details for the file keyway_router-0.1.3-py3-none-any.whl.
File metadata
- Download URL: keyway_router-0.1.3-py3-none-any.whl
- Upload date:
- Size: 59.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83a4a6160fa9748b6dd85c9bd3bee1fb0851c91bfd8a77adc4742707ee92525d
|
|
| MD5 |
5663f291f6d39d459b72203131fbd04a
|
|
| BLAKE2b-256 |
560cc8c30daf0e33916e47f7c44256f14a15bdf67573df3f15f1fa00f8558f2e
|