perplexity-common-errors

Featured

Diagnose and fix Perplexity Sonar API errors and exceptions. Use when encountering Perplexity errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "perplexity error", "fix perplexity", "perplexity not working", "debug perplexity", "perplexity 429".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Perplexity Common Errors ## Overview Quick reference for the most common Perplexity Sonar API errors, their root causes, and fixes. All Perplexity errors follow the OpenAI error format since the API is OpenAI-compatible. ## Prerequisites - `PERPLEXITY_API_KEY` environment variable set - `curl` available for diagnostic commands ## Error Reference ### 401 Unauthorized — Invalid API Key ```json {"error": {"message": "Invalid API key", "type": "authentication_error", "code": 401}} ``` **Causes:** Key missing, expired, revoked, or doesn't start with `pplx-`. **Fix:** ```bash set -euo pipefail # Verify key is set and has correct prefix echo "${PERPLEXITY_API_KEY:0:5}" # Should print "pplx-" # Test key directly curl -s -o /dev/null -w "%{http_code}" \ -H "Authorization: Bearer $PERPLEXITY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"sonar","messages":[{"role":"user","content":"test"}],"max_tokens":5}' \ https://api.perplexity.ai/chat/completions # 200 = valid, 401 = invalid key ``` Regenerate at [perplexity.ai/settings/api](https://www.perplexity.ai/settings/api). --- ### 429 Too Many Requests — Rate Limited ```json {"error": {"message": "Rate limit exceeded", "type": "rate_limit_error", "code": 429}} ``` **Causes:** Exceeded requests per minute (RPM). Most tiers allow 50 RPM. Perplexity uses a leaky bucket algorithm. **Fix:** ```typescript async function withBackoff<T>(fn: () => Promise<T>, maxRetries = 5): Promise<T> { for (let i = 0; i <...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

perplexity-rate-limits

Implement Perplexity rate limiting, backoff, and request queuing. Use when handling 429 errors, implementing retry logic, or optimizing API request throughput for Perplexity Sonar. Trigger with phrases like "perplexity rate limit", "perplexity throttling", "perplexity 429", "perplexity retry", "perplexity backoff".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-advanced-troubleshooting

Apply advanced debugging techniques for hard-to-diagnose Perplexity Sonar API issues. Use when standard troubleshooting fails, investigating inconsistent citations, or preparing evidence for support escalation. Trigger with phrases like "perplexity hard bug", "perplexity mystery error", "perplexity inconsistent results", "difficult perplexity issue", "perplexity deep debug".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-install-auth

Install and configure Perplexity Sonar API authentication. Use when setting up a new Perplexity integration, configuring API keys, or initializing the OpenAI-compatible client for Perplexity. Trigger with phrases like "install perplexity", "setup perplexity", "perplexity auth", "configure perplexity API key", "perplexity sonar setup".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-known-pitfalls

Identify and avoid Perplexity anti-patterns and common integration mistakes. Use when reviewing Perplexity code, onboarding new developers, or auditing existing integrations for best practices violations. Trigger with phrases like "perplexity mistakes", "perplexity anti-patterns", "perplexity pitfalls", "perplexity code review", "perplexity gotchas".

2,266 Updated today
jeremylongshore
AI & Automation Featured

perplexity-security-basics

Apply Perplexity security best practices for API key management and query safety. Use when securing API keys, implementing query sanitization, or auditing Perplexity security configuration. Trigger with phrases like "perplexity security", "perplexity secrets", "secure perplexity", "perplexity API key security", "perplexity PII".

2,266 Updated today
jeremylongshore