Perplexity LLM Responses Models List

Pricing

Your account will not be charged for using this API

checked GET

You will receive the list of available Perplexity AI models by calling this API.
 
As a response of the API server, you will receive JSON-encoded data containing a tasks array with the information specific to the set tasks.

Field nameTypeDescription
versionstring

the current version of the API

status_codeinteger

general status code
you can find the full list of the response codes here

status_messagestring

general informational message
you can find the full list of general informational messages here

timestring

execution time, seconds

costfloat

total tasks cost, USD

tasks_countinteger

the number of tasks in the tasks array

tasks_errorinteger

the number of tasks in the tasks array returned with an error

tasksarray

array of tasks

    idstring

task identifier
unique task identifier in our system in the UUID format

    status_codeinteger

status code of the task
generated by DataForSEO; can be within the following range: 10000-60000
you can find the full list of the response codes here

    status_messagestring

informational message of the task
you can find the full list of general informational messages here

    timestring

execution time, seconds

    costfloat

cost of the task, USD

    result_countinteger

number of elements in the result array

    patharray

URL path

    dataobject

contains the parameters passed in the URL of the GET request

resultarray

array of results

    model_namestring

name of the AI model

    reasoningboolean

indicates if the AI model supports reasoning

    web_search_supportedboolean

web search support for the AI model
if true, the web_search parameter can be set with the AI model

    task_post_supportedboolean

indicates if Standard (POST-GET) data retrieval is supported
if true, you can use the Standard (POST-GET) data retrieval method with the AI model

Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-access

# Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-access 
login="login" 
password="password" 
cred="$(printf ${login}:${password} | base64)" 
curl --location --request GET "https://api.dataforseo.com/v3/ai_optimization/perplexity/llm_responses/models" 
--header "Authorization: Basic ${cred}"  
--header "Content-Type: application/json" 
--data-raw ""
<?php
// You can download this file from here https://cdn.dataforseo.com/v3/examples/php/php_RestClient.zip
require('RestClient.php');
$api_url = 'https://api.dataforseo.com/';
try {
	// Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-access
	$client = new RestClient($api_url, null, 'login', 'password');
} catch (RestClientException $e) {
	echo "n";
	print "HTTP code: {$e->getHttpCode()}n";
	print "Error code: {$e->getCode()}n";
	print "Message: {$e->getMessage()}n";
	print  $e->getTraceAsString();
	echo "n";
	exit();
}
try {
	// using this method you can get a list of ai models
	// GET /v3/ai_optimization/perplexity/llm_responses/models
	// the full list of possible parameters is available in documentation
	$result = $client->get('/v3/serp/google/ai_mode/languages');
	print_r($result);
	// do something with result
} catch (RestClientException $e) {
	echo "n";
	print "HTTP code: {$e->getHttpCode()}n";
	print "Error code: {$e->getCode()}n";
	print "Message: {$e->getMessage()}n";
	print  $e->getTraceAsString();
	echo "n";
}
$client = null;
?>
const axios = require('axios');

axios({
    method: 'get',
    url: 'https://api.dataforseo.com/v3/ai_optimization/perplexity/llm_responses/models',
    auth: {
        username: 'login',
        password: 'password'
    },
    data: [{
        version: "v3"
    }],
    headers: {
        'content-type': 'application/json'
    }
}).then(function (response) {
    var result = response['data']['tasks'][0]['result'];
    // Result data
    console.log(result);
}).catch(function (error) {
    console.log(error);
});
"""
Method: GET
Endpoint: https://api.dataforseo.com/v3/ai_optimization/perplexity/llm_responses/models
@see https://docs.dataforseo.com/v3/ai_optimization/perplexity/llm_responses/models
"""

import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../../../')))
from lib.client import RestClient
from lib.config import username, password
client = RestClient(username, password)

try:
    response = client.get('/v3/ai_optimization/perplexity/llm_responses/models')
    print(response)
    # do something with get result
except Exception as e:
    print(f'An error occurred: {e}')
using System;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace DataForSeoSdk;

public class AiOptimization
{

    private static readonly HttpClient _httpClient;
    
    static AiOptimization()
    {
        _httpClient = new HttpClient
        {
            BaseAddress = new Uri("https://api.dataforseo.com/")
        };
        _httpClient.DefaultRequestHeaders.Authorization =
            new AuthenticationHeaderValue("Basic", ApiConfig.Base64Auth);
    }

    /// <summary>
    /// Method: GET
    /// Endpoint: https://api.dataforseo.com/v3/ai_optimization/perplexity/llm_responses/models
    /// </summary>
    /// <see href="https://docs.dataforseo.com/v3/ai_optimization/perplexity/llm_responses/models"/>
    
    public static async Task PerplexityLlmResponsesModels()
    {
        using var response = await _httpClient.GetAsync("/v3/ai_optimization/perplexity/llm_responses/models");
        var result = JsonConvert.DeserializeObject<dynamic>(await response.Content.ReadAsStringAsync());
        // you can find the full list of the response codes here https://docs.dataforseo.com/v3/appendix/errors
        if (result.status_code == 20000)
        {
            // do something with result
            Console.WriteLine(result);
        }
        else
            Console.WriteLine($"error. Code: {result.status_code} Message: {result.status_message}");
    }

The above command returns JSON structured like this:

{
  "version": "0.1.20260116",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.0483 sec.",
  "cost": 0,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "01211658-1535-0616-0000-f1bf0834d610",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.0000 sec.",
      "cost": 0,
      "result_count": 3,
      "path": [
        "v3",
        "ai_optimization",
        "perplexity",
        "llm_responses",
        "models"
      ],
      "data": {
        "api": "ai_optimization",
        "function": "llm_responses",
        "se": "perplexity"
      },
      "result": [
        {
          "model_name": "sonar-reasoning-pro",
          "reasoning": true,
          "web_search_supported": true,
          "task_post_supported": false
        },
        {
          "model_name": "sonar-pro",
          "reasoning": false,
          "web_search_supported": true,
          "task_post_supported": false
        },
        {
          "model_name": "sonar",
          "reasoning": false,
          "web_search_supported": true,
          "task_post_supported": false
        }
      ]
    }
  ]
}