Skip to main content
kRouter
All providers

Pay-per-token

anthropic/

Anthropic

Direct Anthropic API for Claude.

www.anthropic.com

Quick setup

  1. Open the kRouter dashboard at http://localhost:20128

  2. Go to Providers → click Anthropic

  3. Paste your API key, click Save

  4. Test the connection

Use in your IDE

Point any OpenAI-compatible client at kRouter using your local API key.

ide configbash
# Endpoint
http://localhost:20128/v1

# API key (from Dashboard → API Keys)
sk-krouter-XXXX

# Model
anthropic/claude-opus-4-7

How 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.

ModelRoute asInput /1MOutput /1M
Claude Sonnet 4anthropic/claude-sonnet-4-20250514$3.00$15.00
Claude 3.5 Sonnetanthropic/claude-3-5-sonnet-20241022$3.00$15.00
Claude Opus 4anthropic/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.