Reference
P

Sonar

Sonar, a language model from Perplexity.
modelOverride: { model: "sonar" }
Perplexity·Released January 2025
Pricing
Input
$1.00 / 1M
Output
$1.00 / 1M
Input
$1.00 / 1M
Output
$1.00 / 1M
Input
$1.00 / 1M
Output
$1.00 / 1M
Input
$1.00 / 1M
Output
$5.00 / 1M
Per generation
$0.012
Per generation
$0.0050
Per generation
$0.0080
Per generation
$0.012
Per generation
$0.0050
Per generation
$0.0080
Input
$0.20 / 1M
Output
$0.20 / 1M
Input
$0.20 / 1M
Output
$0.20 / 1M
Specifications
Context window
128,000 tokens
Max output
32,768 tokens
Aspect ratios
3
Released
January 2025
Parameters
Model options, passed in modelOverride.config.
ParameterTypeDefaultRange / options
return_citations
Determines whether or not a request to an online model should return citations.
Selectfalsefalsetrue
return_images
Determines whether or not a request to an online model should return images.
Selectfalsefalsetrue
search_context_size
Controls how much web information is retrieved. Higher context provides more comprehensive results but costs more per request.
Selectlowlowmediumhigh
Use this model
await mindstudio.generateText({
  message: "...",
  modelOverride: {
    model: "sonar",
    config: {
      return_citations: "false",
      return_images: "false",
    },
  },
});