计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
perplexity-install-auth【效率与协作】Install and configure Perplexity SDK/CLI authentication. Use when setting up a new Perplexity integration, configuring API keys, or initializing Perplexity in your project. Trigger with phrases like "install perplexity", "setup perplexity", "perplexity auth", "configure perplexity API key".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Set up Perplexity SDK/CLI and configure authentication credentials.
# Node.js
npm install @perplexity/sdk
# Python
pip install perplexity
# Set environment variable
export PERPLEXITY_API_KEY="your-api-key"
# Or create .env file
echo 'PERPLEXITY_API_KEY=your-api-key' >> .env
// Test connection code here
| Error | Cause | Solution |
|---|---|---|
| Invalid API Key | Incorrect or expired key | Verify key in Perplexity dashboard |
| Rate Limited | Exceeded quota | Check quota at https://docs.perplexity.com |
| Network Error | Firewall blocking | Ensure outbound HTTPS allowed |
| Module Not Found | Installation failed | Run npm install or pip install again |
import { PerplexityClient } from '@perplexity/sdk';
const client = new PerplexityClient({
apiKey: process.env.PERPLEXITY_API_KEY,
});
from perplexity import PerplexityClient
client = PerplexityClient(
api_key=os.environ.get('PERPLEXITY_API_KEY')
)
After successful auth, proceed to perplexity-hello-world for your first API call.