perplexityCertifiedReleased 02/19/2025

Sonar

Perplexity's lightweight offering with search grounding, quicker and cheaper than Sonar Pro.

View API reference ↓
Input / output priceFrom$0.25 / $2.50per 1M
24h uptime100.00%
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.inferencebureau.com/v1",
  apiKey: process.env.IB_API_KEY,
});

const res = await client.chat.completions.create({
  model: "perplexity/sonar",
  messages: [{ role: "user", content: "Why is the sky blue?" }],
});

console.log(res.choices[0].message.content);

Providers

Dispatch routes requests across these providers and fails over between them without changing the model. Restrict or order providers with team Directives. Prices are gateway list prices before the platform fee.

ProviderContextMax outputLatencyThroughputInputOutputCacheCapabilitiesZDRNo trainingRegionsStatus
perplexity127K8K2.4 s187 tps$0.25$2.50Read —Write $0.0634 featuresNoYesGlobalCertified

Uptime

24 hours

Request success rate per provider.

perplexity100.00%

Throughput

last hour

P50 output tokens per second.

perplexity187 tps

Latency

last hour

P50 time to first token.

perplexity2.4 s

Getting started

Create a key on the API Keys page and set it as IB_API_KEY. See the quickstart.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.inferencebureau.com/v1",
  apiKey: process.env.IB_API_KEY,
});

const res = await client.chat.completions.create({
  model: "perplexity/sonar",
  messages: [{ role: "user", content: "Why is the sky blue?" }],
});

console.log(res.choices[0].message.content);

Top-level parameters

Standard Chat Completions parameters work as documented. These have model-specific behavior.

ParameterTypeRequiredDescription
modelstringYesModel ID in the form creator/model, e.g. perplexity/sonar. Must be allowed by your team's Directives.
max_tokensnumberNoHard cap on generated tokens, and the basis for the balance reserved per request. Sonar supports up to 8,000 output tokens.
reasoning{ effort: 'low' | 'medium' | 'high' }NoReasoning effort, mapped to the provider's native configuration. Reasoning tokens count toward output usage.
Supportedmax_tokenstemperaturestopreasoninginclude_reasoningresponse_formatstructured_outputs

Input limits

InputSourcesLimits
Text—Prompt and response share the 127K-token context window
ImageURL, base64Sent as image_url content parts; counts as input tokens