> ## Documentation Index
> Fetch the complete documentation index at: https://spacesail.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Perplexity

The Perplexity model provides access to Perplexity's language models.

## Parameters

| Parameter  | Type            | Default                               | Description                                                           |
| ---------- | --------------- | ------------------------------------- | --------------------------------------------------------------------- |
| `id`       | `str`           | `"llama-3.1-sonar-small-128k-online"` | The id of the Perplexity model to use                                 |
| `name`     | `str`           | `"Perplexity"`                        | The name of the model                                                 |
| `provider` | `str`           | `"Perplexity"`                        | The provider of the model                                             |
| `api_key`  | `Optional[str]` | `None`                                | The API key for Perplexity (defaults to PERPLEXITY\_API\_KEY env var) |
| `base_url` | `str`           | `"https://api.perplexity.ai"`         | The base URL for the Perplexity API                                   |

Perplexity extends the OpenAI-compatible interface and supports most parameters from OpenAI.
