Skip to content

Commit 43a45c6

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-312: docs: add perplexity/sonar-pro
1 parent 5e5a336 commit 43a45c6

7 files changed

Lines changed: 79 additions & 13 deletions

File tree

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ If you've already made your choice and know the model ID, use the [Search panel]
117117

118118
<mark style="background-color:green;">**OpenAI**</mark>: [Text/Chat](api-references/text-models-llm/OpenAI/) [Image](api-references/image-models/OpenAI/) [Speech-To-Text](api-references/speech-voice-models/stt/OpenAI/) [Embedding](api-references/embedding-models/OpenAI/)&#x20;
119119

120+
**Perplexity**: [Text/Chat](api-references/text-models-llm/perplexity/)
121+
120122
**RecraftAI**: [Image](api-references/image-models/RecraftAI/)
121123

122124
**Runway**: [Video](api-references/video-models/runway/)

docs/api-references/model-database.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/api-references/text-models-llm/README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/api-references/text-models-llm/perplexity/sonar-pro.md

Lines changed: 70 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
hidden: true
3-
noIndex: true
4-
---
5-
61
# sonar-pro
72

83
{% hint style="info" %}
@@ -11,7 +6,7 @@ This documentation is valid for the following list of our models: `perplexity/
116

127
## Model Overview
138

14-
A model built on top of Llama 3.3 70B and optimized for Perplexity search. Pro version&#x20;
9+
Pro version is built for real-time, web-connected research and complex queries. Handles multi-step, deeper reasoning tasks. Retrieves and synthesizes multiple web searches, yielding more detailed answers. Delivers 2× more citations than standard [Sonar](sonar.md) for enhanced traceability.
1510

1611
## How to Make a Call
1712

@@ -49,8 +44,8 @@ If you need a more detailed walkthrough for setting up your development environm
4944

5045
## API Schema
5146

52-
{% openapi-operation spec="sonar" path="/v1/chat/completions" method="post" %}
53-
[OpenAPI sonar](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/Perplexity/sonar.json)
47+
{% openapi-operation spec="sonar-pro" path="/v1/chat/completions" method="post" %}
48+
[OpenAPI sonar-pro](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/Perplexity/sonar-pro.json)
5449
{% endopenapi-operation %}
5550

5651
## Code Example
@@ -72,7 +67,7 @@ response = requests.post(
7267
"Content-Type":"application/json"
7368
},
7469
json={
75-
"model":"perplexity/sonar",
70+
"model":"perplexity/sonar-pro",
7671
"messages":[
7772
{
7873
"role":"user",
@@ -103,7 +98,7 @@ async function main() {
10398
'Content-Type': 'application/json',
10499
},
105100
body: JSON.stringify({
106-
model: 'perplexity/sonar',
101+
model: 'perplexity/sonar-pro',
107102
messages:[
108103
{
109104
role:'user',
@@ -139,6 +134,71 @@ main();
139134

140135
{% code overflow="wrap" %}
141136
```json5
137+
{
138+
"id": "14884548-2103-493c-a69d-7585f36f1c80",
139+
"object": "chat.completion",
140+
"choices": [
141+
{
142+
"index": 0,
143+
"finish_reason": "stop",
144+
"message": {
145+
"role": "assistant",
146+
"content": "**Hello** is primarily an English salutation or greeting, first recorded in written form in 1826[1]. It is commonly used to initiate conversation or acknowledge someone's presence.\n\nThe term has notable cultural associations:\n- Students often use \"Hello, World!\" as the first output when learning programming languages—a tradition established by its inclusion in influential programming textbooks[1].\n- \"Hello\" is also the title of notable songs, including Adele’s chart-topping 2015 single and Lionel Richie’s 1984 hit[2][3][4].\n\nAlternative cultural greetings include \"Aloha,\" \"Ciao,\" and \"Namaste,\" among others[1]."
147+
},
148+
"delta": {
149+
"role": "assistant",
150+
"content": ""
151+
}
152+
}
153+
],
154+
"created": 1753467346,
155+
"model": "sonar-pro",
156+
"usage": {
157+
"prompt_tokens": 12606,
158+
"completion_tokens": 4221,
159+
"total_tokens": 16827,
160+
"search_context_size": "low"
161+
},
162+
"citations": [
163+
"https://en.wikipedia.org/wiki/Hello",
164+
"https://www.youtube.com/watch?v=YQHsXMglC9A",
165+
"https://en.wikipedia.org/wiki/Hello_(Adele_song)",
166+
"https://www.youtube.com/watch?v=mHONNcZbwDY",
167+
"https://www.hello-products.com"
168+
],
169+
"search_results": [
170+
{
171+
"title": "Hello - Wikipedia",
172+
"url": "https://en.wikipedia.org/wiki/Hello",
173+
"date": "2002-06-09",
174+
"last_updated": "2025-07-23"
175+
},
176+
{
177+
"title": "Adele - Hello (Official Music Video) - YouTube",
178+
"url": "https://www.youtube.com/watch?v=YQHsXMglC9A",
179+
"date": "2015-10-22",
180+
"last_updated": "2025-07-07"
181+
},
182+
{
183+
"title": "Hello (Adele song) - Wikipedia",
184+
"url": "https://en.wikipedia.org/wiki/Hello_(Adele_song)",
185+
"date": "2015-10-22",
186+
"last_updated": "2025-06-13"
187+
},
188+
{
189+
"title": "Lionel Richie - Hello (Official Music Video) - YouTube",
190+
"url": "https://www.youtube.com/watch?v=mHONNcZbwDY",
191+
"date": "2020-11-20",
192+
"last_updated": "2025-07-07"
193+
},
194+
{
195+
"title": "Hello Products",
196+
"url": "https://www.hello-products.com",
197+
"date": "2025-06-04",
198+
"last_updated": "2025-06-16"
199+
}
200+
]
201+
}
142202
```
143203
{% endcode %}
144204

docs/api-references/text-models-llm/perplexity/sonar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This documentation is valid for the following list of our models: `perplexity/
66

77
## Model Overview
88

9-
A model built on top of Llama 3.3 70B and optimized for Perplexity search.
9+
A model built on top of Llama 3.3 70B and optimized for Perplexity search. Fast, cost-effective, everyday search and Q\&A. Ideal for simple queries, topic summaries, and fact-checking.
1010

1111
## How to Make a Call
1212

docs/capabilities/image-to-text-vision.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,5 @@ print(response.json())
8181
* [openai/o4-mini-2025-04-16](../api-references/text-models-llm/openai/o4-mini.md)
8282
* [openai/o3-2025-04-16](../api-references/text-models-llm/openai/o3.md)
8383
* [o1](../api-references/text-models-llm/OpenAI/o1.md)
84+
* [perplexity/sonar](../api-references/text-models-llm/perplexity/sonar.md)
85+
* [perplexity/sonar-pro](../api-references/text-models-llm/perplexity/sonar-pro.md)

docs/capabilities/web-search.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ This capability of text chat models allows them to send search queries to the we
99
* [gpt-4o-search-preview](../api-references/text-models-llm/openai/gpt-4o-search-preview.md)
1010
* [gpt-4o-mini-search-preview](../api-references/text-models-llm/openai/gpt-4o-mini-search-preview.md)
1111
* [moonshot/kimi-k2-preview](../api-references/text-models-llm/moonshot/kimi-k2-preview.md)
12+
* [perplexity/sonar](../api-references/text-models-llm/perplexity/sonar.md)
13+
* [perplexity/sonar-pro](../api-references/text-models-llm/perplexity/sonar-pro.md)
1214

1315
## Solutions That Support Web Search
1416

0 commit comments

Comments
 (0)