TokenRoute
Get started
Back to models

Perplexity: Sonar

perplexity/sonar

Sonar is lightweight, affordable, fast, and simple to use — now featuring citations and the ability to customize sources. It is designed for companies seeking to integrate lightweight question-and-answer features...

Pricing

Input$0.7000 /M
Output$0.7000 /M
Web search$0.0035 /req

Specs

Context length127.1K tokens
Max output114.4K tokens
Inputtext, image
Outputtext

Quickstart

Point the OpenAI SDK at https://tokenroute.app/api/v1 and use a TokenRoute API key.

bash
curl https://tokenroute.app/api/v1/chat/completions \
  -H "Authorization: Bearer $TOKENROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "perplexity/sonar",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'

Supported parameters

frequency_penalty
max_tokens
presence_penalty
temperature
top_k
top_p
web_search_options
Perplexity: Sonar API, pricing and context length | TokenRoute