> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kymaapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sonar

> Perplexity's live web-search model on Kyma — current, cited answers grounded in a real-time search of the web.

## Overview

`sonar` is Perplexity's live web-search model. Instead of answering from training data alone, it runs a real-time search of the web on every request and returns a current answer with citations. Reach for it when the answer depends on fresh information — news, prices, scores, releases, schedules, or docs that change after a model's training cutoff.

Sonar does its own searching internally. You send a question; it returns a grounded, cited answer. There is no tool-calling step for you to wire up — and no tool-calling support if you wanted one (see below).

## Specs

| Field              | Value                                                    |
| ------------------ | -------------------------------------------------------- |
| Model ID           | `sonar`                                                  |
| Best for           | Live web search, current events, research with citations |
| Context window     | 127K                                                     |
| Max output tokens  | 4K                                                       |
| Input modalities   | Text, image                                              |
| Output modalities  | Text                                                     |
| Tool calling       | No                                                       |
| Structured outputs | No                                                       |
| Prompt caching     | No                                                       |
| Speed              | Medium                                                   |
| Cost band          | Balanced                                                 |
| Release stage      | Stable                                                   |

## Pricing

Sonar bills two ways on the same request:

* **Tokens** — $1.35 / 1M input, $1.35 / 1M output, just like any chat model.
* **Web-search fee** — a flat **\$0.00675 per request**, on top of tokens, because every call performs a live search.

Short questions are dominated by the search fee, not the tokens. Every response's `usage.cost` already includes the search fee. See [Pricing → Web search](/pricing#web-search) for the full explanation.

## Use this when

* The answer depends on current information — news, prices, releases, schedules, live status.
* You want sources: Sonar returns citations alongside the answer.
* You want web grounding without building your own search + scrape + RAG pipeline.

## Pick something else when

* You need deeper, multi-step research or longer cited reports: use [`sonar-pro`](/models/sonar-pro).
* You need function calling / tools: Sonar has none — use [`kimi-k2.6`](/models/kimi-k2.6) or [`qwen-3.6-plus`](/models/qwen-3.6-plus).
* The task does not need fresh web data: a standard model is cheaper, with no per-request search fee.

## Example

```python theme={null}
from openai import OpenAI

client = OpenAI(base_url="https://kymaapi.com/v1", api_key="ky-...")

response = client.chat.completions.create(
    model="sonar",  # or the alias "search"
    messages=[{"role": "user", "content": "What shipped in the latest Bun release, and when?"}]
)

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

## Related aliases

| Alias    | Resolves to |
| -------- | ----------- |
| `search` | `sonar`     |
