ArtificialAnalysis/Tokedex
AI EngineeringSelf-hosted gateway that unifies model APIs, routes requests by benchmark scores, and tracks token spend.
What it does
Tokedex is an open-source model router and token-management gateway from Artificial Analysis. It puts one endpoint in front of many model providers so agents and applications can send OpenAI Chat Completions, OpenAI Responses, or Anthropic Messages API requests to any supported model without changing client code. Built-in routers can pick a model from Artificial Analysis intelligence, speed, and cost benchmarks, for example choosing the cheapest model that scores above a threshold on the Intelligence Index. The gateway also records request traces locally, applies budgets and API-key scopes, supports SSO and workspaces, and adds retries with fallback models. It targets teams running agents or applications across several providers that need usage visibility and cost control.
Quick start
Clone the repository, then start the gateway with Docker Compose (recommended) or npm:
git clone https://github.com/ArtificialAnalysis/Tokedex.git
cd Tokedex
docker compose up --no-build
# or
npm install
npm start
The gateway prints its master key in the logs. Open http://127.0.0.1:4000, sign in with that key, and follow the Home page quick start to add a provider and send a request. The full gateway quickstart covers configuration details.
To connect a coding agent, open Home, choose the agent under "Connect your coding agent", create an API key and add the copied line to your shell profile, then choose a model and paste the setup prompt into the agent. Coding-agent setup covers Claude Code, Codex, Cursor, and others.
SDKs and direct calls
The official SDKs are published as @tokedex/sdk (npm), tokedex (PyPI), and tokedex (crates.io). The SDK can call providers directly by reading keys such as ANTHROPIC_API_KEY from the environment, or route the same call through your gateway by setting baseUrl and an API key:
import { Router } from '@tokedex/sdk';
const router = new Router({ baseUrl: 'http://127.0.0.1:4000', apiKey: process.env['TOKEDEX_API_KEY']! });
const message = await router.messages.create({
model: 'anthropic/claude-haiku-5.5',
messages: [{ role: 'user', content: 'Reply with exactly the word "hello".' }],
});
The README notes that direct calls can incur provider charges.
Constraints
- Requests are forwarded to third-party model providers, so provider API keys and terms apply, and usage is billed by those providers.
- The local npm route requires Node.js and package installation; Docker Compose is the documented recommended path. Production deployment guidance covers Kubernetes.
- The project does not accept outside pull requests; bugs and feature requests go through GitHub issues, and security reports follow the private process in SECURITY.md.
- Licensed MIT.
HotRepo's take
Tokedex entered HotRepo's new-project list on 2026-12-05 with 9 stars gained over a roughly 1.5-hour observation window and sits at 122 stars and 5 forks, with no recorded GitHub daily rank. The repository is young (created 2026-12-02), so those figures describe early attention rather than adoption. What makes it worth a look is the combination: a MIT-licensed self-hosted gateway plus Python, TypeScript, and Rust SDKs from a team already known for model benchmarking. Teams that need multi-provider routing, budgets, and local trace inspection can start with the Docker path and judge the fit against their provider mix.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- experientiallabs/experientialA self-hostable gateway that routes agent traffic across providers, then turns collected traces into custom routers or models.
- do-whilefor/zcode2apiSelf-hosted gateway that reshapes ZCode free-account access into OpenAI- and Anthropic-compatible APIs.
- weave-os/routerA self-hostable proxy that routes each LLM API request to a suitable model across Anthropic, OpenAI and Gemini.
- nwverse/personaSelf-hosted hub that routes chat requests to coding agents across your devices with an extension system.
- aimod-cc/Agent2APISelf-hosted AI routing gateway that unifies model APIs and manages local agent client connections.