Perplexity logo
Perplexity

Sonar Pro

Perplexity high-performance online search model with enhanced reasoning capabilities

Category Text Model ID sonar-pro
Model TypeHigh-Performance Search Model
Key FeatureAdvanced Reasoning + Real-time Search
Search Query$0.005/query

Pricing & Specs

💰 Pricing

Input$3 / M tokens
Output$15 / M tokens

⚙️ Specs

Model TypeHigh-Performance Search Model
Key FeatureAdvanced Reasoning + Real-time Search
Search Query$0.005/query
Data SourceReal-time Internet Data

API Examples

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.xairouter.com/v1",
    api_key="your-api-key"
)

response = client.chat.completions.create(
    model="sonar-pro",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

cURL

curl https://api.xairouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "sonar-pro",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'