I’ve run into an issue with the Perplexity API and wanted to check whether anyone else has seen this.
This request works fine:
curl --request POST \
--url https://api.perplexity.ai/chat/completions \
--header "Content-Type: application/json" \
--header "Authorization: Bearer pplx-..." \
--data '{
"model": "sonar-pro",
"use_threads": false,
"messages": [
{
"role": "user",
"content": "Which movie won the Cannes film festival special jury prize in 1996?"
}
],
"stream": false,
"web_search_options": {
"search_type": "pro"
}
}'
I get a valid response.
However, if I change just one parameter:
"use_threads": true
the API responds with:
{"error":{"message":"Unauthorized","type":"unauthorized","code":401}}
A few things that make this confusing:
-
This exact example with
use_threadsused to be present in the Perplexity documentation. -
It has since been removed.
-
I can’t find any up-to-date explanation of how threading is supposed to work now.
-
The response I got at the time came from an
Perplexity Agent supportagent and did not provide any meaningful or actionable explanation.
Questions:
-
Is
use_threadsstill supported? -
Does enabling threads require additional permissions, a different endpoint, or a different auth scope?
-
Is this expected behavior or a bug in the API?
-
What is the current, recommended way to handle conversation threads in Perplexity?