"sonar-pro" Model Returns 400 Invalid Model Error Despite Valid Setup

:bug: Describe the Bug

Calling the /chat/completions endpoint with a valid sonar-pro model results in a 400 error stating “Invalid model ‘sonar-pro’” — even though this is listed as a supported model in the documentation and confirmed by your support team.

:white_check_mark: Expected Behavior

A valid JSON response from the sonar-pro model, containing a reply to the user’s message.

:cross_mark: Actual Behavior

The API returns a 400 error:

json

CopyEdit

{
  "error": {
    "message": "Invalid model 'sonar-pro'. Permitted models can be found in the documentation at https://docs.perplexity.ai/guides/model-cards.",
    "type": "invalid_model",
    "code": 400
  }

:counterclockwise_arrows_button: Steps to Reproduce

  • Call the Perplexity API with the payload below using Python requests or curl.
  • Observe that the response is a 400 error.

:pushpin: API Request & Response (if applicable)

{
“model”: “sonar-pro”,
“messages”: [{“role”: “user”, “content”: “What did Powell say this week?”}],
“stream”: false
}
Headers:

json

CopyEdit

{
  "Authorization": "Bearer [API_KEY]",
  "Content-Type": "application/json"
}

Response:

json

CopyEdit

{
  "error": {
    "message": "Invalid model 'sonar-pro'",
    "type": "invalid_model",
    "code": 400
  }
}

:globe_showing_europe_africa: Environment

  • API Version: Latest as of July 1, 2025

  • SDK: Python (requests)

  • Operating System: Windows 10

  • API key is valid and .env is configured properly

  • Other models like sonar may work, but sonar-pro fails consistently

  • This is a blocking issue for integrating Perplexity into a production app

Hey Nick - James here from the API team. I just tried to repro and sonar-pro is working fine. Can you please share a cURL request that caused the bug you’re describing? Below request works.

--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer pplx- \
--data '{
  "model": "sonar-pro",
  "messages": [
    {
      "role": "system",
      "content": "Be precise and concise."
    },
    {
      "role": "user",
      "content": "How many stars are there in our galaxy?"
    }
  ]
}'