
Perplexity's developer API answers questions from a live web search and cites its sources. Its Agent API also runs models from OpenAI, Anthropic, Google and xAI through one key.
Pay as you go, no subscription. Model tokens extra, e.g. openai/gpt-6-luna $0.10 in, $0.50 out per 1M.
Agent API, shared across keys. Tier 1 ($50+ credits bought) gets 3 QPS; higher tiers get more.
API Terms say Customer Content is not used to train models; zero data retention is not the default.
Official SDKs for Python 3.10+ and Node.js 20+ (TypeScript).
Pass a URL as state with web_grounding and Perplexity's Decisions API reads the page first. $0.001 per fetch; max_staleness sets page age.
effort="ultra" runs long, broad research and data-gathering jobs on Claude Opus 5.5. Use background mode for the long runs.
Set mode to web_grounding on Perplexity's Decisions API and it runs a web search per question, returning the sources it used.