Default model

Supported models

Any model available through the Perplexity API:
  • sonar-pro (default, web-grounded flagship)
  • sonar (web-grounded base)
  • sonar-reasoning-pro (reasoning + web)
  • sonar-reasoning (reasoning + web base)
  • Any other model ID the API accepts

Authentication

Environment variable:
Config command:
Get your API key from perplexity.ai/settings/api.

Example usage

Tool-use support

No. Single-turn and multi-turn attacks work.

Notes

  • Web-grounded models behave differently under prompt injection than sealed-knowledge LLMs, distinct attack surface worth testing separately
  • The provider uses the OpenAI SDK pointed at Perplexity’s API (base_url="https://api.perplexity.ai")
  • Sonar models include web search results in the context, making them vulnerable to indirect prompt injection via search-engine-poisoning
  • Max output tokens per request: 4,096
  • Retry with exponential backoff is automatic on API failures (3 attempts)