Seedance 2.0 | Special Offer ✦ 10% OFF NOW | Ends May 13 (UTC+0)
P
perplexity/sonar

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...

Цены

Оплата по факту использования

Никаких авансовых платежей — платите только за то, чем пользуетесь

Ввод$1.00 / M Tokens
Вывод$1.00 / M Tokens

Использование API

Используйте следующие примеры кода для интеграции с нашим API:

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

perplexity sonar


Why It Looks Great

  • Large Language Model architecture for efficient processing
  • 127072 context window for long document handling
  • Competitive pricing at $1.1/$1.1 per million tokens

Key Features

  • Context Window: 127072 tokens
  • Max Output: 4096 tokens
  • Vision: Supported
  • Function Calling: Supported

Specifications

SpecificationValue
ProviderPerplexity
Model TypeLarge Language Model (LLM)
ArchitectureN/A
Context Window127072 tokens
Max Output4096 tokens
InputText
OutputText
VisionSupported
Function CallingSupported

Pricing

Token TypeCost per Million Tokens
Input$1.1
Output$1.1

How to Use

  1. Write your prompt — describe the task, provide context, and specify desired output format.
  2. Submit — the model processes your request and returns the response.

API Integration

Base URL: https://llm.wavespeed.ai/v1 API Endpoint: chat/completions Model ID: perplexity/sonar


API Usage

Python SDK

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

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!"}]
  }'

Notes

  • Model: perplexity/sonar
  • Provider: Perplexity

Информация

Провайдерperplexity
Типllm

Поддерживаемые возможности

Ввод
ТекстИзображение
Вывод
Текст
Контекст127,072
Макс. вывод4,096
Vision✓ Поддерживается
Function Calling-

Руководство по доступу к API

Base URLhttps://llm.wavespeed.ai/v1
API Endpointchat/completions
ID моделиperplexity/sonar

Sonar API

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...

Ввод

$1 /M

Вывод

$1 /M

Контекст

127K

Макс. вывод

4K

Vision

Поддерживается

Попробуйте Sonar на WaveSpeedAI

Доступ к Sonar через наш единый API — совместимость с OpenAI, без холодных стартов, прозрачные цены.

Часто задаваемые вопросы о Sonar

Сколько стоит Sonar через API?+

Цены на WaveSpeedAI: $1.00 за миллион входных токенов и $1.00 за миллион выходных токенов. Prompt caching и batch processing тарифицируются отдельно и снижают эффективную стоимость длинных повторяющихся нагрузок.

Каково контекстное окно Sonar?+

Sonar поддерживает до 127K токенов контекста и до 4K токенов вывода на запрос.

Совместим ли Sonar с OpenAI?+

Да. WaveSpeedAI предоставляет Sonar через OpenAI-совместимый endpoint по адресу https://llm.wavespeed.ai/v1. Направьте официальный OpenAI SDK на этот base URL с ключом API WaveSpeedAI — других изменений в коде не требуется.

Как начать работу с Sonar?+

Войдите в WaveSpeedAI, создайте API-ключ в Access Keys и отправьте запрос на https://llm.wavespeed.ai/v1/chat/completions с указанным выше model id. Новые аккаунты получают бесплатные кредиты для оценки Sonar.

Связанные LLM API