Skip to main content
kRouter
All providers

Pay-per-token

pplx/

Perplexity

Sonar online + offline search-augmented chat.

perplexity.ai

Quick setup

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

  2. Go to Providers → click Perplexity

  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
perplexity/sonar

How Perplexity billing works with kRouter

Perplexity 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. 2 models are routable as perplexity/<model>.

Through kRouter, Perplexity serves chat and code completion and web search, exposed on /v1/search so an agent can look things up mid-conversation. Requests reach it through the same local OpenAI-compatible endpoint as every other provider, so switching to or from Perplexity is a one-line model change in your client rather than a rewrite.

Perplexity models & pricing

These are the model ids kRouter routes to. This provider does not publish per-token rates.

ModelRoute as
Sonar Properplexity/sonar-pro
Sonarperplexity/sonar

Perplexity links

Perplexity FAQ

Is Perplexity free through kRouter?

Perplexity is pay-per-token: you bring your own API key and are billed by Perplexity at their rates. kRouter adds nothing on top and is free and MIT-licensed.

How do I use Perplexity with Claude Code or Cursor?

Connect Perplexity 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 perplexity/<model>.

Which Perplexity models can kRouter route to?

2 models, including Sonar Pro, Sonar. Every one is addressed as perplexity/<model> from any client.

What happens when Perplexity 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.