Supported Models

Perplexity Models

ModelParameter CountContext LengthModel Type
sonar-small-chat7B16384Chat Completion
sonar-small-online7B12000Chat Completion
sonar-medium-chat8x7B16384Chat Completion
sonar-medium-online8x7B12000Chat Completion

Open-Source Models

Where possible, we try to match the Hugging Face implementation.

ModelParameter CountContext LengthModel Type
codellama-70b-instruct70B16384Chat Completion
mistral-7b-instruct [1]7B16384Chat Completion
mixtral-8x7b-instruct8x7B16384Chat Completion

[1] This model refers to the v0.2 release of mistral-7b-instruct.

Special Tokens

We do not raise any exceptions if your chat inputs contain messages with special tokens. If avoiding prompt injections is a concern for your use case, it is recommended that you check for special tokens prior to calling the API. For more details, read Meta's recommendations for Llama.

Online LLMs

It is recommended to use only single-turn conversations and avoid system prompts for the online LLMs (sonar-1-small-online and sonar-1-medium-online).