Models / Perplexity
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...
Input
$1.3 / 1M tokens
Output
$1.3 / 1M tokens
Context
127K tokens
Capabilities
✓ Streaming○ Tool / function calling○ JSON / structured output✓ Vision (image input)
Call this model
Pass perplexity/sonar as the model. Change only the base URL from your existing OpenAI SDK setup.
quickstart.sh
curl https://modeldatabase.com/v1/chat/completions \
-H "Authorization: Bearer $MDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "perplexity/sonar",
"messages": [{"role":"user","content":"Hello!"}]
}'
Prices are final — the routing margin is already included. See the full pricing table or the API docs.