Quick setup
Open the kRouter dashboard at http://localhost:20128
Go to Providers → click Anthropic
Paste your API key, click Save
Test the connection
Use in your IDE
Point any OpenAI-compatible client at kRouter using your local API key.
# Endpoint
http://localhost:20128/v1
# API key (from Dashboard → API Keys)
sk-krouter-XXXX
# Model
anthropic/claude-opus-4-7How Anthropic billing works with kRouter
Anthropic is pay-per-token. You bring your own API key and kRouter routes to it, so you keep your own rate limits and billing relationship. kRouter authenticates it via apikey. 3 models are routable as anthropic/<model>.
Through kRouter, Anthropic serves chat and code completion and image understanding (OCR / vision-to-text). Requests reach it through the same local OpenAI-compatible endpoint as every other provider, so switching to or from Anthropic is a one-line model change in your client rather than a rewrite.
Anthropic models & pricing
Prices are USD per 1M tokens, cheapest first. kRouter bills nothing on top; this is the provider's own rate.
| Model | Route as | Input /1M | Output /1M |
|---|---|---|---|
| Claude Sonnet 4 | anthropic/claude-sonnet-4-20250514 | $3.00 | $15.00 |
| Claude 3.5 Sonnet | anthropic/claude-3-5-sonnet-20241022 | $3.00 | $15.00 |
| Claude Opus 4 | anthropic/claude-opus-4-20250514 | $15.00 | $25.00 |
Anthropic links
Anthropic FAQ
Is Anthropic free through kRouter?
Anthropic is pay-per-token: you bring your own API key and are billed by Anthropic at their rates. kRouter adds nothing on top and is free and MIT-licensed.
How do I use Anthropic with Claude Code or Cursor?
Connect Anthropic in the kRouter dashboard, then point your tool at kRouter's local endpoint (http://localhost:20128/v1) with a kRouter API key. Any OpenAI-compatible client works, and models are addressed as anthropic/<model>.
Which Anthropic models can kRouter route to?
3 models, including Claude Sonnet 4, Claude Opus 4, Claude 3.5 Sonnet. Every one is addressed as anthropic/<model> from any client.
What happens when Anthropic is rate limited?
kRouter detects the limit, parks that account until its real reset time, and fails over to your next connected account or provider — so the request still completes instead of erroring.