Skip to main content
The providers endpoint returns a list of all active providers with their available chat and embedding models. Use this endpoint before making search requests to get the valid provider IDs and model keys.

Endpoint

http://localhost:3000/api/providers
Replace localhost:3000 with your Perplexica instance URL if running on a different host or port.

Response

providers
array
A list of all active providers with their available models.

Request example

curl http://localhost:3000/api/providers

Response example

{
  "providers": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "OpenAI",
      "chatModels": [
        {
          "name": "GPT 4 Omni Mini",
          "key": "gpt-4o-mini"
        },
        {
          "name": "GPT 4 Omni",
          "key": "gpt-4o"
        }
      ],
      "embeddingModels": [
        {
          "name": "Text Embedding 3 Large",
          "key": "text-embedding-3-large"
        }
      ]
    }
  ]
}
Use the id field as the providerId and the key field from the models arrays when making search requests.

Error responses

500
Internal Server Error
Returned if an error occurs while fetching providers.

Build docs developers (and LLMs) love