Perplexity: Sonar
Sonar is lightweight, affordable, fast, and simple to use — now featuring citations and the ability to customize sources.
- Input
- 362,096 Toman/M tokens
- Output
- 362,096 Toman/M tokens
- Context
- 127K
- Max output
- 114K
- Published
- Jan 27, 2025
- Maker
- Perplexity
Free plan prices, in Toman at today's rate. Plans and prices
Price by plan
Toman per million tokens at today's rate. A plan lowers the price of your usage up to a limit each period.
| Plan | Input | Output |
|---|---|---|
| Free | 362,096 | 362,096 |
| Pro | 347,256 | 347,256 |
| Max | 332,416 | 332,416 |
Search fee
This model searches the web for every request. Besides the tokens, each request is charged the search fee below, per plan, in Toman at today's rate.
| Plan | Per request |
|---|---|
| Free | 1,802 |
| Pro | 1,728 |
| Max | 1,654 |
Capabilities
- Text
- Vision
What it takes and gives
Accepts
- Text
- Image
Creates
- Text
Every input listed here works through the API and the playground: images and PDFs as data URLs or https links, audio as base64, video as a data URL or a link the model supports.
Call it
Pass perplexity/sonar as the model name, or let router/auto choose for you.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://ai.fluxcdn.cloud/api/v1",
api_key=os.environ["FLUXCDN_API_KEY"],
)
resp = client.chat.completions.create(
model="router/auto",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
