Perplexity AI search tools for pi
npm install @oh-my-pi/perplexityPerplexity AI search tools for pi.
``bash`
omp install @oh-my-pi/perplexity
Set your Perplexity API key:
`bashOption 1: Environment variable
export PERPLEXITY_API_KEY=pplx-xxx
Get your API key from Perplexity API Settings.
Tools
$3
Fast web search using Perplexity Sonar. Returns real-time answers with citations.
Best for: Quick facts, current events, straightforward questions
Parameters:
-
query (required): The search query or question
- search_recency_filter: Filter by recency (day, week, month, year)
- search_domain_filter: Limit to specific domains (e.g., ["nature.com", "arxiv.org"])
- search_context_size: Amount of search context (low, medium, high)
- return_related_questions: Include follow-up question suggestions$3
Advanced web search using Perplexity Sonar Pro. Returns comprehensive answers with 2x more sources.
Best for: Complex research, multi-step analysis, detailed comparisons
Additional parameters:
-
system_prompt: Guide the response style and focusPricing
| Model | Input | Output | Per 1K Requests |
| --------- | ----------- | ------------ | --------------- |
| Sonar | $1/M tokens | $1/M tokens | $5-12 |
| Sonar Pro | $3/M tokens | $15/M tokens | $6-14 |
Request cost varies by
search_context_size` (low/medium/high).MIT