Skip to main content
kRouter

Getting Started

Install kRouter, connect your first provider, and point your IDE at it — all in under 5 minutes.


kRouter is a self-hosted, MIT-licensed local proxy that routes AI coding traffic between 60+ providers through one OpenAI-compatible endpoint. This guide takes you from zero to "your IDE is now talking to a free Claude model" in three steps.

1. Install

npm install -g @sifxprime/krouter
krouter -t

The -t flag runs the tray app in the background. Your dashboard will open automatically at http://localhost:20128/dashboard.

Prefer Docker?

docker run -d -p 20128:20128 -v "$HOME/.krouter:/app/data" --name krouter sifxprime/krouter:latest

2. Connect a provider

Pick a free provider for the quickest first-run:

  • Kiro AI — free Claude 4.5, GLM-5, MiniMax — sign in with AWS Builder ID, Google, or GitHub
  • OpenCode Free — no auth at all, just click Connect
  • Vertex AI — $300 free credits if you have a fresh Google Cloud account

In the dashboard:

  1. Open Providers
  2. Click the tile
  3. Complete the sign-in flow (or just click Connect for OpenCode)
  4. Hit Test connection

3. Point your IDE at kRouter

Generate one local API key in Dashboard → API Keys, then plug it into your tool.

Cursor:

Settings → Models → Advanced
OpenAI API Base URL:  http://localhost:20128/v1
OpenAI API Key:       sk-krouter-XXXX
Model:                kr/claude-sonnet-4.5

Claude Code (~/.claude/config.json):

{
  "anthropic_api_base": "http://localhost:20128/v1",
  "anthropic_api_key": "sk-krouter-XXXX"
}

Codex CLI:

export OPENAI_BASE_URL=http://localhost:20128
export OPENAI_API_KEY=sk-krouter-XXXX
codex "your prompt"

That's it. Your IDE is now routing through kRouter. Open the Usage dashboard to watch tokens flow.

Next steps