Metadata-Version: 2.4
Name: keyway-router
Version: 0.1.3
Summary: A lightweight self-hosted LLM routing gateway with OpenAI & Anthropic dual-protocol support
Author: Keyway Contributors
License: MIT
Project-URL: Homepage, https://github.com/DeconBear/keyway
Project-URL: Issues, https://github.com/DeconBear/keyway/issues
Keywords: llm,router,gateway,openai,anthropic,proxy,claude
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: Proxy Servers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.23.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: cryptography>=42.0.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: httpx>=0.27.0; extra == "dev"
Dynamic: license-file

# Keyway

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

[English](README.md) | [中文](README-zh.md)

---

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

```bash
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

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

### From source

```bash
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](tutorial/getting-started.md)
- **Multi-provider + Claude Code walkthrough**: see [Multi-Provider Setup](tutorial/multi-provider-setup.md)
- **Auto-select, adapter, fusion modes**: see [Multi-Mode Processing](tutorial/multi-mode-processing.md)
- **Full API reference**: see [API Reference](tutorial/api-reference.md)
- **Architecture & development**: see [Architecture](tutorial/architecture.md)

## License

MIT — see [LICENSE](LICENSE).
