Self-hosted language model gateway with routing, API keys, budgets and an admin dashboard.
2.0K
Tokedex is a self-hosted gateway for language model APIs, built by Artificial Analysis. Connect OpenAI-compatible and Anthropic clients, manage provider credentials and API keys, and inspect usage, cost and traces in the included dashboard.
This image supports linux/amd64 and linux/arm64. Docker selects the architecture for your machine.
With Docker installed, start the gateway with one command. Replace the example master key with your own key of at least 32 characters.
docker run -d \
--name tokedex-gateway \
--restart unless-stopped \
-p 127.0.0.1:4000:4000 \
-e TOKEDEX_MASTER_KEY=example-master-key-replace-before-use \
-v tokedex-data:/home/node/.tokedex \
tokedex/gateway:0.1.1
Open the dashboardโ and sign in with the master key you passed to docker run. Save that key for subsequent starts.
For a reusable deployment configuration, follow the Docker Compose quickstartโ .
The gateway starts without provider credentials. Use the dashboard's Quick start to connect a provider, create an API key and make your first request. The API base URL is http://127.0.0.1:4000/v1. The included user manual is available at http://127.0.0.1:4000/docs/.
Check the container and its readiness endpoint.
docker ps --filter name=tokedex-gateway
docker logs --tail 30 tokedex-gateway
curl --fail http://127.0.0.1:4000/readyz
For access from other machines, configure HTTPS and the gateway's public URL. HTTPS and reverse proxiesโ
| Tag | Meaning |
|---|---|
0.1.1 | A specific published release |
next | The most recently published prerelease |
latest | The most recently published stable release, available after the first stable publication |
amd64-<version> / arm64-<version> | Architecture-specific images |
Use a specific version or image digest to choose exactly which release runs. Release tags follow the GitHub version with the leading v removed. Releasesโ
The tokedex-data volume stores gateway configuration, accounts, saved credentials and usage data. Keep the volume and your master key for subsequent starts.
docker stop tokedex-gateway
docker start tokedex-gateway
To upgrade, review the target release and back up your state, pull its image, then recreate the container with the same volume and master key. Changing TOKEDEX_MASTER_KEY changes the key used to sign in at the next start. For the volume backup and restore commands, choose Docker under Run with. Backup and restoreโ
The quick start uses embedded storage for one gateway. Shared Postgres and Redis backends and a Helm chart are available for larger deployments. Shared-state deploymentโ ยท Kubernetes installationโ
docker pull tokedex/gateway:latest