|
1 |
| -<a href="https://sonar.perplexity.ai" target="_blank"> |
| 1 | +# Perplexity Sonar API Cookbook |
| 2 | + |
| 3 | +A comprehensive collection of practical examples, integration guides, and community showcases for building with [Perplexity's Sonar API](https://sonar.perplexity.ai/) - the fastest, most cost-effective AI answer engine with real-time search capabilities. |
| 4 | + |
| 5 | +<a href="https://docs.perplexity.ai/cookbook" target="_blank"> |
2 | 6 | <picture>
|
3 | 7 | <source media="(prefers-color-scheme: dark)" srcset="/static/img/perplexity-sonar.png" style="max-width: 100%; width: 400px; margin-bottom: 20px">
|
4 | 8 | <img src="/static/img/perplexity-sonar.png" alt="Perplexity Sonar" style="max-width: 100%; width: 400px; margin-bottom: 20px">
|
5 | 9 | </picture>
|
6 | 10 | </a>
|
7 | 11 |
|
8 |
| -<h3><a href="https://sonar.perplexity.ai" target="_blank">sonar.perplexity.ai</a></h3> |
| 12 | +📖 **[View the full cookbook →](https://docs.perplexity.ai/cookbook)** |
| 13 | + |
| 14 | +## What's Inside |
| 15 | + |
| 16 | +### 🛠️ [Examples](docs/examples/) |
| 17 | +Ready-to-run applications demonstrating real-world use cases: |
| 18 | + |
| 19 | +- **[Fact Checker CLI](docs/examples/fact-checker-cli/)** - Verify claims and articles for accuracy |
| 20 | +- **[Daily Knowledge Bot](docs/examples/daily-knowledge-bot/)** - Automated daily fact delivery system |
| 21 | +- **[Disease Information App](docs/examples/disease-qa/)** - Interactive medical information lookup |
| 22 | +- **[Financial News Tracker](docs/examples/financial-news-tracker/)** - Real-time market analysis |
| 23 | +- **[Academic Research Finder](docs/examples/research-finder/)** - Literature discovery and summarization |
| 24 | +- **[Discord Bot](docs/examples/discord-py-bot/)** - Discord integration example |
| 25 | + |
| 26 | +### 🌟 [Community Showcase](docs/showcase/) |
| 27 | +Community-built applications including: |
| 28 | +- News and finance apps |
| 29 | +- AI-powered search tools |
| 30 | +- Browser extensions |
| 31 | +- Educational platforms |
| 32 | +- And many more innovative projects |
| 33 | + |
| 34 | +### 📚 [Integration Guides](docs/articles/) |
| 35 | +In-depth tutorials for advanced implementations: |
| 36 | +- Memory management patterns |
| 37 | +- OpenAI agents integration |
| 38 | +- Multi-modal implementations |
9 | 39 |
|
| 40 | +## Quick Start |
10 | 41 |
|
11 |
| -Example code and guides for accomplishing common tasks with the [Perplexity Sonar API](https://sonar.perplexity.ai/), the fastest, most cost-effective AI answer engine with search. |
| 42 | +1. **Browse the [documentation](https://docs.perplexity.ai/cookbook)** to find examples that match your needs |
| 43 | +2. **Clone this repository** and navigate to any example directory |
| 44 | +3. **Follow the setup instructions** in each example's README |
| 45 | +4. **Get your API key** from [Perplexity](https://docs.perplexity.ai/guides/getting-started) |
| 46 | +5. **Build and customize** for your specific use case |
12 | 47 |
|
| 48 | +## API Key Setup |
13 | 49 |
|
14 |
| -For more information, check our [docs](https://docs.perplexity.ai). |
| 50 | +All examples require a Perplexity API key: |
| 51 | + |
| 52 | +```bash |
| 53 | +export PPLX_API_KEY="your-api-key-here" |
| 54 | +``` |
| 55 | + |
| 56 | +Get your API key at [docs.perplexity.ai](https://docs.perplexity.ai/guides/getting-started). |
15 | 57 |
|
16 | 58 | ## Contributing
|
17 | 59 |
|
18 |
| -We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on how to submit examples and showcase projects. |
| 60 | +Have a project built with Sonar API? We'd love to feature it! |
| 61 | + |
| 62 | +- **[Submit an Example Tutorial](CONTRIBUTING.md#for-examples)** |
| 63 | +- **[Submit a Showcase Project](CONTRIBUTING.md#for-showcase-projects)** |
| 64 | +- **[View Full Contributing Guidelines](CONTRIBUTING.md)** |
| 65 | + |
| 66 | +## Resources |
| 67 | + |
| 68 | +- **[Sonar API Documentation](https://docs.perplexity.ai/home)** |
| 69 | +- **[API Playground](https://perplexity.ai/account/api/playground)** |
| 70 | +- **[Cookbook Documentation](https://docs.perplexity.ai/cookbook)** |
| 71 | + |
| 72 | +--- |
19 | 73 |
|
20 |
| -### Quick Links |
21 |
| -- [Submit an Example Tutorial](CONTRIBUTING.md#for-examples) |
22 |
| -- [Submit a Showcase Project](CONTRIBUTING.md#for-showcase-projects) |
23 |
| -- [View Contribution Guidelines](CONTRIBUTING.md) |
| 74 | +*This repository syncs to [docs.perplexity.ai/cookbook](https://docs.perplexity.ai/cookbook) on every commit.* |
0 commit comments