Skip to main content

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.

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.

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

keyway_router-0.1.3.tar.gz (62.6 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.3-py3-none-any.whl (59.9 kB view details)

Uploaded Python 3

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

Hashes for keyway_router-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fa67f321bc84922f5a94bf21bbd102791ed81d94ae6ab82f06a087c8f9f46739
MD5 17b74d7762c3b88265c6c610b5749e51
BLAKE2b-256 317b53f1e2286d40a32a055912f15459d9c53694dd97a792a7b323d6c2182f1f

See more details on using hashes here.

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

Hashes for keyway_router-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83a4a6160fa9748b6dd85c9bd3bee1fb0851c91bfd8a77adc4742707ee92525d
MD5 5663f291f6d39d459b72203131fbd04a
BLAKE2b-256 560cc8c30daf0e33916e47f7c44256f14a15bdf67573df3f15f1fa00f8558f2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page