Perplexity Sonar
perplexity/sonarRun Perplexity Sonar in a hosted Python Task with web search and file inputs.
Perplexity AI's Sonar model via OpenRouter with native web search integration. Provides real-time information by searching the web and synthesizing current results into responses.
What Perplexity Sonar supports in qbash
- Web searchSearches the web while it answers.
- Document inputReads PDF, TEXT, DOC, XLS, RTF and 7 more files.
What is qbash?
qbash is where you build Tasks: Python programs that run a business process on managed infrastructure. Your code runs the steps and calls a model like Perplexity Sonar only at the ones that need judgment, with integrations, memory and files available in the same script.
A developer writes the Task once, and anyone on the team runs it from a form, on a schedule, from a webhook or from chat. Each Task is versioned and every run is logged.
Specifications
- Context window
- 128Ktokens
- Max output
- 8,192tokens
- Temperature
- 0 to 2default 1
Use Perplexity Sonar in a Python Task
qbash.ai.raw calls Perplexity Sonar from a Task and returns its reply as a string.
notes = qbash.inputs.get("notes")
summary = qbash.ai.raw(
f"Summarize these meeting notes in five bullets:\n\n{notes}",
model="perplexity/sonar",
system="You are a concise analyst.",
)
qbash.output({"summary": summary})
Use Perplexity Sonar with web search
Turn on Web Search in an inline prompt's model bar and Perplexity Sonar searches the web while it answers. Searches are billed at $5.00 per 1,000.
Perplexity Sonar pricing
| Input | $1.00 per 1M tokens |
|---|---|
| Output | $1.00 per 1M tokens |
| Web search | $5.00 per 1K searches |
Standard rates in USD.
Supported file formats
Documents
- TEXT
- DOC
- XLS
- RTF
- DOCX
- XLSX
- PPTX
- PPT
- ODT
- ODP
- ODS