Unable to retrieve the result of an async deep research

:bug: Describe the Bug

I’m starting a deep research with the API in curl on the POST route /v1/async/sonar.

I’m successfully retrieving the ID, but the GET route /v1/async/sonar/{api_request} (where api_request is replaced by the ID returned by the POST) only returns the list of deep research (as if I had used the GET route /v1/async/sonar), never the result of the targeted ID (the deepresearch is indeed in completed status.)

I also tried from the playground, but without success.

:white_check_mark: Expected Behavior

Retrieve the response from a deepresearch on the /v1/async/sonar/{api_request}

:cross_mark: Actual Behavior

I retrieve the list of deepresearch, as if I were using /v1/async/sonar

:counterclockwise_arrows_button: Steps to Reproduce

  1. Call POST /v1/async/sonar with model sonar-deep-research
  2. Get the ID returned
  3. Call GET /v1/async/sonar/{ID}
  4. you will have the list of deepresearch and not the deepresearch response

Hey @blinard — just to confirm the expected pattern:

# 1. Create the async request
curl -X POST https://api.perplexity.ai/v1/async/sonar \
  -H "Authorization: Bearer $PERPLEXITY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "sonar-deep-research", "messages": [{"role": "user", "content": "Your query"}]}'
# Returns: {"request_id": "req_abc123", ...}

# 2. Fetch the specific result by request_id
curl https://api.perplexity.ai/v1/async/sonar/req_abc123 \
  -H "Authorization: Bearer $PERPLEXITY_API_KEY"

A couple things to double-check:

  • Make sure you are using the id or request_id value from the POST response
  • The URL path should be /v1/async/sonar/{request_id} with no trailing slash
  • If the request is still processing, you will get a status object rather than the full result

If you have confirmed all of the above and it is still returning the list instead of the specific result, please email api@perplexity.ai with the exact request_id you are using so the team can investigate on the backend.

Hey @Kesku Thank you for your response.

The API call I am making is as follows:

curl --request POST \
  --url https://api.perplexity.ai/v1/async/sonar \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "request": {
    "model": "sonar-deep-research",
    "messages": [
      {
        "role": "<string>",
        "content": "<string>"
      }
    ]
  }
}
'

That can be found in the documentation: List Async Chat Completions - Perplexity

But this API call does not return a “request_id”, only an “id”. How can I retrieve this “request_id”?

Like that :

{"id":"xxxx-xxxx","model":"sonar-deep-research","created_at":1775573869,"started_at":null,"completed_at":null,"response":null,"failed_at":null,"error_message":null,"status":"CREATED"}

Thanks again.

Thanks for following up! We were able to escalate this and apply a fix for it. You should be all set now (please let me know if not!)

all good, thanks a lot

1 Like