# General

**URL:** https://community.perplexity.ai/c/general/4.md?page=3

[Latest](https://community.perplexity.ai/latest.md) · [Categories](https://community.perplexity.ai/categories.md) · [Tags](https://community.perplexity.ai/tags.md)

**Page:** 4

---

## [Privacy / No trace of Search API?](https://community.perplexity.ai/t/privacy-no-trace-of-search-api/1719)

<div class="topic-metadata">

**Author:** [@zmazz](https://community.perplexity.ai/u/zmazz)\
**Replies:** 0\
**Last updated:** [October 1, 2025, 12:32pm UTC](https://community.perplexity.ai/t/privacy-no-trace-of-search-api/1719 "2025-10-01T12:32:22Z")

</div>

Hello, I am working with clients who are very privacy sensitive - they work either on-prem or inside a VPC, and we previously implemented internet access for RAG agents through a well seggregated architecture for the in…

---

## [Python Script for Perplexity API: Interactive Search Client with Streaming & History Support](https://community.perplexity.ai/t/python-script-for-perplexity-api-interactive-search-client-with-streaming-history-support/1693)

<div class="topic-metadata">

**Author:** [@Brembo](https://community.perplexity.ai/u/Brembo)\
**Replies:** 0\
**Last updated:** [September 30, 2025, 1:33pm UTC](https://community.perplexity.ai/t/python-script-for-perplexity-api-interactive-search-client-with-streaming-history-support/1693 "2025-09-30T13:33:32Z")

</div>

import os import requests import time import json class PerplexityAPI: def \_\_init\_\_(self, api\_key, model="sonar"): self.api\_key = api\_key self.model = model self.api\_url = "https://api.perple…

---

## [How to attach a file to api request from python? haven't found a toy example of that](https://community.perplexity.ai/t/how-to-attach-a-file-to-api-request-from-python-havent-found-a-toy-example-of-that/71)

<div class="topic-metadata">

**Author:** [@vikvang](https://community.perplexity.ai/u/vikvang)\
**Replies:** 3\
**Last updated:** [September 29, 2025, 2:54pm UTC](https://community.perplexity.ai/t/how-to-attach-a-file-to-api-request-from-python-havent-found-a-toy-example-of-that/71 "2025-09-29T14:54:00Z")

</div>

I’m just trying to use the API to make a simple requests including a prompt and an attached file from python but I haven’t found a toy example of how to do that with a Pro account.

---

## [Large snippets legality](https://community.perplexity.ai/t/large-snippets-legality/1676)

<div class="topic-metadata">

**Author:** [@Alex\_Kirilov](https://community.perplexity.ai/u/Alex_Kirilov)\
**Replies:** 0\
**Last updated:** [September 29, 2025, 10:46am UTC](https://community.perplexity.ai/t/large-snippets-legality/1676 "2025-09-29T10:46:31Z")

</div>

Hi, community Our legal team raised concerns about the legality of using Perplexity web Search API as sometimes it retrieves almost whole page as “snippet” but it covers full content of the page. We are building a trend…

---

## [Web sources: list potential targeted sources](https://community.perplexity.ai/t/web-sources-list-potential-targeted-sources/1666)

<div class="topic-metadata">

**Author:** [@lglassop](https://community.perplexity.ai/u/lglassop)\
**Replies:** 0\
**Last updated:** [September 29, 2025, 2:14am UTC](https://community.perplexity.ai/t/web-sources-list-potential-targeted-sources/1666 "2025-09-29T02:14:15Z")

</div>

I’d like to be able to offer my users a list of potential web sources to target their web search; e.g., magazine articles, news articles, government reports, and so on. How could I achieve that?

---

## [I need an api key please](https://community.perplexity.ai/t/i-need-an-api-key-please/1540)

<div class="topic-metadata">

**Author:** [@Isidore\_AGONAN](https://community.perplexity.ai/u/Isidore_AGONAN)\
**Replies:** 2\
**Last updated:** [September 26, 2025, 1:10pm UTC](https://community.perplexity.ai/t/i-need-an-api-key-please/1540 "2025-09-26T13:10:06Z")

</div>

I need an api key please

---

## [Sonar python api code](https://community.perplexity.ai/t/sonar-python-api-code/1531)

<div class="topic-metadata">

**Author:** [@Brembo](https://community.perplexity.ai/u/Brembo)\
**Replies:** 0\
**Last updated:** [September 23, 2025, 3:54am UTC](https://community.perplexity.ai/t/sonar-python-api-code/1531 "2025-09-23T03:54:40Z")

</div>

import requests import time import sys import threading def query\_perplexity\_sonar(api\_key, query, model="sonar"): """ Function to send a query to the Perplexity Sonar API. - api\_key: Your API key - quer…

---

## [Audio file returned as a textual summary](https://community.perplexity.ai/t/audio-file-returned-as-a-textual-summary/1523)

<div class="topic-metadata">

**Author:** [@Yazherot](https://community.perplexity.ai/u/Yazherot)\
**Replies:** 0\
**Last updated:** [September 22, 2025, 3:05pm UTC](https://community.perplexity.ai/t/audio-file-returned-as-a-textual-summary/1523 "2025-09-22T15:05:37Z")

</div>

Hello everyone! I’m new to this API and I haven’t yet found the answer to my questions in the documentation. I’m working on a project where I need to send an audio file to the API and have it return a summary of the co…

---

## [Parameter set up](https://community.perplexity.ai/t/parameter-set-up/1518)

<div class="topic-metadata">

**Author:** [@Khang\_Nguy\_n](https://community.perplexity.ai/u/Khang_Nguy_n)\
**Replies:** 0\
**Last updated:** [September 22, 2025, 1:16pm UTC](https://community.perplexity.ai/t/parameter-set-up/1518 "2025-09-22T13:16:59Z")

</div>

Hi everyone, This is my first time using the API to call large language models. I am quite confused about setting parameters. In the OpenAI documentation, there are parameters like temperature, top\_k, … to control the m…

---

## [Use Perplexity for SQL Apps](https://community.perplexity.ai/t/use-perplexity-for-sql-apps/1442)

<div class="topic-metadata">

**Author:** [@Naveen\_Ganpat](https://community.perplexity.ai/u/Naveen_Ganpat)\
**Replies:** 0\
**Last updated:** [September 14, 2025, 9:27pm UTC](https://community.perplexity.ai/t/use-perplexity-for-sql-apps/1442 "2025-09-14T21:27:10Z")

</div>

Hi, I am doing a course on Deeplearning.ai: Building Your Own Database Agent - DeepLearning.AI My goal is to make an SQL app using the perplexity app. However, when converting the code that is provided in the course ma…

---

## [Hi,   I am trying to access Sonar pro model using liteLLM but it’s showing connection error. Please help.](https://community.perplexity.ai/t/hi-i-am-trying-to-access-sonar-pro-model-using-litellm-but-it-s-showing-connection-error-please-help/1425)

<div class="topic-metadata">

**Author:** [@perplexitygenai](https://community.perplexity.ai/u/perplexitygenai)\
**Replies:** 0\
**Last updated:** [September 12, 2025, 9:13pm UTC](https://community.perplexity.ai/t/hi-i-am-trying-to-access-sonar-pro-model-using-litellm-but-it-s-showing-connection-error-please-help/1425 "2025-09-12T21:13:40Z")

</div>

---

## [How to get total API cost?](https://community.perplexity.ai/t/how-to-get-total-api-cost/1275)

<div class="topic-metadata">

**Author:** [@slooowshutter](https://community.perplexity.ai/u/slooowshutter)\
**Replies:** 1\
**Last updated:** [September 3, 2025, 2:34am UTC](https://community.perplexity.ai/t/how-to-get-total-api-cost/1275 "2025-09-03T02:34:42Z")

</div>

I saw this post was mentioning that the API is now returning the full cost of the request but I can’t manage to see it. I have been using the AI SDK and do get some usage like input and output token but no cost, total\_to…

---

## [PDF Upload with Sonar API Questions](https://community.perplexity.ai/t/pdf-upload-with-sonar-api-questions/1255)

<div class="topic-metadata">

**Author:** [@JSK](https://community.perplexity.ai/u/JSK)\
**Replies:** 0\
**Last updated:** [August 29, 2025, 11:36pm UTC](https://community.perplexity.ai/t/pdf-upload-with-sonar-api-questions/1255 "2025-08-29T23:36:48Z")

</div>

My questions relate to the functionality mentioned here: The public URL requirement is unusual. On the above documentation page, a password protected PDF is mentioned, which makes sense given it would be on a public s…

---

## [Deep Research Prompting - System Prompt?](https://community.perplexity.ai/t/deep-research-prompting-system-prompt/1229)

<div class="topic-metadata">

**Author:** [@austinScouts](https://community.perplexity.ai/u/austinScouts)\
**Replies:** 1\
**Last updated:** [August 27, 2025, 1:17pm UTC](https://community.perplexity.ai/t/deep-research-prompting-system-prompt/1229 "2025-08-27T13:17:09Z")

</div>

Does sonar-deep-research only use the user prompt for queries? I’ve tried to use the system prompt to adjust tone/structure but it doesn’t seem to change anything. If not, what is the best practice for the user query? Is…

---

## [It would help users find their previous searches in the library to provide a visible date for every search](https://community.perplexity.ai/t/it-would-help-users-find-their-previous-searches-in-the-library-to-provide-a-visible-date-for-every-search/1207)

<div class="topic-metadata">

**Author:** [@Jagger](https://community.perplexity.ai/u/Jagger)\
**Replies:** 0\
**Last updated:** [August 25, 2025, 7:56pm UTC](https://community.perplexity.ai/t/it-would-help-users-find-their-previous-searches-in-the-library-to-provide-a-visible-date-for-every-search/1207 "2025-08-25T19:56:26Z")

</div>

Finding previous searches within our library would be greatly helped by a date for each search

---

## [Perplexity api citations/sources like UI for "selected", "reviewed" and "more results"](https://community.perplexity.ai/t/perplexity-api-citations-sources-like-ui-for-selected-reviewed-and-more-results/1169)

<div class="topic-metadata">

**Author:** [@Hussain\_Zaidi](https://community.perplexity.ai/u/Hussain_Zaidi)\
**Replies:** 0\
**Last updated:** [August 23, 2025, 6:42am UTC](https://community.perplexity.ai/t/perplexity-api-citations-sources-like-ui-for-selected-reviewed-and-more-results/1169 "2025-08-23T06:42:04Z")

</div>

Is there any way Perplexity API outputs citations/sources like it does in UI: broken down into 3 sections “selected”, “reviewed” and “more results”. We have a perfect use case to build on top of this distinction, and it…

---

## [Possible to return more than 5 sources in Perplexity API?](https://community.perplexity.ai/t/possible-to-return-more-than-5-sources-in-perplexity-api/680)

<div class="topic-metadata">

**Author:** [@supersimon](https://community.perplexity.ai/u/supersimon)\
**Replies:** 1\
**Last updated:** [August 7, 2025, 3:06am UTC](https://community.perplexity.ai/t/possible-to-return-more-than-5-sources-in-perplexity-api/680 "2025-08-07T03:06:42Z")

</div>

I am new to Perplexity AI and really impressed. I am implementing it on my personal website to help me find news sites from across the web that are reporting on a particular story. When I run the cURL command, it only e…

---

## [Document analysis](https://community.perplexity.ai/t/document-analysis/881)

<div class="topic-metadata">

**Author:** [@Rachel\_Nahumi](https://community.perplexity.ai/u/Rachel_Nahumi)\
**Replies:** 2\
**Last updated:** [August 5, 2025, 7:43pm UTC](https://community.perplexity.ai/t/document-analysis/881 "2025-08-05T19:43:59Z")

</div>

I have uploaded a PDF file that contains 159 pages, 12MB I asked to analyze a table in a specific page (70) I keep getting summaries of different parts of the file (its a real estate contract) tried different ways, no…

---

## [Where can I find information about licencing for perplexity API?](https://community.perplexity.ai/t/where-can-i-find-information-about-licencing-for-perplexity-api/750)

<div class="topic-metadata">

**Author:** [@ralphthompson](https://community.perplexity.ai/u/ralphthompson)\
**Replies:** 1\
**Last updated:** [July 29, 2025, 8:39pm UTC](https://community.perplexity.ai/t/where-can-i-find-information-about-licencing-for-perplexity-api/750 "2025-07-29T20:39:39Z")

</div>

Hi, we are building an app and would like to make calls to the perplexity API - are there any requirements (licensing etc) for using the API in a commercial setting? I can’t see anything in the FAQ or forum. Thanks a …

---

## [Structured Outputs for Deep Research](https://community.perplexity.ai/t/structured-outputs-for-deep-research/808)

<div class="topic-metadata">

**Author:** [@Talha\_Khan](https://community.perplexity.ai/u/Talha_Khan)\
**Replies:** 1\
**Last updated:** [July 29, 2025, 7:54pm UTC](https://community.perplexity.ai/t/structured-outputs-for-deep-research/808 "2025-07-29T19:54:24Z")

</div>

Hi I have a maybe dumb question. Can Sonar Deep Research have structured outputs? I’d like its research to specifically out put certain values.

---

## [User Location filter dont work](https://community.perplexity.ai/t/user-location-filter-dont-work/492)

<div class="topic-metadata">

**Author:** [@udl](https://community.perplexity.ai/u/udl)\
**Replies:** 5\
**Last updated:** [July 18, 2025, 7:24pm UTC](https://community.perplexity.ai/t/user-location-filter-dont-work/492 "2025-07-18T19:24:38Z")

</div>

I have a simple question for people used to Perplexity, this is what appears in the perplexity documentation: import requests url = "https://api.perplexity.ai/chat/completions" headers = {"Authorization": "Bearer YOUR…

---

## [Data Flow for Sonar API's](https://community.perplexity.ai/t/data-flow-for-sonar-apis/657)

<div class="topic-metadata">

**Author:** [@BrandonVanNiekerk](https://community.perplexity.ai/u/BrandonVanNiekerk)\
**Replies:** 0\
**Last updated:** [July 16, 2025, 5:45pm UTC](https://community.perplexity.ai/t/data-flow-for-sonar-apis/657 "2025-07-16T17:45:11Z")

</div>

I’m trying to understand how Perplexity performs real-time web searches while avoiding the exposure of sensitive user data to the public internet. From what I assume , it looks like the data flow might include several …

---

## [Able to specify sources similar to the Perplexity UI?](https://community.perplexity.ai/t/able-to-specify-sources-similar-to-the-perplexity-ui/634)

<div class="topic-metadata">

**Author:** [@SDCUF](https://community.perplexity.ai/u/SDCUF)\
**Replies:** 1\
**Last updated:** [July 12, 2025, 6:17pm UTC](https://community.perplexity.ai/t/able-to-specify-sources-similar-to-the-perplexity-ui/634 "2025-07-12T18:17:51Z")

</div>

Hi. The Perplexity UI allows me to select sources such as my Google Drive files as well as other connectors. The API seems to be limited to only web search and academic paper search? Am I missing something? Could some…

---

## [Lack of transparency on usage/pricing + ghosting from customer support](https://community.perplexity.ai/t/lack-of-transparency-on-usage-pricing-ghosting-from-customer-support/620)

<div class="topic-metadata">

**Author:** [@bav.richard](https://community.perplexity.ai/u/bav.richard)\
**Replies:** 0\
**Last updated:** [July 3, 2025, 9:10am UTC](https://community.perplexity.ai/t/lack-of-transparency-on-usage-pricing-ghosting-from-customer-support/620 "2025-07-03T09:10:38Z")

</div>

This originally was posted on \[r/perplexity\_ai\] subreddit, was redirected by a mod from there. I started experimenting around a month ago with Perplexity API. I wanted to build up a couple of simple workflows for myse…

---

## [Perplexity Interface API vs Sonar LLM API](https://community.perplexity.ai/t/perplexity-interface-api-vs-sonar-llm-api/570)

<div class="topic-metadata">

**Author:** [@larryr](https://community.perplexity.ai/u/larryr)\
**Replies:** 2\
**Last updated:** [June 24, 2025, 12:45am UTC](https://community.perplexity.ai/t/perplexity-interface-api-vs-sonar-llm-api/570 "2025-06-24T00:45:24Z")

</div>

I’m using Perplexity (Pro). I use it through the frontend at perplexity.ai. I would like to have API access to what is there, for example I might like to change things with my Threads, Pages, and Spaces. In looking fo…

---

## [File handling+device control+interactive voice on command](https://community.perplexity.ai/t/file-handling-device-control-interactive-voice-on-command/556)

<div class="topic-metadata">

**Author:** [@Amr\_Diaa\_El\_Din](https://community.perplexity.ai/u/Amr_Diaa_El_Din)\
**Replies:** 1\
**Last updated:** [June 23, 2025, 4:31pm UTC](https://community.perplexity.ai/t/file-handling-device-control-interactive-voice-on-command/556 "2025-06-23T16:31:54Z")

</div>

download files and file generation like word excel csv etc and also voice mode the actual interactive one on command by power button and some on device features to mimic gemini and replace it as device control

---

## [Multi-language search results](https://community.perplexity.ai/t/multi-language-search-results/437)

<div class="topic-metadata">

**Author:** [@Areiser](https://community.perplexity.ai/u/Areiser)\
**Replies:** 2\
**Last updated:** [June 12, 2025, 10:39am UTC](https://community.perplexity.ai/t/multi-language-search-results/437 "2025-06-12T10:39:44Z")

</div>

Hi. We are currently evaluating the use of perplexity API in our product for automating risk and incident retrieval for our customers. We are experimenting with the sonar model. The search works well for well known, int…

---

## [Possible overcharge on our account](https://community.perplexity.ai/t/possible-overcharge-on-our-account/425)

<div class="topic-metadata">

**Author:** [@tajjy\_29010](https://community.perplexity.ai/u/tajjy_29010)\
**Replies:** 3\
**Last updated:** [June 12, 2025, 12:17am UTC](https://community.perplexity.ai/t/possible-overcharge-on-our-account/425 "2025-06-12T00:17:44Z")

</div>

We had gap between amount charged on our account and actual usage on our API usage report, and it seems that credit has been disappeared from our account. We would like to clarify the facts on this issue as soon as poss…

---

## [Some citations are missing from the llm response content](https://community.perplexity.ai/t/some-citations-are-missing-from-the-llm-response-content/514)

<div class="topic-metadata">

**Author:** [@vandesa003](https://community.perplexity.ai/u/vandesa003)\
**Replies:** 5\
**Last updated:** [June 11, 2025, 9:02pm UTC](https://community.perplexity.ai/t/some-citations-are-missing-from-the-llm-response-content/514 "2025-06-11T21:02:11Z")

</div>

the full content i got from the api as below. i got 5 citations, but the model output only mentions \[2\]\[3\]\[5\]. i wonder if it’s a bug or i should just consider \[1\]\[4\] are citations for the entire content rather than a sp…

---

## [Bluetooth audio output issue in Perplexity](https://community.perplexity.ai/t/bluetooth-audio-output-issue-in-perplexity/528)

<div class="topic-metadata">

**Author:** [@cyrabr](https://community.perplexity.ai/u/cyrabr)\
**Replies:** 1\
**Last updated:** [June 11, 2025, 3:47pm UTC](https://community.perplexity.ai/t/bluetooth-audio-output-issue-in-perplexity/528 "2025-06-11T15:47:19Z")

</div>

Good afternoon! I have encountered the following issue with the new voice mode in Perplexity: the sound only comes through the phone’s speakers when I want to use the Bluetooth headset. Could you please advise how to con…

[Previous page](https://community.perplexity.ai/c/general/4.md?page=2)

[Next page](https://community.perplexity.ai/c/general/4.md?page=4)
