perplexity/sonar
127,072 context · $1.00/M input tokens · $1.00/M output tokens
Sonar is lightweight, affordable, fast, and simple to use — now featuring citations and the ability to customize sources. It is designed for companies seeking to integrate lightweight question-and-answer features...
Kullandıkça öde
Ön ödeme yok, yalnızca kullandığınız kadar ödeyin
API'mizle entegre etmek için aşağıdaki kod örneklerini kullanın:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://llm.wavespeed.ai/v1"
)
response = client.chat.completions.create(
model="perplexity/sonar",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)perplexity sonar
| Specification | Value |
|---|---|
| Provider | Perplexity |
| Model Type | Large Language Model (LLM) |
| Architecture | N/A |
| Context Window | 127072 tokens |
| Max Output | 4096 tokens |
| Input | Text |
| Output | Text |
| Vision | Supported |
| Function Calling | Supported |
| Token Type | Cost per Million Tokens |
|---|---|
| Input | $1.1 |
| Output | $1.1 |
Base URL: https://llm.wavespeed.ai/v1 API Endpoint: chat/completions Model ID: perplexity/sonar
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://llm.wavespeed.ai/v1"
)
response = client.chat.completions.create(
model="perplexity/sonar",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)
curl https://llm.wavespeed.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "perplexity/sonar",
"messages": [{"role": "user", "content": "Hello!"}]
}'
perplexity/sonar
Sonar is lightweight, affordable, fast, and simple to use — now featuring citations and the ability to customize sources. It is designed for companies seeking to integrate lightweight question-and-answer features...
Giriş
$1 /M
Çıkış
$1 /M
Bağlam
127K
Maks. Çıkış
4K
Vision
Destekleniyor
Birleşik API'miz aracılığıyla Sonar'e erişin — OpenAI uyumlu, soğuk başlatma yok, şeffaf fiyatlandırma.
WaveSpeedAI fiyatlandırması: milyon giriş tokenı başına $1.00 ve milyon çıkış tokenı başına $1.00. Prompt caching ve toplu işleme ayrı faturalanır ve uzun, tekrar eden yüklerde etkin maliyeti düşürür.
Sonar istek başına 127K bağlam tokenını ve 4K çıkış tokenını destekler.
Evet. WaveSpeedAI, Sonar modelini https://llm.wavespeed.ai/v1 adresindeki OpenAI uyumlu endpoint üzerinden sunar. Resmi OpenAI SDK'sını WaveSpeedAI API anahtarınızla bu base URL'ye yöneltin — başka kod değişikliği gerekmez.
WaveSpeedAI'a giriş yapın, Access Keys'te bir API anahtarı oluşturun, ardından yukarıda gösterilen model id ile https://llm.wavespeed.ai/v1/chat/completions adresine bir istek gönderin. Yeni hesaplar Sonar'i değerlendirmek için ücretsiz krediler alır.