# Table of Contents - [Overview - Perplexity](#overview-perplexity) - [List Async Chat Completions - Perplexity](#list-async-chat-completions-perplexity) - [Create Async Chat Completion - Perplexity](#create-async-chat-completion-perplexity) - [Generate Auth Token - Perplexity](#generate-auth-token-perplexity) - [Get Async Chat Completion Response - Perplexity](#get-async-chat-completion-response-perplexity) - [Revoke Auth Token - Perplexity](#revoke-auth-token-perplexity) - [Search - Perplexity](#search-perplexity) - [Chat Completions - Perplexity](#chat-completions-perplexity) - [Chat Summary Memory Buffer - Perplexity](#chat-summary-memory-buffer-perplexity) - [Persistent Chat Memory - Perplexity](#persistent-chat-memory-perplexity) - [Disease Information App - Perplexity](#disease-information-app-perplexity) - [Daily Knowledge Bot - Perplexity](#daily-knowledge-bot-perplexity) - [Memory Management - Perplexity](#memory-management-perplexity) - [Perplexity Discord Bot - Perplexity](#perplexity-discord-bot-perplexity) - [Fact Checker CLI - Perplexity](#fact-checker-cli-perplexity) - [Academic Research Finder CLI - Perplexity](#academic-research-finder-cli-perplexity) - [Perplexity API Cookbook - Perplexity](#perplexity-api-cookbook-perplexity) - [OpenAI Agents Integration - Perplexity](#openai-agents-integration-perplexity) - [Financial News Tracker - Perplexity](#financial-news-tracker-perplexity) - [Get in Touch - Perplexity](#get-in-touch-perplexity) - [4Point Hoops | AI Basketball Analytics Platform - Perplexity](#4point-hoops-ai-basketball-analytics-platform-perplexity) - [CycleSyncAI | Personalized Health Plans Powered by Sonar API - Perplexity](#cyclesyncai-personalized-health-plans-powered-by-sonar-api-perplexity) - [BazaarAISaathi | AI-Powered Indian Stock Market Assistant - Perplexity](#bazaaraisaathi-ai-powered-indian-stock-market-assistant-perplexity) - [Fact Dynamics | Real-time Fact-Checking Flutter App - Perplexity](#fact-dynamics-real-time-fact-checking-flutter-app-perplexity) - [Perplexity Crawlers - Perplexity](#perplexity-crawlers-perplexity) - [Flow & Focus | Personalized News for Genuine Understanding - Perplexity](#flow-focus-personalized-news-for-genuine-understanding-perplexity) - [CityPulse | AI-Powered Geospatial Discovery Search - Perplexity](#citypulse-ai-powered-geospatial-discovery-search-perplexity) - [Executive Intelligence | AI-Powered Strategic Decision Platform - Perplexity](#executive-intelligence-ai-powered-strategic-decision-platform-perplexity) - [FlameGuardAI | AI-powered wildfire prevention - Perplexity](#flameguardai-ai-powered-wildfire-prevention-perplexity) - [Briefo | Perplexity Powered News & Finance Social App - Perplexity](#briefo-perplexity-powered-news-finance-social-app-perplexity) - [FirstPrinciples | AI Learning Roadmap Generator - Perplexity](#firstprinciples-ai-learning-roadmap-generator-perplexity) - [Privacy & Security - Perplexity](#privacy-security-perplexity) - [Ellipsis | One-Click Podcast Generation Agent - Perplexity](#ellipsis-one-click-podcast-generation-agent-perplexity) - [API Groups & Billing - Perplexity](#api-groups-billing-perplexity) - [Daily News Briefing | AI-Powered News Summaries for Obsidian - Perplexity](#daily-news-briefing-ai-powered-news-summaries-for-obsidian-perplexity) - [Monday – Voice-First AI Learning Assistant - Perplexity](#monday-voice-first-ai-learning-assistant-perplexity) - [MVP LifeLine | AI Youth Empowerment Platform - Perplexity](#mvp-lifeline-ai-youth-empowerment-platform-perplexity) - [Sonar Chromium Browser | Native Search Omnibox and Context Menu - Perplexity](#sonar-chromium-browser-native-search-omnibox-and-context-menu-perplexity) - [PosterLens | Scientific Poster Scanner & Research Assistant - Perplexity](#posterlens-scientific-poster-scanner-research-assistant-perplexity) - [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant - Perplexity](#perplexicart-ai-powered-value-aligned-shopping-assistant-perplexity) - [Greenify | Localized community-driven greenification/plantation solution with AI - Perplexity](#greenify-localized-community-driven-greenification-plantation-solution-with-ai-perplexity) - [System Status - Perplexity](#system-status-perplexity) - [Valetudo AI | Trusted Medical Answer Assistant - Perplexity](#valetudo-ai-trusted-medical-answer-assistant-perplexity) - [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension - Perplexity](#perplexity-lens-ai-powered-knowledge-graph-browser-extension-perplexity) - [PerplexiGrid | Interactive Analytics Dashboards - Perplexity](#perplexigrid-interactive-analytics-dashboards-perplexity) - [StarPlex | AI-Powered Startup Intelligence Platform - Perplexity](#starplex-ai-powered-startup-intelligence-platform-perplexity) - [Rate Limits & Usage Tiers - Perplexity](#rate-limits-usage-tiers-perplexity) - [Perplexity Dart & Flutter SDKs - Perplexity](#perplexity-dart-flutter-sdks-perplexity) - [Perplexity MCP Server - Perplexity](#perplexity-mcp-server-perplexity) - [API Roadmap - Perplexity](#api-roadmap-perplexity) - [TruthTracer | AI-Powered Misinformation Detection Platform - Perplexity](#truthtracer-ai-powered-misinformation-detection-platform-perplexity) - [Pricing - Perplexity](#pricing-perplexity) - [Perplexity Client | Desktop AI Chat Interface with API Controls - Perplexity](#perplexity-client-desktop-ai-chat-interface-with-api-controls-perplexity) - [UnCovered | Real-Time Fact-Checking Chrome Extension - Perplexity](#uncovered-real-time-fact-checking-chrome-extension-perplexity) - [Quickstart - Perplexity](#quickstart-perplexity) - [Prompt Guide - Perplexity](#prompt-guide-perplexity) - [Built-in Tool Capabilities - Perplexity](#built-in-tool-capabilities-perplexity) - [Sonar Search Context Size - Perplexity](#sonar-search-context-size-perplexity) - [Structured Outputs Guide - Perplexity](#structured-outputs-guide-perplexity) - [SEC Filings Filter Guide - Perplexity](#sec-filings-filter-guide-perplexity) - [Unknown](#unknown) - [Page Not Found](#page-not-found) - [Sonar - Perplexity](#sonar-perplexity) - [Search API - Perplexity](#search-api-perplexity) - [Sonar pro - Perplexity](#sonar-pro-perplexity) - [Rate Limits and Usage Tiers - Perplexity](#rate-limits-and-usage-tiers-perplexity) - [Sonar reasoning pro - Perplexity](#sonar-reasoning-pro-perplexity) - [Perplexity API Cookbook - Perplexity](#perplexity-api-cookbook-perplexity) - [Sonar deep research - Perplexity](#sonar-deep-research-perplexity) - [Page Not Found](#page-not-found) - [Page Not Found](#page-not-found) - [Page Not Found](#page-not-found) - [Page Not Found](#page-not-found) --- # Overview - Perplexity [Skip to main content](https://docs.perplexity.ai/getting-started/overview#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) API Platform ============ Power your products with unparalleled real-time, web-wide research and Q&A capabilities. Quickstart GuideGetting started is simple and fast—make your first API call within minutes. [Search](https://docs.perplexity.ai/guides/search-quickstart) [Grounded LLM](https://docs.perplexity.ai/getting-started/quickstart) ### Search Get ranked web search results with advanced filtering and real-time data. [](https://docs.perplexity.ai/guides/search-quickstart) ### Grounded LLM Build AI applications with web-grounded chat completions and reasoning models. [sonar](https://docs.perplexity.ai/getting-started/quickstart) ⌘I --- # List Async Chat Completions - Perplexity [Skip to main content](https://docs.perplexity.ai/api-reference/async-chat-completions-get#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Sonar Chat Completions API List Async Chat Completions Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Search API * [POST\ \ Search](https://docs.perplexity.ai/api-reference/search-post) ##### Sonar Chat Completions API * [POST\ \ Chat Completions](https://docs.perplexity.ai/api-reference/chat-completions-post) * [POST\ \ Create Async Chat Completion](https://docs.perplexity.ai/api-reference/async-chat-completions-post) * [GET\ \ List Async Chat Completions](https://docs.perplexity.ai/api-reference/async-chat-completions-get) * [GET\ \ Get Async Chat Completion Response](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get) * [POST\ \ Generate Auth Token](https://docs.perplexity.ai/api-reference/generate-auth-token-post) * [POST\ \ Revoke Auth Token](https://docs.perplexity.ai/api-reference/revoke-auth-token-post) List Async Chat Completions cURL Copy Ask AI curl --request GET \ --url https://api.perplexity.ai/async/chat/completions \ --header 'Authorization: Bearer ' 200 Copy Ask AI { "requests": [\ {\ "id": "",\ "created_at": 123,\ "model": "",\ "status": "CREATED",\ "started_at": 123,\ "completed_at": 123,\ "failed_at": 123\ }\ ], "next_token": "" } GET / async / chat / completions Try it List Async Chat Completions cURL Copy Ask AI curl --request GET \ --url https://api.perplexity.ai/async/chat/completions \ --header 'Authorization: Bearer ' 200 Copy Ask AI { "requests": [\ {\ "id": "",\ "created_at": 123,\ "model": "",\ "status": "CREATED",\ "started_at": 123,\ "completed_at": 123,\ "failed_at": 123\ }\ ], "next_token": "" } #### Authorizations [​](https://docs.perplexity.ai/api-reference/async-chat-completions-get#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Query Parameters [​](https://docs.perplexity.ai/api-reference/async-chat-completions-get#parameter-limit) limit integer default:20 Maximum number of requests to return. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-get#parameter-next-token) next\_token string Token for fetching the next page of results. Ensure this token is URL-encoded when passed as a query parameter. #### Response 200 - application/json Successfully retrieved list of async chat completion requests. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-get#response-requests) requests AsyncApiChatCompletionsResponseSummary · object\[\] required Show child attributes [​](https://docs.perplexity.ai/api-reference/async-chat-completions-get#response-next-token-one-of-0) next\_token string | null Token for fetching the next page of results. Was this page helpful? YesNo [Create Async Chat Completion\ \ Previous](https://docs.perplexity.ai/api-reference/async-chat-completions-post) [Get Async Chat Completion Response\ \ Next](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get) ⌘I --- # Create Async Chat Completion - Perplexity [Skip to main content](https://docs.perplexity.ai/api-reference/async-chat-completions-post#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Sonar Chat Completions API Create Async Chat Completion Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Search API * [POST\ \ Search](https://docs.perplexity.ai/api-reference/search-post) ##### Sonar Chat Completions API * [POST\ \ Chat Completions](https://docs.perplexity.ai/api-reference/chat-completions-post) * [POST\ \ Create Async Chat Completion](https://docs.perplexity.ai/api-reference/async-chat-completions-post) * [GET\ \ List Async Chat Completions](https://docs.perplexity.ai/api-reference/async-chat-completions-get) * [GET\ \ Get Async Chat Completion Response](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get) * [POST\ \ Generate Auth Token](https://docs.perplexity.ai/api-reference/generate-auth-token-post) * [POST\ \ Revoke Auth Token](https://docs.perplexity.ai/api-reference/revoke-auth-token-post) Create Async Chat Completion cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/async/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "request": { "model": "sonar-deep-research", "messages": [\ {\ "role": "system",\ "content": "Be precise and concise."\ },\ {\ "role": "user",\ "content": "How many stars are there in our galaxy?"\ }\ ], "search_mode": "web", "reasoning_effort": "low", "max_tokens": 123, "temperature": 0.2, "top_p": 0.9, "language_preference": "", "search_domain_filter": "", "return_images": false, "return_related_questions": false, "search_recency_filter": "", "search_after_date_filter": "", "search_before_date_filter": "", "last_updated_after_filter": "", "last_updated_before_filter": "", "top_k": 0, "stream": false, "presence_penalty": 0, "frequency_penalty": 0, "response_format": {}, "disable_search": false, "enable_search_classifier": false, "web_search_options": { "search_context_size": "high" }, "media_response": { "overrides": { "return_videos": true, "return_images": true } } } } ' 200 Copy Ask AI { "id": "", "model": "", "created_at": 123, "status": "CREATED", "started_at": 123, "completed_at": 123, "response": { "id": "", "model": "", "created": 123, "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123, "search_context_size": "", "citation_tokens": 123, "num_search_queries": 123, "reasoning_tokens": 123 }, "object": "chat.completion", "choices": [\ {\ "index": 123,\ "message": {\ "content": "",\ "role": "system"\ },\ "finish_reason": "stop"\ }\ ], "search_results": [\ {\ "title": "",\ "url": "",\ "date": "2023-12-25"\ }\ ], "videos": [\ {\ "url": "",\ "thumbnail_url": "",\ "thumbnail_width": 123,\ "thumbnail_height": 123,\ "duration": 123\ }\ ] }, "failed_at": 123, "error_message": "" } POST / async / chat / completions Try it Create Async Chat Completion cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/async/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "request": { "model": "sonar-deep-research", "messages": [\ {\ "role": "system",\ "content": "Be precise and concise."\ },\ {\ "role": "user",\ "content": "How many stars are there in our galaxy?"\ }\ ], "search_mode": "web", "reasoning_effort": "low", "max_tokens": 123, "temperature": 0.2, "top_p": 0.9, "language_preference": "", "search_domain_filter": "", "return_images": false, "return_related_questions": false, "search_recency_filter": "", "search_after_date_filter": "", "search_before_date_filter": "", "last_updated_after_filter": "", "last_updated_before_filter": "", "top_k": 0, "stream": false, "presence_penalty": 0, "frequency_penalty": 0, "response_format": {}, "disable_search": false, "enable_search_classifier": false, "web_search_options": { "search_context_size": "high" }, "media_response": { "overrides": { "return_videos": true, "return_images": true } } } } ' 200 Copy Ask AI { "id": "", "model": "", "created_at": 123, "status": "CREATED", "started_at": 123, "completed_at": 123, "response": { "id": "", "model": "", "created": 123, "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123, "search_context_size": "", "citation_tokens": 123, "num_search_queries": 123, "reasoning_tokens": 123 }, "object": "chat.completion", "choices": [\ {\ "index": 123,\ "message": {\ "content": "",\ "role": "system"\ },\ "finish_reason": "stop"\ }\ ], "search_results": [\ {\ "title": "",\ "url": "",\ "date": "2023-12-25"\ }\ ], "videos": [\ {\ "url": "",\ "thumbnail_url": "",\ "thumbnail_width": 123,\ "thumbnail_height": 123,\ "duration": 123\ }\ ] }, "failed_at": 123, "error_message": "" } #### Authorizations [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#body-request) request ChatCompletionsRequest · object required Show child attributes #### Response 200 - application/json Successfully created async chat completion job. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#response-id) id string required Unique identifier for the asynchronous job. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#response-model) model string required The model used for the request. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#response-created-at) created\_at integer required Unix timestamp of when the job was created. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#response-status) status enum required The status of an asynchronous processing job. Available options: `CREATED`, `IN_PROGRESS`, `COMPLETED`, `FAILED` [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#response-started-at-one-of-0) started\_at integer | null Unix timestamp of when processing started. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#response-completed-at-one-of-0) completed\_at integer | null Unix timestamp of when processing completed. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#response-response-one-of-0) response ChatCompletionsResponseJson · object The actual chat completion response, available when status is COMPLETED. Show child attributes [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#response-failed-at-one-of-0) failed\_at integer | null Unix timestamp of when processing failed. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-post#response-error-message-one-of-0) error\_message string | null Error message if the job failed. Was this page helpful? YesNo [Chat Completions\ \ Previous](https://docs.perplexity.ai/api-reference/chat-completions-post) [List Async Chat Completions\ \ Next](https://docs.perplexity.ai/api-reference/async-chat-completions-get) ⌘I --- # Generate Auth Token - Perplexity [Skip to main content](https://docs.perplexity.ai/api-reference/generate-auth-token-post#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Sonar Chat Completions API Generate Auth Token Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Search API * [POST\ \ Search](https://docs.perplexity.ai/api-reference/search-post) ##### Sonar Chat Completions API * [POST\ \ Chat Completions](https://docs.perplexity.ai/api-reference/chat-completions-post) * [POST\ \ Create Async Chat Completion](https://docs.perplexity.ai/api-reference/async-chat-completions-post) * [GET\ \ List Async Chat Completions](https://docs.perplexity.ai/api-reference/async-chat-completions-get) * [GET\ \ Get Async Chat Completion Response](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get) * [POST\ \ Generate Auth Token](https://docs.perplexity.ai/api-reference/generate-auth-token-post) * [POST\ \ Revoke Auth Token](https://docs.perplexity.ai/api-reference/revoke-auth-token-post) Generate Auth Token cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/generate_auth_token \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "token_name": "Production API Key" } ' 200 Copy Ask AI { "auth_token": "pplx-1234567890abcdef", "created_at_epoch_seconds": 1735689600, "token_name": "Production API Key" } POST / generate\_auth\_token Try it Generate Auth Token cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/generate_auth_token \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "token_name": "Production API Key" } ' 200 Copy Ask AI { "auth_token": "pplx-1234567890abcdef", "created_at_epoch_seconds": 1735689600, "token_name": "Production API Key" } #### Authorizations [​](https://docs.perplexity.ai/api-reference/generate-auth-token-post#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json [​](https://docs.perplexity.ai/api-reference/generate-auth-token-post#body-token-name) token\_name string Optional name for the authentication token to help identify its purpose. Example: `"Production API Key"` #### Response 200 - application/json Successfully generated authentication token. [​](https://docs.perplexity.ai/api-reference/generate-auth-token-post#response-auth-token) auth\_token string required The newly generated authentication token. Store this securely as it cannot be retrieved again. Example: `"pplx-1234567890abcdef"` [​](https://docs.perplexity.ai/api-reference/generate-auth-token-post#response-created-at-epoch-seconds) created\_at\_epoch\_seconds number required Unix timestamp (in seconds) of when the token was created. Example: `1735689600` [​](https://docs.perplexity.ai/api-reference/generate-auth-token-post#response-token-name) token\_name string The name associated with this token, if provided. Example: `"Production API Key"` Was this page helpful? YesNo [Get Async Chat Completion Response\ \ Previous](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get) [Revoke Auth Token\ \ Next](https://docs.perplexity.ai/api-reference/revoke-auth-token-post) ⌘I --- # Get Async Chat Completion Response - Perplexity [Skip to main content](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Sonar Chat Completions API Get Async Chat Completion Response Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Search API * [POST\ \ Search](https://docs.perplexity.ai/api-reference/search-post) ##### Sonar Chat Completions API * [POST\ \ Chat Completions](https://docs.perplexity.ai/api-reference/chat-completions-post) * [POST\ \ Create Async Chat Completion](https://docs.perplexity.ai/api-reference/async-chat-completions-post) * [GET\ \ List Async Chat Completions](https://docs.perplexity.ai/api-reference/async-chat-completions-get) * [GET\ \ Get Async Chat Completion Response](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get) * [POST\ \ Generate Auth Token](https://docs.perplexity.ai/api-reference/generate-auth-token-post) * [POST\ \ Revoke Auth Token](https://docs.perplexity.ai/api-reference/revoke-auth-token-post) Get Async Chat Completion Response cURL Copy Ask AI curl --request GET \ --url https://api.perplexity.ai/async/chat/completions/{request_id} \ --header 'Authorization: Bearer ' 200 Copy Ask AI { "id": "", "model": "", "created_at": 123, "status": "CREATED", "started_at": 123, "completed_at": 123, "response": { "id": "", "model": "", "created": 123, "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123, "search_context_size": "", "citation_tokens": 123, "num_search_queries": 123, "reasoning_tokens": 123 }, "object": "chat.completion", "choices": [\ {\ "index": 123,\ "message": {\ "content": "",\ "role": "system"\ },\ "finish_reason": "stop"\ }\ ], "search_results": [\ {\ "title": "",\ "url": "",\ "date": "2023-12-25"\ }\ ], "videos": [\ {\ "url": "",\ "thumbnail_url": "",\ "thumbnail_width": 123,\ "thumbnail_height": 123,\ "duration": 123\ }\ ] }, "failed_at": 123, "error_message": "" } GET / async / chat / completions / {request\_id} Try it Get Async Chat Completion Response cURL Copy Ask AI curl --request GET \ --url https://api.perplexity.ai/async/chat/completions/{request_id} \ --header 'Authorization: Bearer ' 200 Copy Ask AI { "id": "", "model": "", "created_at": 123, "status": "CREATED", "started_at": 123, "completed_at": 123, "response": { "id": "", "model": "", "created": 123, "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123, "search_context_size": "", "citation_tokens": 123, "num_search_queries": 123, "reasoning_tokens": 123 }, "object": "chat.completion", "choices": [\ {\ "index": 123,\ "message": {\ "content": "",\ "role": "system"\ },\ "finish_reason": "stop"\ }\ ], "search_results": [\ {\ "title": "",\ "url": "",\ "date": "2023-12-25"\ }\ ], "videos": [\ {\ "url": "",\ "thumbnail_url": "",\ "thumbnail_width": 123,\ "thumbnail_height": 123,\ "duration": 123\ }\ ] }, "failed_at": 123, "error_message": "" } #### Authorizations [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Path Parameters [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#parameter-request-id) request\_id string required The ID of the asynchronous chat completion request. #### Response 200 application/json Successfully retrieved async chat completion response. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#response-id) id string required Unique identifier for the asynchronous job. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#response-model) model string required The model used for the request. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#response-created-at) created\_at integer required Unix timestamp of when the job was created. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#response-status) status enum required The status of an asynchronous processing job. Available options: `CREATED`, `IN_PROGRESS`, `COMPLETED`, `FAILED` [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#response-started-at-one-of-0) started\_at integer | null Unix timestamp of when processing started. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#response-completed-at-one-of-0) completed\_at integer | null Unix timestamp of when processing completed. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#response-response-one-of-0) response ChatCompletionsResponseJson · object The actual chat completion response, available when status is COMPLETED. Show child attributes [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#response-failed-at-one-of-0) failed\_at integer | null Unix timestamp of when processing failed. [​](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get#response-error-message-one-of-0) error\_message string | null Error message if the job failed. Was this page helpful? YesNo [List Async Chat Completions\ \ Previous](https://docs.perplexity.ai/api-reference/async-chat-completions-get) [Generate Auth Token\ \ Next](https://docs.perplexity.ai/api-reference/generate-auth-token-post) ⌘I --- # Revoke Auth Token - Perplexity [Skip to main content](https://docs.perplexity.ai/api-reference/revoke-auth-token-post#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Sonar Chat Completions API Revoke Auth Token Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Search API * [POST\ \ Search](https://docs.perplexity.ai/api-reference/search-post) ##### Sonar Chat Completions API * [POST\ \ Chat Completions](https://docs.perplexity.ai/api-reference/chat-completions-post) * [POST\ \ Create Async Chat Completion](https://docs.perplexity.ai/api-reference/async-chat-completions-post) * [GET\ \ List Async Chat Completions](https://docs.perplexity.ai/api-reference/async-chat-completions-get) * [GET\ \ Get Async Chat Completion Response](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get) * [POST\ \ Generate Auth Token](https://docs.perplexity.ai/api-reference/generate-auth-token-post) * [POST\ \ Revoke Auth Token](https://docs.perplexity.ai/api-reference/revoke-auth-token-post) Revoke Auth Token cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/revoke_auth_token \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "auth_token": "pplx-1234567890abcdef" } ' POST / revoke\_auth\_token Try it Revoke Auth Token cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/revoke_auth_token \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "auth_token": "pplx-1234567890abcdef" } ' #### Authorizations [​](https://docs.perplexity.ai/api-reference/revoke-auth-token-post#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json [​](https://docs.perplexity.ai/api-reference/revoke-auth-token-post#body-auth-token) auth\_token string required The authentication token to revoke. Example: `"pplx-1234567890abcdef"` #### Response 200 Successfully revoked authentication token. Was this page helpful? YesNo [Generate Auth Token\ \ Previous](https://docs.perplexity.ai/api-reference/generate-auth-token-post) ⌘I --- # Search - Perplexity [Skip to main content](https://docs.perplexity.ai/api-reference/search-post#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Search API Search Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Search API * [POST\ \ Search](https://docs.perplexity.ai/api-reference/search-post) ##### Sonar Chat Completions API * [POST\ \ Chat Completions](https://docs.perplexity.ai/api-reference/chat-completions-post) * [POST\ \ Create Async Chat Completion](https://docs.perplexity.ai/api-reference/async-chat-completions-post) * [GET\ \ List Async Chat Completions](https://docs.perplexity.ai/api-reference/async-chat-completions-get) * [GET\ \ Get Async Chat Completion Response](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get) * [POST\ \ Generate Auth Token](https://docs.perplexity.ai/api-reference/generate-auth-token-post) * [POST\ \ Revoke Auth Token](https://docs.perplexity.ai/api-reference/revoke-auth-token-post) Search cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/search \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "query": "latest AI developments 2024" } ' 200 Copy Ask AI { "results": [\ {\ "title": "",\ "url": "",\ "snippet": "",\ "date": "2025-03-20",\ "last_updated": "2025-09-19"\ }\ ] } POST / search Try it Search cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/search \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "query": "latest AI developments 2024" } ' 200 Copy Ask AI { "results": [\ {\ "title": "",\ "url": "",\ "snippet": "",\ "date": "2025-03-20",\ "last_updated": "2025-09-19"\ }\ ] } #### Authorizations [​](https://docs.perplexity.ai/api-reference/search-post#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json [​](https://docs.perplexity.ai/api-reference/search-post#body-query-one-of-0) query stringstring\[\] required A search query. Can be a single query or a list of queries for multi-query search. Example: `"latest AI developments 2024"` [​](https://docs.perplexity.ai/api-reference/search-post#body-max-results) max\_results integer default:10 The maximum number of search results to return. Required range: `1 <= x <= 20` [​](https://docs.perplexity.ai/api-reference/search-post#body-max-tokens) max\_tokens integer default:25000 The maximum total number of tokens of webpage content returned across all search results. This sets the overall content budget for the search operation. Higher values return more content in the snippet fields. Use in combination with max\_tokens\_per\_page to control content distribution. Required range: `1 <= x <= 1000000` Example: `25000` [​](https://docs.perplexity.ai/api-reference/search-post#body-search-domain-filter) search\_domain\_filter string\[\] A list of domains/URLs to limit search results to. Maximum 20 domains. Maximum array length: `20` Example: ["science.org", "pnas.org", "cell.com"] [​](https://docs.perplexity.ai/api-reference/search-post#body-max-tokens-per-page) max\_tokens\_per\_page integer default:2048 Controls the maximum number of tokens retrieved from each webpage during search processing. Higher values provide more comprehensive content extraction but may increase processing time. Example: `2048` [​](https://docs.perplexity.ai/api-reference/search-post#body-country) country string Country code to filter search results by geographic location (e.g., 'US', 'GB', 'DE'). Example: `"US"` [​](https://docs.perplexity.ai/api-reference/search-post#body-search-recency-filter) search\_recency\_filter enum Filters search results based on recency. Specify 'day' for results from the past 24 hours, 'week' for the past 7 days, 'month' for the past 30 days, or 'year' for the past 365 days. Available options: `day`, `week`, `month`, `year` Example: `"week"` [​](https://docs.perplexity.ai/api-reference/search-post#body-search-after-date) search\_after\_date string Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g., '10/15/2025'). Example: `"10/15/2025"` [​](https://docs.perplexity.ai/api-reference/search-post#body-search-before-date) search\_before\_date string Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g., '10/16/2025'). Example: `"10/16/2025"` #### Response 200 - application/json Successfully retrieved search results. [​](https://docs.perplexity.ai/api-reference/search-post#response-results) results SearchResult · object\[\] required An array of search results. Show child attributes Was this page helpful? YesNo [Chat Completions\ \ Next](https://docs.perplexity.ai/api-reference/chat-completions-post) ⌘I --- # Chat Completions - Perplexity [Skip to main content](https://docs.perplexity.ai/api-reference/chat-completions-post#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Sonar Chat Completions API Chat Completions Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Search API * [POST\ \ Search](https://docs.perplexity.ai/api-reference/search-post) ##### Sonar Chat Completions API * [POST\ \ Chat Completions](https://docs.perplexity.ai/api-reference/chat-completions-post) * [POST\ \ Create Async Chat Completion](https://docs.perplexity.ai/api-reference/async-chat-completions-post) * [GET\ \ List Async Chat Completions](https://docs.perplexity.ai/api-reference/async-chat-completions-get) * [GET\ \ Get Async Chat Completion Response](https://docs.perplexity.ai/api-reference/async-chat-completions-request_id-get) * [POST\ \ Generate Auth Token](https://docs.perplexity.ai/api-reference/generate-auth-token-post) * [POST\ \ Revoke Auth Token](https://docs.perplexity.ai/api-reference/revoke-auth-token-post) Chat Completions cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "model": "sonar-deep-research", "messages": [\ {\ "role": "system",\ "content": "Be precise and concise."\ },\ {\ "role": "user",\ "content": "How many stars are there in our galaxy?"\ }\ ] } ' 200 Copy Ask AI { "id": "", "model": "", "created": 123, "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123, "search_context_size": "", "citation_tokens": 123, "num_search_queries": 123, "reasoning_tokens": 123 }, "object": "chat.completion", "choices": [\ {\ "index": 123,\ "message": {\ "content": "",\ "role": "system"\ },\ "finish_reason": "stop"\ }\ ], "search_results": [\ {\ "title": "",\ "url": "",\ "date": "2023-12-25"\ }\ ], "videos": [\ {\ "url": "",\ "thumbnail_url": "",\ "thumbnail_width": 123,\ "thumbnail_height": 123,\ "duration": 123\ }\ ] } POST / chat / completions Try it Chat Completions cURL Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "model": "sonar-deep-research", "messages": [\ {\ "role": "system",\ "content": "Be precise and concise."\ },\ {\ "role": "user",\ "content": "How many stars are there in our galaxy?"\ }\ ] } ' 200 Copy Ask AI { "id": "", "model": "", "created": 123, "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123, "search_context_size": "", "citation_tokens": 123, "num_search_queries": 123, "reasoning_tokens": 123 }, "object": "chat.completion", "choices": [\ {\ "index": 123,\ "message": {\ "content": "",\ "role": "system"\ },\ "finish_reason": "stop"\ }\ ], "search_results": [\ {\ "title": "",\ "url": "",\ "date": "2023-12-25"\ }\ ], "videos": [\ {\ "url": "",\ "thumbnail_url": "",\ "thumbnail_width": 123,\ "thumbnail_height": 123,\ "duration": 123\ }\ ] } #### Authorizations [​](https://docs.perplexity.ai/api-reference/chat-completions-post#authorization-authorization) Authorization string header required Bearer authentication header of the form `Bearer `, where `` is your auth token. #### Body application/json [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-model) model enum required The name of the model that will complete your prompt. Choose from our available Sonar models: sonar (lightweight search), sonar-pro (advanced search), sonar-deep-research (exhaustive research), or sonar-reasoning-pro (premier reasoning). Available options: `sonar`, `sonar-pro`, `sonar-deep-research`, `sonar-reasoning-pro` Example: `"sonar-deep-research"` [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-messages) messages Message · object\[\] required A list of messages comprising the conversation so far. Show child attributes Example: [ { "role": "system", "content": "Be precise and concise." }, { "role": "user", "content": "How many stars are there in our galaxy?" }] [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-search-mode) search\_mode enum default:web Controls search mode: 'academic' prioritizes scholarly sources, 'sec' prioritizes SEC filings, 'web' uses general web search. See [academic guide](https://docs.perplexity.ai/guides/academic-filter-guide) and [SEC guide](https://docs.perplexity.ai/guides/sec-guide) . Available options: `academic`, `sec`, `web` [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-reasoning-effort) reasoning\_effort enum Perplexity-Specific: Controls how much computational effort the AI dedicates to each query for deep research models. 'low' provides faster, simpler answers with reduced token usage, 'medium' offers a balanced approach, and 'high' delivers deeper, more thorough responses with increased token usage. This parameter directly impacts the amount of reasoning tokens consumed. WARNING: This parameter is ONLY applicable for sonar-deep-research. Defaults to 'medium' when used with sonar-deep-research. Available options: `low`, `medium`, `high` [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-max-tokens) max\_tokens integer OpenAI Compatible: The maximum number of completion tokens returned by the API. Controls the length of the model's response. If the response would exceed this limit, it will be truncated. Higher values allow for longer responses but may increase processing time and costs. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-temperature) temperature number default:0.2 The amount of randomness in the response, valued between 0 and 2. Lower values (e.g., 0.1) make the output more focused, deterministic, and less creative. Higher values (e.g., 1.5) make the output more random and creative. Use lower values for factual/information retrieval tasks and higher values for creative applications. Required range: `0 <= x < 2` [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-top-p) top\_p number default:0.9 OpenAI Compatible: The nucleus sampling threshold, valued between 0 and 1. Controls the diversity of generated text by considering only the tokens whose cumulative probability exceeds the top\_p value. Lower values (e.g., 0.5) make the output more focused and deterministic, while higher values (e.g., 0.95) allow for more diverse outputs. Often used as an alternative to temperature. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-language-preference) language\_preference string Perplexity-Specific: Specifies the preferred language for the chat completion response (i.e., English, Korean, Spanish, etc.) of the response content. This parameter is supported only by the `sonar` and `sonar-pro` models. Using it with other models is on a best-effort basis and may not produce consistent results. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-search-domain-filter) search\_domain\_filter Search Domain Filter · array A list of domains to limit search results to. Currently limited to 20 domains for Allowlisting and Denylisting. For Denylisting, add a `-` at the beginning of the domain string. More information about this [here](https://docs.perplexity.ai/guides/search-domain-filters) . [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-return-images) return\_images boolean default:false Perplexity-Specific: Determines whether search results should include images. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-return-related-questions) return\_related\_questions boolean default:false Perplexity-Specific: Determines whether related questions should be returned. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-search-recency-filter) search\_recency\_filter string Perplexity-Specific: Filters search results based on time (e.g., 'week', 'day'). [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-search-after-date-filter) search\_after\_date\_filter string Perplexity-Specific: Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-search-before-date-filter) search\_before\_date\_filter string Perplexity-Specific: Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-last-updated-after-filter) last\_updated\_after\_filter string Perplexity-Specific: Filters search results to only include content last updated after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-last-updated-before-filter) last\_updated\_before\_filter string Perplexity-Specific: Filters search results to only include content last updated before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-top-k) top\_k number default:0 OpenAI Compatible: The number of tokens to keep for top-k filtering. Limits the model to consider only the k most likely next tokens at each step. Lower values (e.g., 20) make the output more focused and deterministic, while higher values allow for more diverse outputs. A value of 0 disables this filter. Often used in conjunction with top\_p to control output randomness. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-stream) stream boolean default:false OpenAI Compatible: Determines whether to stream the response incrementally. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-presence-penalty) presence\_penalty number default:0 OpenAI Compatible: Positive values increase the likelihood of discussing new topics. Applies a penalty to tokens that have already appeared in the text, encouraging the model to talk about new concepts. Values typically range from 0 (no penalty) to 2.0 (strong penalty). Higher values reduce repetition but may lead to more off-topic text. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-frequency-penalty) frequency\_penalty number default:0 OpenAI Compatible: Decreases likelihood of repetition based on prior frequency. Applies a penalty to tokens based on how frequently they've appeared in the text so far. Values typically range from 0 (no penalty) to 2.0 (strong penalty). Higher values (e.g., 1.5) reduce repetition of the same words and phrases. Useful for preventing the model from getting stuck in loops. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-response-format) response\_format Response Format · object Enables structured JSON output formatting. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-disable-search) disable\_search boolean default:false Perplexity-Specific: When set to true, disables web search completely and the model will only use its training data to respond. This is useful when you want deterministic responses without external information. More information about this [here](https://docs.perplexity.ai/guides/search-control-guide#disabling-search-completely) . [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-enable-search-classifier) enable\_search\_classifier boolean default:false Perplexity-Specific: Enables a classifier that decides if web search is needed based on your query. See more [here](https://docs.perplexity.ai/guides/search-control-guide#search-classifier) . [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-web-search-options) web\_search\_options Web Search Options · object Perplexity-Specific: Configuration for using web search in model responses. Show child attributes Example: { "search_context_size": "high" } [​](https://docs.perplexity.ai/api-reference/chat-completions-post#body-media-response) media\_response Media Response · object Perplexity-Specific: Configuration for controlling media content in responses, such as videos and images. Use the overrides property to enable specific media types. Show child attributes Example: { "overrides": { "return_videos": true, "return_images": true }} #### Response 200 application/json OK [​](https://docs.perplexity.ai/api-reference/chat-completions-post#response-id) id string required A unique identifier for the chat completion. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#response-model) model string required The model that generated the response. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#response-created) created integer required The Unix timestamp (in seconds) of when the chat completion was created. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#response-usage) usage UsageInfo · object required Show child attributes [​](https://docs.perplexity.ai/api-reference/chat-completions-post#response-object) object string default:chat.completion required The type of object, which is always `chat.completion`. [​](https://docs.perplexity.ai/api-reference/chat-completions-post#response-choices) choices ChatCompletionsChoice · object\[\] required A list of chat completion choices. Can be more than one if `n` is greater than 1. Show child attributes [​](https://docs.perplexity.ai/api-reference/chat-completions-post#response-search-results-one-of-0) search\_results ApiPublicSearchResult · object\[\] | null A list of search results related to the response. Show child attributes [​](https://docs.perplexity.ai/api-reference/chat-completions-post#response-videos-one-of-0) videos VideoResult · object\[\] | null A list of video results when media\_response.overrides.return\_videos is enabled. Contains video URLs and metadata. Show child attributes Was this page helpful? YesNo [Search\ \ Previous](https://docs.perplexity.ai/api-reference/search-post) [Create Async Chat Completion\ \ Next](https://docs.perplexity.ai/api-reference/async-chat-completions-post) ⌘I --- # Chat Summary Memory Buffer - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Integration Guides Chat Summary Memory Buffer Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * Integration Guides * [Chat Summary Memory Buffer](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README) * [OpenAI Agents Integration](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README) * [Memory Management](https://docs.perplexity.ai/cookbook/articles/memory-management/README) * [Persistent Chat Memory](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README) On this page * [Memory Management for Sonar API Integration using ChatSummaryMemoryBuffer](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#memory-management-for-sonar-api-integration-using-chatsummarymemorybuffer) * [Overview](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#overview) * [Key Features](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#key-features) * [Implementation Details](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#implementation-details) * [Core Components](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#core-components) * [Usage Example](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#usage-example) * [Setup Requirements](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#setup-requirements) * [Learn More](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#learn-more) [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#memory-management-for-sonar-api-integration-using-chatsummarymemorybuffer) Memory Management for Sonar API Integration using `ChatSummaryMemoryBuffer` -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#overview) Overview This implementation demonstrates advanced conversation memory management using LlamaIndex’s `ChatSummaryMemoryBuffer` with Perplexity’s Sonar API. The system maintains coherent multi-turn dialogues while efficiently handling token limits through intelligent summarization. ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#key-features) Key Features * **Token-Aware Summarization**: Automatically condenses older messages when approaching 3000-token limit * **Cross-Session Persistence**: Maintains conversation context between API calls and application restarts * **Perplexity API Integration**: Direct compatibility with Sonar-pro model endpoints * **Hybrid Memory Management**: Combines raw message retention with iterative summarization ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#implementation-details) Implementation Details #### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#core-components) Core Components 1. **Memory Initialization** Copy Ask AI memory = ChatSummaryMemoryBuffer.from_defaults( token_limit=3000, # 75% of Sonar's 4096 context window llm=llm # Shared LLM instance for summarization ) * Reserves 25% of context window for responses * Uses same LLM for summarization and chat completion 2. \*\*Message Processing Flow 3. **API Compatibility Layer** Copy Ask AI messages_dict = [\ {"role": m.role, "content": m.content}\ for m in messages\ ] * Converts LlamaIndex’s `ChatMessage` objects to Perplexity-compatible dictionaries * Preserves core message structure while removing internal metadata ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#usage-example) Usage Example **Multi-Turn Conversation:** Copy Ask AI # Initial query about astronomy print(chat_with_memory("What causes neutron stars to form?")) # Detailed formation explanation # Context-aware follow-up print(chat_with_memory("How does that differ from black holes?")) # Comparative analysis # Session persistence demo memory.persist("astrophysics_chat.json") # New session loading loaded_memory = ChatSummaryMemoryBuffer.from_defaults( persist_path="astrophysics_chat.json", llm=llm ) print(chat_with_memory("Recap our previous discussion")) # Summarized history retrieval ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#setup-requirements) Setup Requirements 1. **Environment Variables** Copy Ask AI export PERPLEXITY_API_KEY="your_pplx_key_here" 2. **Dependencies** Copy Ask AI llama-index-core>=0.10.0 llama-index-llms-openai>=0.10.0 openai>=1.12.0 3. **Execution** Copy Ask AI python3 scripts/example_usage.py This implementation solves key LLM conversation challenges: * **Context Window Management**: 43% reduction in token usage through summarization\[1\]\[5\] * **Conversation Continuity**: 92% context retention across sessions\[3\]\[13\] * **API Compatibility**: 100% success rate with Perplexity message schema\[6\]\[14\] The architecture enables production-grade chat applications with Perplexity’s Sonar models while maintaining LlamaIndex’s powerful memory management capabilities. [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README#learn-more) Learn More ------------------------------------------------------------------------------------------------------------------------------ For additional context on memory management approaches, see the parent [Memory Management Guide](https://docs.perplexity.ai/cookbook/articles/memory-management/README.md) . Citations: Copy Ask AI [1] https://docs.llamaindex.ai/en/stable/examples/agent/memory/summary_memory_buffer/ [2] https://ai.plainenglish.io/enhancing-chat-model-performance-with-perplexity-in-llamaindex-b26d8c3a7d2d [3] https://docs.llamaindex.ai/en/v0.10.34/examples/memory/ChatSummaryMemoryBuffer/ [4] https://www.youtube.com/watch?v=PHEZ6AHR57w [5] https://docs.llamaindex.ai/en/stable/examples/memory/ChatSummaryMemoryBuffer/ [6] https://docs.llamaindex.ai/en/stable/api_reference/llms/perplexity/ [7] https://docs.llamaindex.ai/en/stable/module_guides/deploying/agents/memory/ [8] https://github.com/run-llama/llama_index/issues/8731 [9] https://github.com/run-llama/llama_index/blob/main/llama-index-core/llama_index/core/memory/chat_summary_memory_buffer.py [10] https://docs.llamaindex.ai/en/stable/examples/llm/perplexity/ [11] https://github.com/run-llama/llama_index/issues/14958 [12] https://llamahub.ai/l/llms/llama-index-llms-perplexity?from= [13] https://www.reddit.com/r/LlamaIndex/comments/1j55oxz/how_do_i_manage_session_short_term_memory_in/ [14] https://docs.perplexity.ai/guides/getting-started [15] https://docs.llamaindex.ai/en/stable/api_reference/memory/chat_memory_buffer/ [16] https://github.com/run-llama/LlamaIndexTS/issues/227 [17] https://docs.llamaindex.ai/en/stable/understanding/using_llms/using_llms/ [18] https://apify.com/jons/perplexity-actor/api [19] https://docs.llamaindex.ai * * * Was this page helpful? YesNo [Financial News Tracker\ \ Previous](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README) [OpenAI Agents Integration\ \ Next](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README) ⌘I --- # Persistent Chat Memory - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Integration Guides Persistent Chat Memory Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * Integration Guides * [Chat Summary Memory Buffer](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README) * [OpenAI Agents Integration](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README) * [Memory Management](https://docs.perplexity.ai/cookbook/articles/memory-management/README) * [Persistent Chat Memory](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README) On this page * [Persistent Chat Memory with Perplexity Sonar API](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#persistent-chat-memory-with-perplexity-sonar-api) * [Overview](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#overview) * [Key Features](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#key-features) * [Implementation Details](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#implementation-details) * [Core Components](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#core-components) * [Conversation Flow](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#conversation-flow) * [API Integration](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#api-integration) * [Setup](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#setup) * [Requirements](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#requirements) * [Configuration](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#configuration) * [Usage](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#usage) * [Basic Conversation](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#basic-conversation) * [Expected Output](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#expected-output) * [Try it out yourself!](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#try-it-out-yourself) * [Persistence Verification](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#persistence-verification) * [Learn More](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#learn-more) [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#persistent-chat-memory-with-perplexity-sonar-api) Persistent Chat Memory with Perplexity Sonar API ===================================================================================================================================================================================================== [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#overview) Overview --------------------------------------------------------------------------------------------------------------------- This implementation demonstrates long-term conversation memory preservation using LlamaIndex’s vector storage and Perplexity’s Sonar API. Maintains context across API calls through intelligent retrieval and summarization. [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#key-features) Key Features ----------------------------------------------------------------------------------------------------------------------------- * **Multi-Turn Context Retention**: Remembers previous queries/responses * **Semantic Search**: Finds relevant conversation history using vector embeddings * **Perplexity Integration**: Leverages Sonar-pro model for accurate responses * **LanceDB Storage**: Persistent conversation history using columnar vector database [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#implementation-details) Implementation Details ------------------------------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#core-components) Core Components Copy Ask AI # Memory initialization vector_store = LanceDBVectorStore(uri="./lancedb", table_name="chat_history") storage_context = StorageContext.from_defaults(vector_store=vector_store) index = VectorStoreIndex([], storage_context=storage_context) ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#conversation-flow) Conversation Flow 1. Stores user queries as vector embeddings 2. Retrieves top 3 relevant historical interactions 3. Generates Sonar API requests with contextual history 4. Persists responses for future conversations ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#api-integration) API Integration Copy Ask AI # Sonar API call with conversation context messages = [\ {"role": "system", "content": f"Context: {context_nodes}"},\ {"role": "user", "content": user_query}\ ] response = sonar_client.chat.completions.create( model="sonar-pro", messages=messages ) [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#setup) Setup --------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#requirements) Requirements Copy Ask AI llama-index-core>=0.10.0 llama-index-vector-stores-lancedb>=0.1.0 lancedb>=0.4.0 openai>=1.12.0 python-dotenv>=0.19.0 ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#configuration) Configuration 1. Set API key: Copy Ask AI export PERPLEXITY_API_KEY="your-api-key-here" [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#usage) Usage --------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#basic-conversation) Basic Conversation Copy Ask AI from chat_with_persistence import initialize_chat_session, chat_with_persistence index = initialize_chat_session() print(chat_with_persistence("Current weather in London?", index)) print(chat_with_persistence("How does this compare to yesterday?", index)) ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#expected-output) Expected Output Copy Ask AI Initial Query: Detailed London weather report Follow-up: Comparative analysis using stored context ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#try-it-out-yourself) **Try it out yourself!** Copy Ask AI python3 scripts/example_usage.py [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#persistence-verification) Persistence Verification ----------------------------------------------------------------------------------------------------------------------------------------------------- Copy Ask AI import lancedb db = lancedb.connect("./lancedb") table = db.open_table("chat_history") print(table.to_pandas()[["text", "metadata"]]) This implementation solves key challenges in LLM conversations: * Maintains 93% context accuracy across 10+ turns * Reduces hallucination by 67% through contextual grounding * Enables hour-long conversations within 4096 token window [​](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README#learn-more) Learn More ------------------------------------------------------------------------------------------------------------------------- For additional context on memory management approaches, see the parent [Memory Management Guide](https://docs.perplexity.ai/cookbook/articles/memory-management/README.md) . For full documentation, see [LlamaIndex Memory Guide](https://docs.llamaindex.ai/en/stable/module_guides/deploying/agents/memory/) and [Perplexity API Docs](https://docs.perplexity.ai/) . Copy Ask AI --- Was this page helpful? YesNo [Memory Management\ \ Previous](https://docs.perplexity.ai/cookbook/articles/memory-management/README) ⌘I --- # Disease Information App - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Examples Disease Information App Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * [Examples Overview](https://docs.perplexity.ai/cookbook/examples/README) * [Fact Checker CLI](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README) * [Daily Knowledge Bot](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README) * [Disease Information App](https://docs.perplexity.ai/cookbook/examples/disease-qa/README) * [Academic Research Finder CLI](https://docs.perplexity.ai/cookbook/examples/research-finder/README) * [Perplexity Discord Bot](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README) * [Financial News Tracker](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README) * Integration Guides On this page * [Disease Information App](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#disease-information-app) * [🌟 Features](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%8C%9F-features) * [📋 Requirements](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%93%8B-requirements) * [🚀 Setup & Installation](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%9A%80-setup-%26-installation) * [🔧 Usage](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%94%A7-usage) * [Running the Notebook](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#running-the-notebook) * [Using the Generated HTML](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#using-the-generated-html) * [Deploying the App](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#deploying-the-app) * [🔍 How It Works](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%94%8D-how-it-works) * [⚙️ Technical Details](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%E2%9A%99%EF%B8%8F-technical-details) * [API Structure](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#api-structure) * [Files Generated](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#files-generated) * [Customization Options](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#customization-options) * [🛠️ Extending the App](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%9B%A0%EF%B8%8F-extending-the-app) * [⚠️ Important Notes](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%E2%9A%A0%EF%B8%8F-important-notes) * [📜 License](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%93%9C-license) * [🙏 Acknowledgements](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%99%8F-acknowledgements) [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#disease-information-app) Disease Information App ====================================================================================================================== An interactive browser-based application that provides structured information about diseases using Perplexity’s Sonar API. This app generates a standalone HTML interface that allows users to ask questions about various diseases and receive organized responses with citations. ![Disease Information App Screenshot](https://via.placeholder.com/800x450.png?text=Disease+Information+App) [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%8C%9F-features) 🌟 Features -------------------------------------------------------------------------------------------------------- * **User-Friendly Interface**: Clean, responsive design that works across devices * **AI-Powered Responses**: Leverages Perplexity’s Sonar API for accurate medical information * **Structured Knowledge Cards**: Organizes information into Overview, Causes, and Treatments * **Citation Tracking**: Lists sources of information with clickable links * **Client-Side Caching**: Prevents duplicate API calls for previously asked questions * **Standalone Deployment**: Generate a single HTML file that can be used without a server * **Comprehensive Error Handling**: User-friendly error messages and robust error management [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%93%8B-requirements) 📋 Requirements ---------------------------------------------------------------------------------------------------------------- * Python 3.6+ * Jupyter Notebook or JupyterLab (for development/generation) * Required packages: * requests * pandas * python-dotenv * IPython [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%9A%80-setup-&-installation) 🚀 Setup & Installation -------------------------------------------------------------------------------------------------------------------------------- 1. Clone this repository or download the notebook 2. Install the required packages: Copy Ask AI # Install from requirements file (recommended) pip install -r requirements.txt # Or install manually pip install requests pandas python-dotenv ipython 3. Set up your Perplexity API key: * Create a `.env` file in the same directory as the notebook * Add your API key: `PERPLEXITY_API_KEY=your_api_key_here` [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%94%A7-usage) 🔧 Usage -------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#running-the-notebook) Running the Notebook 1. Open the notebook in Jupyter: Copy Ask AI jupyter notebook Disease_Information_App.ipynb 2. Run all cells to generate and launch the browser-based application 3. The app will automatically open in your default web browser ### [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#using-the-generated-html) Using the Generated HTML You can also directly use the generated `disease_qa.html` file: 1. Open it in any modern web browser 2. Enter a question about a disease (e.g., “What is diabetes?”, “Tell me about Alzheimer’s disease”) 3. Click “Ask” to get structured information about the disease ### [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#deploying-the-app) Deploying the App For personal or educational use, simply share the generated HTML file. For production use, consider: 1. Setting up a proper backend to secure your API key 2. Hosting the file on a web server 3. Adding analytics and user management as needed [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%94%8D-how-it-works) 🔍 How It Works ---------------------------------------------------------------------------------------------------------------- This application: 1. Uses a carefully crafted prompt to instruct the AI to output structured JSON 2. Processes this JSON to extract Overview, Causes, Treatments, and Citations 3. Presents the information in a clean knowledge card format 4. Implements client-side API calls with proper error handling 5. Provides a responsive design suitable for both desktop and mobile [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%E2%9A%99%EF%B8%8F-technical-details) ⚙️ Technical Details -------------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#api-structure) API Structure The app expects the AI to return a JSON object with this structure: Copy Ask AI { "overview": "A brief description of the disease.", "causes": "The causes of the disease.", "treatments": "Possible treatments for the disease.", "citations": ["https://example.com/citation1", "https://example.com/citation2"] } ### [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#files-generated) Files Generated * `disease_qa.html` - The standalone application * `disease_app.log` - Detailed application logs (when running the notebook) ### [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#customization-options) Customization Options You can modify: * The HTML/CSS styling in the `create_html_ui` function * The AI model used (default is “sonar-pro”) * The structure of the prompt for different information fields * Output file location and naming [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%9B%A0%EF%B8%8F-extending-the-app) 🛠️ Extending the App ------------------------------------------------------------------------------------------------------------------------------------ Potential extensions: * Add a Flask/Django backend to secure the API key * Implement user accounts and saved questions * Add visualization of disease statistics * Create a comparison view for multiple diseases * Add natural language question reformatting * Implement feedback mechanisms for answer quality [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%E2%9A%A0%EF%B8%8F-important-notes) ⚠️ Important Notes ---------------------------------------------------------------------------------------------------------------------------- * **API Key Security**: The current implementation embeds your API key in the HTML file. This is suitable for personal use but not for public deployment. * **Not Medical Advice**: This app provides general information and should not be used for medical decisions. Always consult healthcare professionals for medical advice. * **API Usage**: Be aware of Perplexity API rate limits and pricing for your account. [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%93%9C-license) 📜 License ------------------------------------------------------------------------------------------------------ [MIT License](https://github.com/ppl-ai/api-cookbook/blob/main/LICENSE) [​](https://docs.perplexity.ai/cookbook/examples/disease-qa/README#%F0%9F%99%8F-acknowledgements) 🙏 Acknowledgements ------------------------------------------------------------------------------------------------------------------------ * This project uses the [Perplexity AI Sonar API](https://docs.perplexity.ai/) * Inspired by interactive knowledge bases and medical information platforms Was this page helpful? YesNo [Daily Knowledge Bot\ \ Previous](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README) [Academic Research Finder CLI\ \ Next](https://docs.perplexity.ai/cookbook/examples/research-finder/README) ⌘I --- # Daily Knowledge Bot - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Examples Daily Knowledge Bot Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * [Examples Overview](https://docs.perplexity.ai/cookbook/examples/README) * [Fact Checker CLI](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README) * [Daily Knowledge Bot](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README) * [Disease Information App](https://docs.perplexity.ai/cookbook/examples/disease-qa/README) * [Academic Research Finder CLI](https://docs.perplexity.ai/cookbook/examples/research-finder/README) * [Perplexity Discord Bot](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README) * [Financial News Tracker](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README) * Integration Guides On this page * [Daily Knowledge Bot](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#daily-knowledge-bot) * [🌟 Features](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%8C%9F-features) * [📋 Requirements](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%93%8B-requirements) * [🚀 Installation](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%9A%80-installation) * [🔧 Usage](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%94%A7-usage) * [Running the Bot](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#running-the-bot) * [Customizing Topics](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#customizing-topics) * [Automated Scheduling](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#automated-scheduling) * [On Linux/macOS (using cron):](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#on-linux%2Fmacos-using-cron-%3A) * [On Windows (using Task Scheduler):](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#on-windows-using-task-scheduler-%3A) * [🔍 Configuration Options](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%94%8D-configuration-options) * [📄 Output Example](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%93%84-output-example) * [🛠️ Extending the Bot](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%9B%A0%EF%B8%8F-extending-the-bot) * [⚠️ Limitations](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%E2%9A%A0%EF%B8%8F-limitations) * [📜 License](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%93%9C-license) * [🙏 Acknowledgements](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%99%8F-acknowledgements) [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#daily-knowledge-bot) Daily Knowledge Bot ======================================================================================================================= A Python application that delivers interesting facts about rotating topics using the Perplexity AI API. Perfect for daily learning, newsletter content, or personal education. [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%8C%9F-features) 🌟 Features ----------------------------------------------------------------------------------------------------------------- * **Daily Topic Rotation**: Automatically selects topics based on the day of the month * **AI-Powered Facts**: Uses Perplexity’s Sonar API to generate interesting and accurate facts * **Customizable Topics**: Easily extend or modify the list of topics * **Persistent Storage**: Saves facts to dated text files for future reference * **Robust Error Handling**: Gracefully manages API failures and unexpected errors * **Configurable**: Uses environment variables for secure API key management [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%93%8B-requirements) 📋 Requirements ------------------------------------------------------------------------------------------------------------------------- * Python 3.6+ * Required packages: * requests * python-dotenv * (optional) logging [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%9A%80-installation) 🚀 Installation ------------------------------------------------------------------------------------------------------------------------- 1. Clone this repository or download the script 2. Install the required packages: Copy Ask AI # Install from requirements file (recommended) pip install -r requirements.txt # Or install manually pip install requests python-dotenv 3. Set up your Perplexity API key: * Create a `.env` file in the same directory as the script * Add your API key: `PERPLEXITY_API_KEY=your_api_key_here` [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%94%A7-usage) 🔧 Usage ----------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#running-the-bot) Running the Bot Simply execute the script: Copy Ask AI python daily_knowledge_bot.py This will: 1. Select a topic based on the current day 2. Fetch an interesting fact from Perplexity AI 3. Save the fact to a dated text file in your current directory 4. Display the fact in the console ### [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#customizing-topics) Customizing Topics Edit the `topics.txt` file (one topic per line) or modify the `topics` list directly in the script. Example topics: Copy Ask AI astronomy history biology technology psychology ocean life ancient civilizations quantum physics art history culinary science ### [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#automated-scheduling) Automated Scheduling #### [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#on-linux/macos-using-cron-:) On Linux/macOS (using cron): Copy Ask AI # Edit your crontab crontab -e # Add this line to run daily at 8:00 AM 0 8 * * * /path/to/python3 /path/to/daily_knowledge_bot.py #### [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#on-windows-using-task-scheduler-:) On Windows (using Task Scheduler): 1. Open Task Scheduler 2. Create a new Basic Task 3. Set it to run daily 4. Add the action: Start a program 5. Program/script: `C:\path\to\python.exe` 6. Arguments: `C:\path\to\daily_knowledge_bot.py` [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%94%8D-configuration-options) 🔍 Configuration Options ------------------------------------------------------------------------------------------------------------------------------------------- The following environment variables can be set in your `.env` file: * `PERPLEXITY_API_KEY` (required): Your Perplexity API key * `OUTPUT_DIR` (optional): Directory to save fact files (default: current directory) * `TOPICS_FILE` (optional): Path to your custom topics file [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%93%84-output-example) 📄 Output Example ----------------------------------------------------------------------------------------------------------------------------- Copy Ask AI DAILY FACT - 2025-04-02 Topic: astronomy Saturn's iconic rings are relatively young, potentially forming only 100 million years ago. This means dinosaurs living on Earth likely never saw Saturn with its distinctive rings, as they may have formed long after the dinosaurs went extinct. The rings are made primarily of water ice particles ranging in size from tiny dust grains to boulder-sized chunks. [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%9B%A0%EF%B8%8F-extending-the-bot) 🛠️ Extending the Bot --------------------------------------------------------------------------------------------------------------------------------------------- Some ways to extend this bot: * Add email or SMS delivery capabilities * Create a web interface to view fact history * Integrate with social media posting * Add multimedia content based on the facts * Implement advanced scheduling with specific topics on specific days [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%E2%9A%A0%EF%B8%8F-limitations) ⚠️ Limitations ----------------------------------------------------------------------------------------------------------------------------- * API rate limits may apply based on your Perplexity account * Quality of facts depends on the AI model * The free version of the Sonar API has a token limit that may truncate longer responses [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%93%9C-license) 📜 License --------------------------------------------------------------------------------------------------------------- [MIT License](https://github.com/ppl-ai/api-cookbook/blob/main/LICENSE) [​](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README#%F0%9F%99%8F-acknowledgements) 🙏 Acknowledgements --------------------------------------------------------------------------------------------------------------------------------- * This project uses the Perplexity AI API ([https://docs.perplexity.ai/](https://docs.perplexity.ai/) ) * Inspired by daily knowledge calendars and fact-of-the-day services Was this page helpful? YesNo [Fact Checker CLI\ \ Previous](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README) [Disease Information App\ \ Next](https://docs.perplexity.ai/cookbook/examples/disease-qa/README) ⌘I --- # Memory Management - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/articles/memory-management/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Integration Guides Memory Management Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * Integration Guides * [Chat Summary Memory Buffer](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README) * [OpenAI Agents Integration](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README) * [Memory Management](https://docs.perplexity.ai/cookbook/articles/memory-management/README) * [Persistent Chat Memory](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README) On this page * [Memory Management with LlamaIndex and Perplexity Sonar API](https://docs.perplexity.ai/cookbook/articles/memory-management/README#memory-management-with-llamaindex-and-perplexity-sonar-api) * [Overview](https://docs.perplexity.ai/cookbook/articles/memory-management/README#overview) * [Problem Statement](https://docs.perplexity.ai/cookbook/articles/memory-management/README#problem-statement) * [Approaches](https://docs.perplexity.ai/cookbook/articles/memory-management/README#approaches) * [1\. Chat Summary Memory Buffer](https://docs.perplexity.ai/cookbook/articles/memory-management/README#1-chat-summary-memory-buffer) * [2\. Persistent Memory with LanceDB](https://docs.perplexity.ai/cookbook/articles/memory-management/README#2-persistent-memory-with-lancedb) * [Directory Structure](https://docs.perplexity.ai/cookbook/articles/memory-management/README#directory-structure) * [Getting Started](https://docs.perplexity.ai/cookbook/articles/memory-management/README#getting-started) * [Key Benefits](https://docs.perplexity.ai/cookbook/articles/memory-management/README#key-benefits) * [Contributions](https://docs.perplexity.ai/cookbook/articles/memory-management/README#contributions) [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#memory-management-with-llamaindex-and-perplexity-sonar-api) Memory Management with LlamaIndex and Perplexity Sonar API =================================================================================================================================================================================================== [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#overview) Overview ----------------------------------------------------------------------------------------------- This article explores advanced solutions for preserving conversational memory in applications powered by large language models (LLMs). The goal is to enable coherent multi-turn conversations by retaining context across interactions, even when constrained by the model’s token limit. [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#problem-statement) Problem Statement ----------------------------------------------------------------------------------------------------------------- LLMs have a limited context window, making it challenging to maintain long-term conversational memory. Without proper memory management, follow-up questions can lose relevance or hallucinate unrelated answers. [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#approaches) Approaches --------------------------------------------------------------------------------------------------- Using LlamaIndex, we implemented two distinct strategies for solving this problem: ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#1-chat-summary-memory-buffer) 1\. **Chat Summary Memory Buffer** * **Goal**: Summarize older messages to fit within the token limit while retaining key context. * **Approach**: * Uses LlamaIndex’s `ChatSummaryMemoryBuffer` to truncate and summarize conversation history dynamically. * Ensures that key details from earlier interactions are preserved in a compact form. * **Use Case**: Ideal for short-term conversations where memory efficiency is critical. * **Implementation**: [View the complete guide →](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/) ### [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#2-persistent-memory-with-lancedb) 2\. **Persistent Memory with LanceDB** * **Goal**: Enable long-term memory persistence across sessions. * **Approach**: * Stores conversation history as vector embeddings in LanceDB. * Retrieves relevant historical context using semantic search and metadata filters. * Integrates Perplexity’s Sonar API for generating responses based on retrieved context. * **Use Case**: Suitable for applications requiring long-term memory retention and contextual recall. * **Implementation**: [View the complete guide →](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/) [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#directory-structure) Directory Structure --------------------------------------------------------------------------------------------------------------------- Copy Ask AI articles/memory-management/ ├── chat-summary-memory-buffer/ # Implementation of summarization-based memory ├── chat-with-persistence/ # Implementation of persistent memory with LanceDB [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#getting-started) Getting Started ------------------------------------------------------------------------------------------------------------- 1. Clone the repository: Copy Ask AI git clone https://github.com/your-repo/api-cookbook.git cd api-cookbook/articles/memory-management 2. Follow the README in each subdirectory for setup instructions and usage examples. [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#key-benefits) Key Benefits ------------------------------------------------------------------------------------------------------- * **Context Window Management**: 43% reduction in token usage through summarization * **Conversation Continuity**: 92% context retention across sessions * **API Compatibility**: 100% success rate with Perplexity message schema * **Production Ready**: Scalable architectures for enterprise applications [​](https://docs.perplexity.ai/cookbook/articles/memory-management/README#contributions) Contributions --------------------------------------------------------------------------------------------------------- If you have found another way to tackle the same issue using LlamaIndex please feel free to open a PR! Check out our [CONTRIBUTING.md](https://github.com/ppl-ai/api-cookbook/blob/main/CONTRIBUTING.md) file for more guidance. * * * Was this page helpful? YesNo [OpenAI Agents Integration\ \ Previous](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README) [Persistent Chat Memory\ \ Next](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README) ⌘I --- # Perplexity Discord Bot - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Examples Perplexity Discord Bot Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * [Examples Overview](https://docs.perplexity.ai/cookbook/examples/README) * [Fact Checker CLI](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README) * [Daily Knowledge Bot](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README) * [Disease Information App](https://docs.perplexity.ai/cookbook/examples/disease-qa/README) * [Academic Research Finder CLI](https://docs.perplexity.ai/cookbook/examples/research-finder/README) * [Perplexity Discord Bot](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README) * [Financial News Tracker](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README) * Integration Guides On this page * [✨ Features](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%E2%9C%A8-features) * [🛠️ Prerequisites](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%9B%A0%EF%B8%8F-prerequisites) * [🚀 Quick Start](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%9A%80-quick-start) * [1\. Repository Setup](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#1-repository-setup) * [2\. Install Dependencies](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#2-install-dependencies) * [3\. Configure API Keys](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#3-configure-api-keys) * [🎯 Usage Guide](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%8E%AF-usage-guide) * [Bot Invitation & Setup](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#bot-invitation-%26-setup) * [How to Use](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#how-to-use) * [📊 Response Format](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%93%8A-response-format) * [🔧 Technical Details](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%94%A7-technical-details) A simple `discord.py` bot that integrates [Perplexity’s Sonar API](https://docs.perplexity.ai/) into your Discord server. Ask questions and get AI-powered answers with web access through slash commands or by mentioning the bot. ![Discord Bot Demo](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/cookbook/static/img/discord-py-bot-demo.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=3ea199dbcf6b179bc1bb39396548eb65) [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%E2%9C%A8-features) ✨ Features -------------------------------------------------------------------------------------------------------- * **🌐 Web-Connected AI**: Uses Perplexity’s Sonar API for up-to-date information * **⚡ Slash Command**: Simple `/ask` command for questions * **💬 Mention Support**: Ask questions by mentioning the bot * **🔗 Source Citations**: Automatically formats and links to sources * **🔒 Secure Setup**: Environment-based configuration for API keys [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%9B%A0%EF%B8%8F-prerequisites) 🛠️ Prerequisites -------------------------------------------------------------------------------------------------------------------------------- 1 Python Environment **Python 3.8+** installed on your system Copy Ask AI python --version # Should be 3.8 or higher 2 Perplexity API Access **Active Perplexity API Key** from [Perplexity AI Settings](https://www.perplexity.ai/settings/api) You’ll need a paid Perplexity account to access the API. See the [pricing page](https://www.perplexity.ai/pricing) for current rates. 3 Discord Bot Application **Discord Bot Token** from the [Discord Developer Portal](https://discord.com/developers/applications) [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%9A%80-quick-start) 🚀 Quick Start ------------------------------------------------------------------------------------------------------------------ ### [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#1-repository-setup) 1\. Repository Setup Clone the repository and navigate to the bot directory: Copy Ask AI git clone https://github.com/perplexity-ai/api-cookbook.git cd api-cookbook/docs/examples/discord-py-bot/ ### [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#2-install-dependencies) 2\. Install Dependencies Copy Ask AI # Create a virtual environment (recommended) python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install required packages pip install -r requirements.txt ### [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#3-configure-api-keys) 3\. Configure API Keys 1 Get Your Perplexity API Key 1. Visit [Perplexity AI Account Settings](https://www.perplexity.ai/settings/api) 2. Generate a new API key 3. Copy the key to the .env file Keep your API key secure! Never commit it to version control or share it publicly. 2 Create Discord Bot Application 1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) 2. Click **“New Application”** and give it a descriptive name 3. Navigate to the **“Bot”** section 4. Click **“Reset Token”** (or “Add Bot” if first time) 5. Copy the bot token 3 Configure Environment Variables Copy the example environment file and add your keys: Copy Ask AI cp env.example .env Edit `.env` with your credentials: .env Copy Ask AI DISCORD_TOKEN="your_discord_bot_token_here" PERPLEXITY_API_KEY="your_perplexity_api_key_here" [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%8E%AF-usage-guide) 🎯 Usage Guide ------------------------------------------------------------------------------------------------------------------ ### [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#bot-invitation-&-setup) Bot Invitation & Setup 1 Generate Invite URL In the Discord Developer Portal: 1. Go to **OAuth2** → **URL Generator** 2. Select scopes: `bot` and `applications.commands` 3. Select bot permissions: `Send Messages`, `Use Slash Commands` 4. Copy the generated URL 2 Invite to Server 1. Paste the URL in your browser 2. Select the Discord server to add the bot to 3. Confirm the permissions 3 Start the Bot Copy Ask AI python bot.py You should see output confirming the bot is online and commands are synced. ### [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#how-to-use) How to Use **Slash Command:** Copy Ask AI /ask [your question here] ![Slash Command Demo](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/cookbook/static/img/discord-py-bot-slash-command.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=e959cce014bb17d7ee653b13761fe387) **Mention the Bot:** Copy Ask AI @YourBot [your question here] ![Mention Command Demo](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/cookbook/static/img/discord-py-bot-mention-command.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=acc2c24d15f76c89cf89ae4cb9292e45) [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%93%8A-response-format) 📊 Response Format -------------------------------------------------------------------------------------------------------------------------- The bot provides clean, readable responses with: * **AI Answer**: Direct response from Perplexity’s Sonar API * **Source Citations**: Clickable links to sources (when available) * **Automatic Truncation**: Responses are trimmed to fit Discord’s limits [​](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README#%F0%9F%94%A7-technical-details) 🔧 Technical Details ------------------------------------------------------------------------------------------------------------------------------ This bot uses: * **Model**: Perplexity’s `sonar-pro` model * **Response Limit**: 2000 tokens from API, truncated to fit Discord * **Temperature**: 0.2 for consistent, factual responses * **No Permissions**: Anyone in the server can use the bot Was this page helpful? YesNo [Academic Research Finder CLI\ \ Previous](https://docs.perplexity.ai/cookbook/examples/research-finder/README) [Financial News Tracker\ \ Next](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README) ⌘I --- # Fact Checker CLI - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Examples Fact Checker CLI Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * [Examples Overview](https://docs.perplexity.ai/cookbook/examples/README) * [Fact Checker CLI](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README) * [Daily Knowledge Bot](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README) * [Disease Information App](https://docs.perplexity.ai/cookbook/examples/disease-qa/README) * [Academic Research Finder CLI](https://docs.perplexity.ai/cookbook/examples/research-finder/README) * [Perplexity Discord Bot](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README) * [Financial News Tracker](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README) * Integration Guides On this page * [Fact Checker CLI](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#fact-checker-cli) * [Features](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#features) * [Installation](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#installation) * [1\. Install required dependencies](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#1-install-required-dependencies) * [2\. Make the script executable](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#2-make-the-script-executable) * [API Key Setup](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#api-key-setup) * [1\. As a command-line argument](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#1-as-a-command-line-argument) * [2\. As an environment variable](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#2-as-an-environment-variable) * [3\. In a file](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#3-in-a-file) * [Quick Start](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#quick-start) * [Usage](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#usage) * [Check a claim](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#check-a-claim) * [Check an article from a file](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#check-an-article-from-a-file) * [Check an article from a URL](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#check-an-article-from-a-url) * [Specify a different model](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#specify-a-different-model) * [Output results as JSON](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#output-results-as-json) * [Use a custom prompt file](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#use-a-custom-prompt-file) * [Enable structured outputs (for Tier 3+ users)](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#enable-structured-outputs-for-tier-3%2B-users) * [Get help](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#get-help) * [Output Format](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#output-format) * [Example](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#example) * [Limitations](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#limitations) [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#fact-checker-cli) Fact Checker CLI ============================================================================================================== A command-line tool that identifies false or misleading claims in articles or statements using Perplexity’s Sonar API for web research. [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#features) Features ---------------------------------------------------------------------------------------------- * Analyze claims or entire articles for factual accuracy * Identify false, misleading, or unverifiable claims * Provide explanations and corrections for inaccurate information * Output results in human-readable format or structured JSON * Cite reliable sources for fact-checking assessments * Leverages Perplexity’s structured outputs for reliable JSON parsing (for Tier 3+ users) [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#installation) Installation ------------------------------------------------------------------------------------------------------ ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#1-install-required-dependencies) 1\. Install required dependencies Copy Ask AI # Install from requirements file (recommended) pip install -r requirements.txt # Or install manually pip install requests pydantic newspaper3k ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#2-make-the-script-executable) 2\. Make the script executable Copy Ask AI chmod +x fact_checker.py [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#api-key-setup) API Key Setup -------------------------------------------------------------------------------------------------------- The tool requires a Perplexity API key to function. You can provide it in one of these ways: ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#1-as-a-command-line-argument) 1\. As a command-line argument Copy Ask AI ./fact_checker.py --api-key YOUR_API_KEY ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#2-as-an-environment-variable) 2\. As an environment variable Copy Ask AI export PPLX_API_KEY=YOUR_API_KEY ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#3-in-a-file) 3\. In a file Create a file named `pplx_api_key` or `.pplx_api_key` in the same directory as the script: Copy Ask AI echo "YOUR_API_KEY" > .pplx_api_key chmod 600 .pplx_api_key **Note:** If you’re using the structured outputs feature, you’ll need a Perplexity API account with Tier 3 or higher access level. [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#quick-start) Quick Start ---------------------------------------------------------------------------------------------------- Run the following command immediately after setup: Copy Ask AI ./fact_checker.py -t "The Earth is flat and NASA is hiding the truth." This will analyze the claim, research it using Perplexity’s Sonar API, and return a detailed fact check with ratings, explanations, and sources. [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#usage) Usage ---------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#check-a-claim) Check a claim Copy Ask AI ./fact_checker.py --text "The Earth is flat and NASA is hiding the truth." ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#check-an-article-from-a-file) Check an article from a file Copy Ask AI ./fact_checker.py --file article.txt ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#check-an-article-from-a-url) Check an article from a URL Copy Ask AI ./fact_checker.py --url https://www.example.com/news/article-to-check ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#specify-a-different-model) Specify a different model Copy Ask AI ./fact_checker.py --text "Global temperatures have decreased over the past century." --model "sonar-pro" ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#output-results-as-json) Output results as JSON Copy Ask AI ./fact_checker.py --text "Mars has a breathable atmosphere." --json ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#use-a-custom-prompt-file) Use a custom prompt file Copy Ask AI ./fact_checker.py --text "The first human heart transplant was performed in the United States." --prompt-file custom_prompt.md ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#enable-structured-outputs-for-tier-3+-users) Enable structured outputs (for Tier 3+ users) Structured output is disabled by default. To enable it, pass the `--structured-output` flag: Copy Ask AI ./fact_checker.py --text "Vaccines cause autism." --structured-output ### [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#get-help) Get help Copy Ask AI ./fact_checker.py --help [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#output-format) Output Format -------------------------------------------------------------------------------------------------------- The tool provides output including: * **Overall Rating**: MOSTLY\_TRUE, MIXED, or MOSTLY\_FALSE * **Summary**: A brief overview of the fact-checking findings * **Claims Analysis**: A list of specific claims with individual ratings: * TRUE: Factually accurate and supported by evidence * FALSE: Contradicted by evidence * MISLEADING: Contains some truth but could lead to incorrect conclusions * UNVERIFIABLE: Cannot be conclusively verified with available information * **Explanations**: Detailed reasoning for each claim * **Sources**: Citations and URLs used for verification [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#example) Example -------------------------------------------------------------------------------------------- Run the following command: Copy Ask AI ./fact_checker.py -t "The Great Wall of China is visible from the moon." Example output: Copy Ask AI Fact checking in progress... 🔴 OVERALL RATING: MOSTLY_FALSE 📝 SUMMARY: The claim that the Great Wall of China is visible from the moon is false. This is a common misconception that has been debunked by NASA astronauts and scientific evidence. 🔍 CLAIMS ANALYSIS: Claim 1: ❌ FALSE Statement: "The Great Wall of China is visible from the moon." Explanation: The Great Wall of China is not visible from the moon with the naked eye. NASA astronauts have confirmed this, including Neil Armstrong who stated he could not see the Wall from lunar orbit. The Wall is too narrow and is similar in color to its surroundings when viewed from such a distance. Sources: - NASA.gov - Scientific American - National Geographic [​](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README#limitations) Limitations ---------------------------------------------------------------------------------------------------- * The accuracy of fact-checking depends on the quality of information available through the Perplexity Sonar API. * Like all language models, the underlying AI may have limitations in certain specialized domains. * The structured outputs feature requires a Tier 3 or higher Perplexity API account. * The tool does not replace professional fact-checking services for highly sensitive or complex content. Was this page helpful? YesNo [Examples Overview\ \ Previous](https://docs.perplexity.ai/cookbook/examples/README) [Daily Knowledge Bot\ \ Next](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README) ⌘I --- # Academic Research Finder CLI - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/examples/research-finder/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Examples Academic Research Finder CLI Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * [Examples Overview](https://docs.perplexity.ai/cookbook/examples/README) * [Fact Checker CLI](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README) * [Daily Knowledge Bot](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README) * [Disease Information App](https://docs.perplexity.ai/cookbook/examples/disease-qa/README) * [Academic Research Finder CLI](https://docs.perplexity.ai/cookbook/examples/research-finder/README) * [Perplexity Discord Bot](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README) * [Financial News Tracker](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README) * Integration Guides On this page * [Academic Research Finder CLI](https://docs.perplexity.ai/cookbook/examples/research-finder/README#academic-research-finder-cli) * [Features](https://docs.perplexity.ai/cookbook/examples/research-finder/README#features) * [Installation](https://docs.perplexity.ai/cookbook/examples/research-finder/README#installation) * [1\. Install required dependencies](https://docs.perplexity.ai/cookbook/examples/research-finder/README#1-install-required-dependencies) * [2\. Make the script executable (Optional)](https://docs.perplexity.ai/cookbook/examples/research-finder/README#2-make-the-script-executable-optional) * [API Key Setup](https://docs.perplexity.ai/cookbook/examples/research-finder/README#api-key-setup) * [Usage](https://docs.perplexity.ai/cookbook/examples/research-finder/README#usage) * [Arguments](https://docs.perplexity.ai/cookbook/examples/research-finder/README#arguments) * [Example Output (Human-Readable - Note: Actual output depends heavily on the query and API results)](https://docs.perplexity.ai/cookbook/examples/research-finder/README#example-output-human-readable-note%3A-actual-output-depends-heavily-on-the-query-and-api-results) * [Limitations](https://docs.perplexity.ai/cookbook/examples/research-finder/README#limitations) [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#academic-research-finder-cli) Academic Research Finder CLI ===================================================================================================================================== A command-line tool that uses Perplexity’s Sonar API to find and summarize academic literature (research papers, articles, etc.) related to a given question or topic. [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#features) Features --------------------------------------------------------------------------------------------- * Takes a natural language question or topic as input, ideally suited for academic inquiry. * Leverages Perplexity Sonar API, guided by a specialized prompt to prioritize scholarly sources (e.g., journals, conference proceedings, academic databases). * Outputs a concise summary based on the findings from academic literature. * Lists the primary academic sources used, aiming to include details like authors, year, title, publication, and DOI/link when possible. * Supports different Perplexity models (defaults to `sonar-pro`). * Allows results to be output in JSON format. [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#installation) Installation ----------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#1-install-required-dependencies) 1\. Install required dependencies Ensure you are using the Python environment you intend to run the script with (e.g., `python3.10` if that’s your target). Copy Ask AI # Install from requirements file (recommended) pip install -r requirements.txt # Or install manually pip install requests ### [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#2-make-the-script-executable-optional) 2\. Make the script executable (Optional) Copy Ask AI chmod +x research_finder.py Alternatively, you can run the script using `python3 research_finder.py ...`. [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#api-key-setup) API Key Setup ------------------------------------------------------------------------------------------------------- The tool requires a Perplexity API key (`PPLX_API_KEY`) to function. You can provide it in one of these ways (checked in this order): 1. **As a command-line argument:** Copy Ask AI python3 research_finder.py "Your query" --api-key YOUR_API_KEY 2. **As an environment variable:** Copy Ask AI export PPLX_API_KEY=YOUR_API_KEY python3 research_finder.py "Your query" 3. **In a file:** Create a file named `pplx_api_key`, `.pplx_api_key`, `PPLX_API_KEY`, or `.PPLX_API_KEY` in the _same directory as the script_ or in the _current working directory_ containing just your API key. Copy Ask AI echo "YOUR_API_KEY" > .pplx_api_key chmod 600 .pplx_api_key # Optional: restrict permissions python3 research_finder.py "Your query" [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#usage) Usage --------------------------------------------------------------------------------------- Run the script from the `sonar-use-cases/research_finder` directory or provide the full path. Copy Ask AI # Basic usage python3 research_finder.py "What are the latest advancements in quantum computing?" # Using a specific model python3 research_finder.py "Explain the concept of Large Language Models" --model sonar-small-online # Getting output as JSON python3 research_finder.py "Summarize the plot of Dune Part Two" --json # Using a custom system prompt file python3 research_finder.py "Benefits of renewable energy" --prompt-file /path/to/your/custom_prompt.md # Using an API key via argument python3 research_finder.py "Who won the last FIFA World Cup?" --api-key sk-... # Using the executable (if chmod +x was used) ./research_finder.py "Latest news about Mars exploration" ### [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#arguments) Arguments * `query`: (Required) The research question or topic (enclose in quotes if it contains spaces). * `-m`, `--model`: Specify the Perplexity model (default: `sonar-pro`). * `-k`, `--api-key`: Provide the API key directly. * `-p`, `--prompt-file`: Path to a custom system prompt file. * `-j`, `--json`: Output the results in JSON format. [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#example-output-human-readable-note:-actual-output-depends-heavily-on-the-query-and-api-results) Example Output (Human-Readable - _Note: Actual output depends heavily on the query and API results_) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Copy Ask AI Initializing research assistant for query: "Recent studies on transformer models in NLP"... Researching in progress... ✅ Research Complete! 📝 SUMMARY: Recent studies on transformer models in Natural Language Processing (NLP) continue to explore architectural improvements, efficiency optimizations, and new applications. Key areas include modifications to the attention mechanism (e.g., sparse attention, linear attention) to handle longer sequences more efficiently, techniques for model compression and knowledge distillation, and applications beyond text, such as in computer vision and multimodal tasks. Research also focuses on understanding the internal workings and limitations of large transformer models. 🔗 SOURCES: 1. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., ... & Polosukhin, I. (2017). Attention is all you need. Advances in neural information processing systems, 30. (arXiv:1706.03762) 2. Tay, Y., Dehghani, M., Bahri, D., & Metzler, D. (2020). Efficient transformers: A survey. arXiv preprint arXiv:2009.06732. 3. Beltagy, I., Peters, M. E., & Cohan, A. (2020). Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150. 4. Rogers, A., Kovaleva, O., & Rumshisky, A. (2020). A primer in bertology: What we know about how bert works. Transactions of the Association for Computational Linguistics, 8, 842-866. (arXiv:2002.12327) [​](https://docs.perplexity.ai/cookbook/examples/research-finder/README#limitations) Limitations --------------------------------------------------------------------------------------------------- * The ability of the Sonar API to consistently prioritize and access specific academic databases or extract detailed citation information (like DOIs) may vary. The quality depends on the API’s search capabilities and the structure of the source websites. * The script performs basic parsing to separate summary and sources; complex or unusual API responses might not be parsed perfectly. Check the raw response in case of issues. * Queries that are too broad or not well-suited for academic search might yield less relevant results. * Error handling for API rate limits or specific API errors could be more granular. Was this page helpful? YesNo [Disease Information App\ \ Previous](https://docs.perplexity.ai/cookbook/examples/disease-qa/README) [Perplexity Discord Bot\ \ Next](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README) ⌘I --- # Perplexity API Cookbook - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Cookbook Perplexity API Cookbook Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * Integration Guides On this page * [Quick Start](https://docs.perplexity.ai/cookbook#quick-start) * [What’s Inside](https://docs.perplexity.ai/cookbook#what%E2%80%99s-inside) * [Examples](https://docs.perplexity.ai/cookbook#examples) * [Showcase](https://docs.perplexity.ai/cookbook#showcase) * [Integration Guides](https://docs.perplexity.ai/cookbook#integration-guides) * [Contributing](https://docs.perplexity.ai/cookbook#contributing) * [Resources](https://docs.perplexity.ai/cookbook#resources) A collection of practical examples and guides for building with [**Perplexity’s API Platform**](https://docs.perplexity.ai/) - the fastest, most cost-effective AI answer engine with real-time search capabilities. [​](https://docs.perplexity.ai/cookbook#quick-start) Quick Start ------------------------------------------------------------------- To get started with any project in this cookbook: 1. **Browse examples** - Find the use case that matches your needs 2. **Follow the guide** - Each example includes complete setup instructions 3. **Get the code** - Full implementations are available in our [GitHub repository](https://github.com/perplexityai/api-cookbook) 4. **Build and customize** - Use the examples as starting points for your projects [​](https://docs.perplexity.ai/cookbook#what%E2%80%99s-inside) What’s Inside ------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook#examples) [Examples](https://docs.perplexity.ai/cookbook/examples/README) Ready-to-run projects that demonstrate specific use cases and implementation patterns. ### [​](https://docs.perplexity.ai/cookbook#showcase) [Showcase](https://docs.perplexity.ai/cookbook/showcase/briefo) Community-built applications that demonstrate real-world implementations of the API Platform. ### [​](https://docs.perplexity.ai/cookbook#integration-guides) [Integration Guides](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README) In-depth tutorials for advanced implementations and integrations with other tools. > **Note**: All complete code examples, scripts, and project files can be found in our [GitHub repository](https://github.com/perplexityai/api-cookbook) > . The documentation here provides guides and explanations, while the repository contains the full runnable implementations. [​](https://docs.perplexity.ai/cookbook#contributing) Contributing --------------------------------------------------------------------- Have a project built with API Platform? We’d love to feature it! Check our [Contributing Guidelines](https://github.com/perplexityai/api-cookbook/blob/main/CONTRIBUTING.md) to learn how to: * Submit example tutorials * Add your project to the showcase * Improve existing content [​](https://docs.perplexity.ai/cookbook#resources) Resources --------------------------------------------------------------- * [API Documentation](https://docs.perplexity.ai/home) * [GitHub Repository](https://github.com/perplexityai/api-cookbook) * * * _Maintained by the Perplexity community_ Was this page helpful? YesNo [Briefo | Perplexity Powered News & Finance Social App\ \ Next](https://docs.perplexity.ai/cookbook/showcase/briefo) ⌘I --- # OpenAI Agents Integration - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Integration Guides OpenAI Agents Integration Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * Integration Guides * [Chat Summary Memory Buffer](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README) * [OpenAI Agents Integration](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README) * [Memory Management](https://docs.perplexity.ai/cookbook/articles/memory-management/README) * [Persistent Chat Memory](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-with-persistence/README) On this page * [🎯 What You’ll Build](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%8E%AF-what-you%E2%80%99ll-build) * [🏗️ Architecture Overview](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%8F%97%EF%B8%8F-architecture-overview) * [📋 Prerequisites](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%93%8B-prerequisites) * [🚀 Installation](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%9A%80-installation) * [⚙️ Environment Setup](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%E2%9A%99%EF%B8%8F-environment-setup) * [💻 Complete Implementation](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%92%BB-complete-implementation) * [🔍 Code Breakdown](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%94%8D-code-breakdown) * [1\. Client Configuration](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#1-client-configuration) * [2\. Function Tools](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#2-function-tools) * [3\. Agent Creation](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#3-agent-creation) * [🏃‍♂️ Running the Example](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%8F%83%E2%80%8D%E2%99%82%EF%B8%8F-running-the-example) * [🔧 Customization Options](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%94%A7-customization-options) * [Different Sonar Models](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#different-sonar-models) * [Custom Instructions](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#custom-instructions) * [Multiple Function Tools](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#multiple-function-tools) * [🚀 Production Considerations](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%9A%80-production-considerations) * [Error Handling](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#error-handling) * [Rate Limiting](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#rate-limiting) * [Logging and Monitoring](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#logging-and-monitoring) * [🔗 Advanced Integration Patterns](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%94%97-advanced-integration-patterns) * [Streaming Responses](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#streaming-responses) * [Context Management](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#context-management) * [⚠️ Important Notes](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%E2%9A%A0%EF%B8%8F-important-notes) * [🎯 Use Cases](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%8E%AF-use-cases) * [📚 References](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%93%9A-references) [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%8E%AF-what-you%E2%80%99ll-build) 🎯 What You’ll Build ------------------------------------------------------------------------------------------------------------------------------------------------- By the end of this guide, you’ll have: * ✅ A custom async OpenAI client configured for Sonar API * ✅ An intelligent agent with function calling capabilities * ✅ A working example that fetches real-time information * ✅ Production-ready integration patterns [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%8F%97%EF%B8%8F-architecture-overview) 🏗️ Architecture Overview ----------------------------------------------------------------------------------------------------------------------------------------------------------- This integration allows you to: 1. **Leverage Sonar’s search capabilities** for real-time, grounded responses 2. **Use OpenAI’s agent framework** for structured interactions and function calling 3. **Combine both** for powerful, context-aware applications [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%93%8B-prerequisites) 📋 Prerequisites --------------------------------------------------------------------------------------------------------------------------------- Before starting, ensure you have: * **Python 3.7+** installed * **Perplexity API Key** - [Get one here](https://docs.perplexity.ai/home) * **OpenAI Agents SDK** access and familiarity [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%9A%80-installation) 🚀 Installation ------------------------------------------------------------------------------------------------------------------------------- Install the required dependencies: Copy Ask AI pip install openai nest-asyncio :::info The `nest-asyncio` package is required for running async code in environments like Jupyter notebooks that already have an event loop running. ::: [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%E2%9A%99%EF%B8%8F-environment-setup) ⚙️ Environment Setup ----------------------------------------------------------------------------------------------------------------------------------------------- Configure your environment variables: Copy Ask AI # Required: Your Perplexity API key export EXAMPLE_API_KEY="your-perplexity-api-key" # Optional: Customize the API endpoint (defaults to official endpoint) export EXAMPLE_BASE_URL="https://api.perplexity.ai" # Optional: Choose your model (defaults to sonar-pro) export EXAMPLE_MODEL_NAME="sonar-pro" [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%92%BB-complete-implementation) 💻 Complete Implementation ----------------------------------------------------------------------------------------------------------------------------------------------------- Here’s the full implementation with detailed explanations: Copy Ask AI # Import necessary standard libraries import asyncio # For running asynchronous code import os # To access environment variables # Import AsyncOpenAI for creating an async client from openai import AsyncOpenAI # Import custom classes and functions from the agents package. # These handle agent creation, model interfacing, running agents, and more. from agents import Agent, OpenAIChatCompletionsModel, Runner, function_tool, set_tracing_disabled # Retrieve configuration from environment variables or use defaults BASE_URL = os.getenv("EXAMPLE_BASE_URL") or "https://api.perplexity.ai" API_KEY = os.getenv("EXAMPLE_API_KEY") MODEL_NAME = os.getenv("EXAMPLE_MODEL_NAME") or "sonar-pro" # Validate that all required configuration variables are set if not BASE_URL or not API_KEY or not MODEL_NAME: raise ValueError( "Please set EXAMPLE_BASE_URL, EXAMPLE_API_KEY, EXAMPLE_MODEL_NAME via env var or code." ) # Initialize the custom OpenAI async client with the specified BASE_URL and API_KEY. client = AsyncOpenAI(base_url=BASE_URL, api_key=API_KEY) # Disable tracing to avoid using a platform tracing key; adjust as needed. set_tracing_disabled(disabled=True) # Define a function tool that the agent can call. # The decorator registers this function as a tool in the agents framework. @function_tool def get_weather(city: str): """ Simulate fetching weather data for a given city. Args: city (str): The name of the city to retrieve weather for. Returns: str: A message with weather information. """ print(f"[debug] getting weather for {city}") return f"The weather in {city} is sunny." # Import nest_asyncio to support nested event loops import nest_asyncio # Apply the nest_asyncio patch to enable running asyncio.run() # even if an event loop is already running. nest_asyncio.apply() async def main(): """ Main asynchronous function to set up and run the agent. This function creates an Agent with a custom model and function tools, then runs a query to get the weather in Tokyo. """ # Create an Agent instance with: # - A name ("Assistant") # - Custom instructions ("Be precise and concise.") # - A model built from OpenAIChatCompletionsModel using our client and model name. # - A list of tools; here, only get_weather is provided. agent = Agent( name="Assistant", instructions="Be precise and concise.", model=OpenAIChatCompletionsModel(model=MODEL_NAME, openai_client=client), tools=[get_weather], ) # Execute the agent with the sample query. result = await Runner.run(agent, "What's the weather in Tokyo?") # Print the final output from the agent. print(result.final_output) # Standard boilerplate to run the async main() function. if __name__ == "__main__": asyncio.run(main()) [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%94%8D-code-breakdown) 🔍 Code Breakdown ----------------------------------------------------------------------------------------------------------------------------------- Let’s examine the key components: ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#1-client-configuration) 1\. **Client Configuration** Copy Ask AI client = AsyncOpenAI(base_url=BASE_URL, api_key=API_KEY) This creates an async OpenAI client pointed at Perplexity’s Sonar API. The client handles all HTTP communication and maintains compatibility with OpenAI’s interface. ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#2-function-tools) 2\. **Function Tools** Copy Ask AI @function_tool def get_weather(city: str): """Simulate fetching weather data for a given city.""" return f"The weather in {city} is sunny." Function tools allow your agent to perform actions beyond text generation. In production, you’d replace this with real API calls. ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#3-agent-creation) 3\. **Agent Creation** Copy Ask AI agent = Agent( name="Assistant", instructions="Be precise and concise.", model=OpenAIChatCompletionsModel(model=MODEL_NAME, openai_client=client), tools=[get_weather], ) The agent combines Sonar’s language capabilities with your custom tools and instructions. [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%8F%83%E2%80%8D%E2%99%82%EF%B8%8F-running-the-example) 🏃‍♂️ Running the Example --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. **Set your environment variables**: Copy Ask AI export EXAMPLE_API_KEY="your-perplexity-api-key" 2. **Save the code** to a file (e.g., `pplx_openai_agent.py`) 3. **Run the script**: Copy Ask AI python pplx_openai_agent.py **Expected Output**: Copy Ask AI [debug] getting weather for Tokyo The weather in Tokyo is sunny. [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%94%A7-customization-options) 🔧 Customization Options ------------------------------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#different-sonar-models) **Different Sonar Models** Choose the right model for your use case: Copy Ask AI # For quick, lightweight queries MODEL_NAME = "sonar" # For complex research and analysis (default) MODEL_NAME = "sonar-pro" # For deep reasoning tasks MODEL_NAME = "sonar-reasoning-pro" ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#custom-instructions) **Custom Instructions** Tailor the agent’s behavior: Copy Ask AI agent = Agent( name="Research Assistant", instructions=""" You are a research assistant specializing in academic literature. Always provide citations and verify information through multiple sources. Be thorough but concise in your responses. """, model=OpenAIChatCompletionsModel(model=MODEL_NAME, openai_client=client), tools=[search_papers, get_citations], ) ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#multiple-function-tools) **Multiple Function Tools** Add more capabilities: Copy Ask AI @function_tool def search_web(query: str): """Search the web for current information.""" # Implementation here pass @function_tool def analyze_data(data: str): """Analyze structured data.""" # Implementation here pass agent = Agent( name="Multi-Tool Assistant", instructions="Use the appropriate tool for each task.", model=OpenAIChatCompletionsModel(model=MODEL_NAME, openai_client=client), tools=[get_weather, search_web, analyze_data], ) [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%9A%80-production-considerations) 🚀 Production Considerations --------------------------------------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#error-handling) **Error Handling** Copy Ask AI async def robust_main(): try: agent = Agent( name="Assistant", instructions="Be helpful and accurate.", model=OpenAIChatCompletionsModel(model=MODEL_NAME, openai_client=client), tools=[get_weather], ) result = await Runner.run(agent, "What's the weather in Tokyo?") return result.final_output except Exception as e: print(f"Error running agent: {e}") return "Sorry, I encountered an error processing your request." ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#rate-limiting) **Rate Limiting** Copy Ask AI import aiohttp from openai import AsyncOpenAI # Configure client with custom timeout and retry settings client = AsyncOpenAI( base_url=BASE_URL, api_key=API_KEY, timeout=30.0, max_retries=3 ) ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#logging-and-monitoring) **Logging and Monitoring** Copy Ask AI import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) @function_tool def get_weather(city: str): logger.info(f"Fetching weather for {city}") # Implementation here [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%94%97-advanced-integration-patterns) 🔗 Advanced Integration Patterns ----------------------------------------------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#streaming-responses) **Streaming Responses** For real-time applications: Copy Ask AI async def stream_agent_response(query: str): agent = Agent( name="Streaming Assistant", instructions="Provide detailed, step-by-step responses.", model=OpenAIChatCompletionsModel(model=MODEL_NAME, openai_client=client), tools=[get_weather], ) async for chunk in Runner.stream(agent, query): print(chunk, end='', flush=True) ### [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#context-management) **Context Management** For multi-turn conversations: Copy Ask AI class ConversationManager: def __init__(self): self.agent = Agent( name="Conversational Assistant", instructions="Maintain context across multiple interactions.", model=OpenAIChatCompletionsModel(model=MODEL_NAME, openai_client=client), tools=[get_weather], ) self.conversation_history = [] async def chat(self, message: str): result = await Runner.run(self.agent, message) self.conversation_history.append({"user": message, "assistant": result.final_output}) return result.final_output [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%E2%9A%A0%EF%B8%8F-important-notes) ⚠️ Important Notes ------------------------------------------------------------------------------------------------------------------------------------------- * **API Costs**: Monitor your usage as both Perplexity and OpenAI Agents may incur costs * **Rate Limits**: Respect API rate limits and implement appropriate backoff strategies * **Error Handling**: Always implement robust error handling for production applications * **Security**: Keep your API keys secure and never commit them to version control [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%8E%AF-use-cases) 🎯 Use Cases ------------------------------------------------------------------------------------------------------------------------- This integration pattern is perfect for: * **🔍 Research Assistants** - Combining real-time search with structured responses * **📊 Data Analysis Tools** - Using Sonar for context and agents for processing * **🤖 Customer Support** - Grounded responses with function calling capabilities * **📚 Educational Applications** - Real-time information with interactive features [​](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#%F0%9F%93%9A-references) 📚 References --------------------------------------------------------------------------------------------------------------------------- * [Perplexity Sonar API Documentation](https://docs.perplexity.ai/home) * [OpenAI Agents SDK Documentation](https://github.com/openai/openai-agents-python) * [AsyncOpenAI Client Reference](https://platform.openai.com/docs/api-reference) * [Function Calling Best Practices](https://platform.openai.com/docs/guides/function-calling) * * * **Ready to build?** This integration opens up powerful possibilities for creating intelligent, grounded agents. Start with the basic example and gradually add more sophisticated tools and capabilities! 🚀 Was this page helpful? YesNo [Chat Summary Memory Buffer\ \ Previous](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README) [Memory Management\ \ Next](https://docs.perplexity.ai/cookbook/articles/memory-management/README) ⌘I --- # Financial News Tracker - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Examples Financial News Tracker Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * [Examples Overview](https://docs.perplexity.ai/cookbook/examples/README) * [Fact Checker CLI](https://docs.perplexity.ai/cookbook/examples/fact-checker-cli/README) * [Daily Knowledge Bot](https://docs.perplexity.ai/cookbook/examples/daily-knowledge-bot/README) * [Disease Information App](https://docs.perplexity.ai/cookbook/examples/disease-qa/README) * [Academic Research Finder CLI](https://docs.perplexity.ai/cookbook/examples/research-finder/README) * [Perplexity Discord Bot](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README) * [Financial News Tracker](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README) * Integration Guides On this page * [Financial News Tracker](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#financial-news-tracker) * [Features](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#features) * [Installation](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#installation) * [1\. Install required dependencies](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#1-install-required-dependencies) * [2\. Make the script executable](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#2-make-the-script-executable) * [API Key Setup](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#api-key-setup) * [1\. As an environment variable (recommended)](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#1-as-an-environment-variable-recommended) * [2\. As a command-line argument](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#2-as-a-command-line-argument) * [3\. In a file](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#3-in-a-file) * [Quick Start](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#quick-start) * [Usage Examples](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#usage-examples) * [Basic usage - Get news for a specific topic](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#basic-usage-get-news-for-a-specific-topic) * [Get cryptocurrency news from the past week](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#get-cryptocurrency-news-from-the-past-week) * [Track specific company news](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#track-specific-company-news) * [Get news about market sectors](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#get-news-about-market-sectors) * [Output as JSON for programmatic use](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#output-as-json-for-programmatic-use) * [Use a different model](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#use-a-different-model) * [Enable structured output (requires Tier 3+ API access)](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#enable-structured-output-requires-tier-3%2B-api-access) * [Time Range Options](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#time-range-options) * [Output Format](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#output-format) * [1\. Executive Summary](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#1-executive-summary) * [2\. Market Analysis](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#2-market-analysis) * [3\. News Items](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#3-news-items) * [4\. Investment Insights](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#4-investment-insights) * [Example Output](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#example-output) * [Advanced Features](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#advanced-features) * [Custom Queries](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#custom-queries) * [JSON Output](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#json-output) * [Tips for Best Results](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#tips-for-best-results) * [Limitations](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#limitations) * [Error Handling](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#error-handling) * [Integration Examples](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#integration-examples) * [Daily Market Report](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#daily-market-report) * [Python Integration](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#python-integration) [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#financial-news-tracker) Financial News Tracker ================================================================================================================================ A command-line tool that fetches and analyzes real-time financial news using Perplexity’s Sonar API. Get comprehensive market insights, news summaries, and investment analysis for any financial topic. [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#features) Features ---------------------------------------------------------------------------------------------------- * Real-time financial news aggregation from multiple sources * Market sentiment analysis (Bullish/Bearish/Neutral) * Impact assessment for news items (High/Medium/Low) * Sector and company-specific analysis * Investment insights and recommendations * Customizable time ranges (24h to 1 year) * Structured JSON output support * Beautiful emoji-enhanced CLI output [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#installation) Installation ------------------------------------------------------------------------------------------------------------ ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#1-install-required-dependencies) 1\. Install required dependencies Copy Ask AI # Install from requirements file (recommended) pip install -r requirements.txt # Or install manually pip install requests pydantic ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#2-make-the-script-executable) 2\. Make the script executable Copy Ask AI chmod +x financial_news_tracker.py [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#api-key-setup) API Key Setup -------------------------------------------------------------------------------------------------------------- The tool requires a Perplexity API key. You can provide it in one of these ways: ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#1-as-an-environment-variable-recommended) 1\. As an environment variable (recommended) Copy Ask AI export PPLX_API_KEY=YOUR_API_KEY ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#2-as-a-command-line-argument) 2\. As a command-line argument Copy Ask AI ./financial_news_tracker.py "tech stocks" --api-key YOUR_API_KEY ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#3-in-a-file) 3\. In a file Create a file named `pplx_api_key` or `.pplx_api_key` in the same directory: Copy Ask AI echo "YOUR_API_KEY" > .pplx_api_key chmod 600 .pplx_api_key [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#quick-start) Quick Start ---------------------------------------------------------------------------------------------------------- Get the latest tech stock news: Copy Ask AI ./financial_news_tracker.py "tech stocks" This will fetch recent financial news about tech stocks, analyze market sentiment, and provide actionable insights. [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#usage-examples) Usage Examples ---------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#basic-usage-get-news-for-a-specific-topic) Basic usage - Get news for a specific topic Copy Ask AI ./financial_news_tracker.py "S&P 500" ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#get-cryptocurrency-news-from-the-past-week) Get cryptocurrency news from the past week Copy Ask AI ./financial_news_tracker.py "cryptocurrency" --time-range 1w ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#track-specific-company-news) Track specific company news Copy Ask AI ./financial_news_tracker.py "AAPL Apple stock" ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#get-news-about-market-sectors) Get news about market sectors Copy Ask AI ./financial_news_tracker.py "energy sector oil prices" ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#output-as-json-for-programmatic-use) Output as JSON for programmatic use Copy Ask AI ./financial_news_tracker.py "inflation rates" --json ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#use-a-different-model) Use a different model Copy Ask AI ./financial_news_tracker.py "Federal Reserve interest rates" --model sonar ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#enable-structured-output-requires-tier-3+-api-access) Enable structured output (requires Tier 3+ API access) Copy Ask AI ./financial_news_tracker.py "tech earnings" --structured-output [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#time-range-options) Time Range Options ------------------------------------------------------------------------------------------------------------------------ * `24h` - Last 24 hours (default) * `1w` - Last week * `1m` - Last month * `3m` - Last 3 months * `1y` - Last year [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#output-format) Output Format -------------------------------------------------------------------------------------------------------------- The tool provides comprehensive financial analysis including: ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#1-executive-summary) 1\. Executive Summary A brief overview of the key financial developments ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#2-market-analysis) 2\. Market Analysis * **Market Sentiment**: Overall market mood (🐂 Bullish, 🐻 Bearish, ⚖️ Neutral) * **Key Drivers**: Factors influencing the market * **Risks**: Current market risks and concerns * **Opportunities**: Potential investment opportunities ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#3-news-items) 3\. News Items Each news item includes: * **Headline**: The main news title * **Impact**: Market impact level (🔴 High, 🟡 Medium, 🟢 Low) * **Summary**: Brief description of the news * **Affected Sectors**: Industries or companies impacted * **Source**: News source attribution ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#4-investment-insights) 4\. Investment Insights Actionable recommendations and analysis based on the news [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#example-output) Example Output ---------------------------------------------------------------------------------------------------------------- Copy Ask AI 📊 FINANCIAL NEWS REPORT: tech stocks 📅 Period: Last 24 hours 📝 EXECUTIVE SUMMARY: Tech stocks showed mixed performance today as AI-related companies surged while semiconductor stocks faced pressure from supply chain concerns... 📈 MARKET ANALYSIS: Sentiment: 🐂 BULLISH Key Drivers: • Strong Q4 earnings from major tech companies • AI sector momentum continues • Federal Reserve signals potential rate cuts ⚠️ Risks: • Semiconductor supply chain disruptions • Regulatory scrutiny on big tech • Valuation concerns in AI sector 💡 Opportunities: • Cloud computing growth • AI infrastructure plays • Cybersecurity demand surge 📰 KEY NEWS ITEMS: 1. Microsoft Hits All-Time High on AI Growth Impact: 🔴 HIGH Summary: Microsoft stock reached record levels following strong Azure AI revenue... Sectors: Cloud Computing, AI, Software Source: Bloomberg 💼 INSIGHTS & RECOMMENDATIONS: • Consider diversifying within tech sector • AI infrastructure companies show strong momentum • Monitor semiconductor sector for buying opportunities [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#advanced-features) Advanced Features ---------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#custom-queries) Custom Queries You can combine multiple topics for comprehensive analysis: Copy Ask AI # Get news about multiple related topics ./financial_news_tracker.py "NVIDIA AMD semiconductor AI chips" # Track geopolitical impacts on markets ./financial_news_tracker.py "oil prices Middle East geopolitics" # Monitor economic indicators ./financial_news_tracker.py "inflation CPI unemployment Federal Reserve" ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#json-output) JSON Output For integration with other tools or scripts: Copy Ask AI ./financial_news_tracker.py "bitcoin" --json | jq '.market_analysis.market_sentiment' [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#tips-for-best-results) Tips for Best Results ------------------------------------------------------------------------------------------------------------------------------ 1. **Be Specific**: Include company tickers, sector names, or specific events 2. **Combine Topics**: Mix company names with relevant themes (e.g., “TSLA electric vehicles”) 3. **Use Time Ranges**: Match the time range to your investment horizon 4. **Regular Monitoring**: Set up cron jobs for daily market updates [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#limitations) Limitations ---------------------------------------------------------------------------------------------------------- * Results depend on available public information * Not financial advice - always do your own research * Historical data may be limited for very recent events * Structured output requires Tier 3+ Perplexity API access [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#error-handling) Error Handling ---------------------------------------------------------------------------------------------------------------- The tool includes comprehensive error handling for: * Invalid API keys * Network connectivity issues * API rate limits * Invalid queries * Parsing errors [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#integration-examples) Integration Examples ---------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#daily-market-report) Daily Market Report Create a script for daily updates: Copy Ask AI #!/bin/bash # daily_market_report.sh echo "=== Daily Market Report ===" > market_report.txt echo "Date: $(date)" >> market_report.txt echo "" >> market_report.txt ./financial_news_tracker.py "S&P 500 market overview" >> market_report.txt ./financial_news_tracker.py "top gaining stocks" >> market_report.txt ./financial_news_tracker.py "cryptocurrency bitcoin ethereum" >> market_report.txt ### [​](https://docs.perplexity.ai/cookbook/examples/financial-news-tracker/README#python-integration) Python Integration Copy Ask AI import subprocess import json def get_financial_news(query, time_range="24h"): result = subprocess.run( ["./financial_news_tracker.py", query, "--time-range", time_range, "--json"], capture_output=True, text=True ) if result.returncode == 0: return json.loads(result.stdout) else: raise Exception(f"Error fetching news: {result.stderr}") # Example usage news = get_financial_news("tech stocks", "1w") print(f"Market sentiment: {news['market_analysis']['market_sentiment']}") Was this page helpful? YesNo [Perplexity Discord Bot\ \ Previous](https://docs.perplexity.ai/cookbook/examples/discord-py-bot/README) [Chat Summary Memory Buffer\ \ Next](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README) ⌘I --- # Get in Touch - Perplexity [Skip to main content](https://docs.perplexity.ai/discussions/discussions#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Help & Resources Get in Touch Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [​](https://docs.perplexity.ai/discussions/discussions#join-our-developer-community) Join Our Developer Community -------------------------------------------------------------------------------------------------------------------- 🌟 Community Forum - Your First Stop! ------------------------------------- **The heart of our developer ecosystem!** Our vibrant community forum is where thousands of developers connect, share ideas, get help, and showcase their amazing projects built with the Perplexity API.**[🚀 Join the Community Forum →](https://community.perplexity.ai/) ****Why join the forum?** * Get technical help from experienced developers and our team * Share your projects and get featured in our showcase * Access exclusive tutorials, code examples, and best practices * Connect with like-minded builders and potential collaborators * Stay updated on the latest API features and announcements Real-Time Chat -------------- Join our Discord community for instant help and casual conversations with fellow developers. * [Discord Community](https://discord.gg/perplexity-ai) - Real-time chat & support * Active community members ready to help * Quick answers to urgent questions Stay Connected -------------- Follow us for the latest updates, feature announcements, and developer spotlights. * [Follow @PPLXDevs](https://twitter.com/PPLXDevs) - Latest updates & announcements * Developer showcases and success stories * API tips and best practices [​](https://docs.perplexity.ai/discussions/discussions#contact-our-team) Contact Our Team -------------------------------------------------------------------------------------------- Sales & Enterprise ------------------ Interested in enterprise solutions, custom pricing, or have sales questions?**[Contact Sales Team →](https://pplx.ai/api-sales) ** Technical Support ----------------- Need technical assistance? Our support team is here to help. **Please try the [Community Forum](https://community.perplexity.ai/) first!**You’ll get faster responses from our active community and team members who monitor the forum regularly. * **Email**: [\[email protected\]](https://docs.perplexity.ai/cdn-cgi/l/email-protection#7918091039091c0b09151c01100d00571810) - For billing inquiries and account issues [​](https://docs.perplexity.ai/discussions/discussions#developer-resources) Developer Resources -------------------------------------------------------------------------------------------------- 1 Report Issues Found a bug? Help us improve! Submit detailed bug reports through our [Community Forum](https://community.perplexity.ai/) . Create a new post with the `Bug Reports` tag. 2 Share Your Work Built something amazing with the Perplexity API? We’d love to showcase your work! * Contribute to our [API Cookbook](https://github.com/perplexityai/api-cookbook) * Share on X/Twitter with [@PPLXDevs](https://twitter.com/PPLXDevs) * Present at our monthly developer showcase 3 Get Featured Exceptional projects may be featured in our newsletter, blog, social media channels, and our [Cookbook Community Showcase](https://docs.perplexity.ai/cookbook/showcase/briefo) . Let us amplify your work to thousands of developers and AI enthusiasts! Was this page helpful? YesNo [Changelog\ \ Previous](https://docs.perplexity.ai/changelog/changelog) [API Roadmap\ \ Next](https://docs.perplexity.ai/feature-roadmap) ⌘I --- # 4Point Hoops | AI Basketball Analytics Platform - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase 4Point Hoops | AI Basketball Analytics Platform Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#links) ![4Point Hoops Dashboard](https://d112y698adiu2z.cloudfront.net/photos/production/software_photos/003/442/047/datas/original.png) **4Point Hoops** is an advanced NBA analytics platform that turns raw basketball statistics into actionable, narrative-driven insights. By scraping Basketball-Reference in real time and routing context-rich prompts to Perplexity’s Sonar Pro model, it helps fans, analysts, and fantasy players understand the “why” and “what’s next” – not just the numbers. [​](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#features) Features ----------------------------------------------------------------------------------- * **Player Analytics** with season & playoff splits, shot-type breakdowns, and performance radar for any NBA player * **Cross-Era Comparisons** enabling side-by-side stat comparisons (e.g., Michael Jordan ‘97 vs. Stephen Curry ‘22) * **Team Dashboards** with standings, playoff-probability Sankey flows, and auto-refreshing KPI tiles * **AI Explain & Similar Players** providing one-click Sonar explanations of stat lines and AI-picked comparable athletes * **Basketball AI Chat** allowing users to ask an expert LLM about NBA history, rosters, or projections * **Credit-Based SaaS System** with Firebase Auth, Google login, credit wallets, and admin tooling [​](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#prerequisites) Prerequisites --------------------------------------------------------------------------------------------- * Node.js 16+ and npm * Python 3.8+ and pip * Firebase project setup * Perplexity API key (Sonar Pro) * Basketball-Reference access [​](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#installation) Installation ------------------------------------------------------------------------------------------- Copy Ask AI # Clone the frontend repository git clone https://github.com/rapha18th/hoop-ai-frontend-44.git cd hoop-ai-frontend-44 npm install # Clone the backend repository git clone https://github.com/rapha18th/4Point-Hoops-Server.git cd 4Point-Hoops-Server pip install -r requirements.txt [​](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#configuration) Configuration --------------------------------------------------------------------------------------------- Create `.env` file in the backend directory: Copy Ask AI PERPLEXITY_API_KEY=your_sonar_pro_api_key FIREBASE_PROJECT_ID=your_firebase_project_id FIREBASE_PRIVATE_KEY=your_firebase_private_key FIREBASE_CLIENT_EMAIL=your_firebase_client_email [​](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#usage) Usage ----------------------------------------------------------------------------- 1. **Start Backend**: Copy Ask AI cd 4Point-Hoops-Server python app.py 2. **Start Frontend**: Copy Ask AI cd hoop-ai-frontend-44 npm run dev 3. **Access Application**: Open the frontend URL and explore NBA analytics with AI-powered insights 4. **Use AI Features**: Click “AI Explain” on any player or stat to get intelligent analysis powered by Perplexity Sonar [​](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#code-explanation) Code Explanation --------------------------------------------------------------------------------------------------- * **Frontend**: React with shadcn/ui components and Recharts for data visualization * **Backend**: Python Flask API serving Basketball-Reference data and managing Perplexity API calls * **Data Pipeline**: BRScraper for real-time data collection with Firebase caching * **AI Integration**: Perplexity Sonar Pro for intelligent basketball analysis and explanations * **Authentication**: Firebase Auth with Google login and credit-based access control * **Deployment**: Frontend on Netlify, backend on Hugging Face Spaces with Docker [​](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops#links) Links ----------------------------------------------------------------------------- * [Frontend Repository](https://github.com/rapha18th/hoop-ai-frontend-44) * [Backend Repository](https://github.com/rapha18th/4Point-Hoops-Server) * [Live Demo](https://4pointhoops.netlify.app/) * [Devpost Submission](https://devpost.com/software/4point-hoops) Was this page helpful? YesNo [BazaarAISaathi | AI-Powered Indian Stock Market Assistant\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) [MVP LifeLine | AI Youth Empowerment Platform\ \ Next](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) ⌘I --- # CycleSyncAI | Personalized Health Plans Powered by Sonar API - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase CycleSyncAI | Personalized Health Plans Powered by Sonar API Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Problem & Solution](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#problem-%26-solution) * [Features](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#features) * [Motivation](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#motivation) * [Repository Structure](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#repository-structure) * [Setup Instructions](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#setup-instructions) * [Sonar API Usage](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#sonar-api-usage) * [Demo Video](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#demo-video) * [Impact](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#impact) * [Links](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#links) **CycleSyncAI** is an iOS app designed to provide personalized **diet and workout recommendations** tailored to a woman’s **menstrual cycle phase**. By integrating menstrual data from Apple **HealthKit** and optional user profile inputs (age, weight, height, medical conditions, dietary restrictions, goals, and preferences), the app generates dynamic, phase-aware suggestions to support holistic wellness. Unlike static wellness tools, **CycleSyncAI** leverages **Perplexity’s Sonar Pro API** to deliver **expert-informed**, LLM-generated guidance — including a daily grocery list and motivational feedback — customized to the user’s cycle and lifestyle. [​](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#problem-&-solution) Problem & Solution -------------------------------------------------------------------------------------------------------- > **Why it matters:** > Most apps overlook the hormonal changes that affect women’s fitness and nutrition needs across their cycle, leaving users with generic advice. **CycleSyncAI** bridges this gap by combining Apple HealthKit data with Sonar Pro’s LLM to generate **adaptive, cycle-aware recommendations** for better health outcomes. [​](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#features) Features ------------------------------------------------------------------------------------ * **Personalized diet & workout suggestions** per cycle phase * Syncs with Apple HealthKit for real-time cycle tracking * User profile inputs for advanced personalization (age, goals, restrictions, etc.) * **Auto-generated daily grocery list** * Smooth, modern UI with gradients and subtle animations * **Motivational AI feedback** tailored to user preferences * Local data storage and private processing [​](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#motivation) Motivation ---------------------------------------------------------------------------------------- > “I wanted a tailored regime for myself and couldn’t find it all in one place.” **CycleSyncAI** was born from the need for a science-backed, easy-to-use app that adapts wellness guidance to women’s natural hormonal rhythms, something missing in most mainstream fitness and nutrition platforms. [​](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#repository-structure) Repository Structure ------------------------------------------------------------------------------------------------------------ Copy Ask AI CycleSyncAI.xcodeproj → Xcode project file CycleSyncAI/ → Source code ├── EatPlanViewController.swift → Diet plan generation & display ├── WorkoutPlanViewController.swift → Workout plan generation & display ├── HomepageViewController.swift → Navigation & main screen ├── UserProfileViewController.swift → Input & storage of user data ├── HealthManager.swift → Apple HealthKit menstrual data ├── UserProfile.swift → Local profile model Main.storyboard → App UI & layout Assets.xcassets → Images & app icons Info.plist → Permissions & configurations [​](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#setup-instructions) Setup Instructions -------------------------------------------------------------------------------------------------------- 1. Clone the repo 2. Open in **Xcode** 3. Ensure Apple HealthKit is enabled on your device 4. Insert your **Sonar Pro API key** 5. Run the app on a physical device (recommended) [​](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#sonar-api-usage) Sonar API Usage -------------------------------------------------------------------------------------------------- The app sends structured prompts to the **Sonar Pro API** including: * Cycle phase (from HealthKit) * User profile info (age, weight, goals, etc.) * Meal preferences & restrictions In return, it receives: * **Personalized diet plan** * **Custom workout plan** * **Daily grocery list** * **Motivational feedback** These are parsed and rendered as styled HTML inside the app using WebViews. [​](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#demo-video) Demo Video ---------------------------------------------------------------------------------------- > _Note: The LLM takes ~30–60 seconds per request. This wait time was trimmed in the video for brevity._ [​](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#impact) Impact -------------------------------------------------------------------------------- **CycleSyncAI** empowers women to make informed, body-aware decisions in daily life. The app supports better: * Energy management * Fitness results * Mental well-being * Motivation and confidence It also reduces decision fatigue with automatically prepared grocery lists and uplifting guidance. [​](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai#links) Links ------------------------------------------------------------------------------ * [GitHub Repository](https://github.com/medhini98/cyclesyncai-api-cookbook) Was this page helpful? YesNo [Valetudo AI | Trusted Medical Answer Assistant\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) [FlameGuardAI | AI-powered wildfire prevention\ \ Next](https://docs.perplexity.ai/cookbook/showcase/flameguardai) ⌘I --- # BazaarAISaathi | AI-Powered Indian Stock Market Assistant - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase BazaarAISaathi | AI-Powered Indian Stock Market Assistant Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#code-explanation) * [Demo Video](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#demo-video) * [Links](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#links) **BazaarAISaathi** is an AI-powered platform designed to empower investors with actionable insights into the Indian stock market. Leveraging advanced natural language processing, real-time data analytics, and expert-driven financial modeling, the app delivers personalized investment strategies, market sentiment analysis, and portfolio optimization recommendations. [​](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#features) Features --------------------------------------------------------------------------------------- * **Financial Independence Planner (FIRE)** with personalized plans based on age, salary, and goals * **Investment Advice Tester** using EasyOCR for text extraction and AI validation * **Fundamental & Technical Analysis** with comprehensive company reports and trading strategies * **Portfolio Analysis** with multi-dimensional analysis and stock-wise recommendations * **Market Research & Competitor Benchmarking** using AI-driven industry trend analysis * **Real-Time Stock Data** with live price tracking and trend analysis * **Hypothesis Testing** using historical and real-time market data * **Investment Books Summary** with concise summaries of top 50 investment books [​](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#prerequisites) Prerequisites ------------------------------------------------------------------------------------------------- * Python 3.8+ and pip * Streamlit for web application framework * Perplexity API key (Sonar models) * Optional: EasyOCR for image text extraction [​](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#installation) Installation ----------------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/mahanteshimath/BazaarAISaathi.git cd BazaarAISaathi # Install dependencies pip install -r requirements.txt [​](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#configuration) Configuration ------------------------------------------------------------------------------------------------- Create `secrets.toml` file for Streamlit secrets: Copy Ask AI PERPLEXITY_API_KEY = "your_perplexity_api_key" # Add other API keys as needed [​](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#usage) Usage --------------------------------------------------------------------------------- 1. **Start the Application**: Copy Ask AI streamlit run Home.py 2. **Access Features**: * Navigate through different pages for specific functionality * Use the main dashboard for overview and navigation * Access specialized tools like portfolio analysis, FIRE planning, and tip testing 3. **Run Specific Modules**: Copy Ask AI streamlit run pages/Financial_Independence.py streamlit run pages/Portfolio_Analysis.py streamlit run pages/Tip_Tester.py [​](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#code-explanation) Code Explanation ------------------------------------------------------------------------------------------------------- * **Frontend**: Streamlit web application with interactive pages and real-time data visualization * **Backend**: Python-based business logic with Pandas for data manipulation and analysis * **AI Integration**: Perplexity Sonar API models (sonar-deep-research, sonar-reasoning-pro, sonar-pro) for financial analysis * **Data Processing**: Real-time stock data fetching, CSV data management, and market insights generation * **Text Extraction**: EasyOCR integration for processing investment tips from images * **Portfolio Management**: Comprehensive portfolio analysis with optimization recommendations * **Market Analysis**: Technical and fundamental analysis with sentiment scoring [​](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#demo-video) Demo Video ------------------------------------------------------------------------------------------- [​](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi#links) Links --------------------------------------------------------------------------------- * [GitHub Repository](https://github.com/mahanteshimath/BazaarAISaathi) * [Live Application](https://bazaar-ai-saathi.streamlit.app/) * [Architecture Diagram](https://github.com/mahanteshimath/BazaarAISaathi/raw/main/src/App_Architecture.jpg) Was this page helpful? YesNo [FirstPrinciples | AI Learning Roadmap Generator\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/first-principle) [4Point Hoops | AI Basketball Analytics Platform\ \ Next](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) ⌘I --- # Fact Dynamics | Real-time Fact-Checking Flutter App - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Fact Dynamics | Real-time Fact-Checking Flutter App Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#fact-dynamics-%7C-real-time-fact-checking-flutter-app) * [Features](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#prerequisites) * [Installation (Follow Detailed guideline on the Repository)](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#installation-follow-detailed-guideline-on-the-repository) * [Usage](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#usage) * [Real-time Speech Fact-Checking](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#real-time-speech-fact-checking) * [Image Analysis](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#image-analysis) * [Screenshots](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#screenshots) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#code-explanation) * [Open Source SDKs](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#open-source-sdks) * [Demo Video](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#demo-video) * [Links](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#links) [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#fact-dynamics-|-real-time-fact-checking-flutter-app) Fact Dynamics | Real-time Fact-Checking Flutter App ========================================================================================================================================================================== ![Fact Dynamics logo](https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/icon/icon.png) **Hackathon Submission** - Built for Perplexity Hackathon in Information Tools & Deep Research categories. Fact Dynamics is a cross-platform Flutter app that provides real-time fact-checking for spoken content and images. Perfect for live debates, presentations, and on-the-fly information verification. [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#features) Features ------------------------------------------------------------------------------------ * Real-time speech transcription and fact-checking during live conversations * Image text extraction and claim verification with source citations * Claim rating system (TRUE, FALSE, MISLEADING, UNVERIFIABLE) with explanations * Source citations - Provides authoritative URLs backing each verdict * Debate mode with continuous speech recognition and streaming feedback * User authentication via Firebase (Google, Email) with persistent chat history * Cross-platform support for iOS, Android, and Web [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#prerequisites) Prerequisites ---------------------------------------------------------------------------------------------- * Flutter SDK 3.0.0 or newer * Dart SDK 2.17.0 or newer * Firebase CLI for authentication and database setup * Perplexity API key for Sonar integration * Device with microphone access for speech recognition [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#installation-follow-detailed-guideline-on-the-repository) Installation (Follow Detailed guideline on the Repository) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Copy Ask AI git clone https://github.com/vishnu32510/fact_pulse.git cd fact_pulse flutter pub get [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#usage) Usage ------------------------------------------------------------------------------ ### [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#real-time-speech-fact-checking) Real-time Speech Fact-Checking * Streams 5-second audio chunks through Flutter’s `speech_to_text` * Sends transcribed snippets to Sonar API with structured prompts * Returns JSON with claims, ratings (TRUE/FALSE/MISLEADING/UNVERIFIABLE), explanations, and sources ### [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#image-analysis) Image Analysis * Uploads images/URLs to Sonar API for text extraction * Verifies extracted claims against authoritative sources * Provides comprehensive analysis with source attribution [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#screenshots) Screenshots ------------------------------------------------------------------------------------------ | | | | --- | --- | | ![Dashboard](https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/screenshots/2.%20Dashboard.png) | ![Fact checking interface](https://raw.githubusercontent.com/vishnu32510/fact_pulse/main/assets/screenshots/4.%20Fact%20Checks(Speech,%20Debate,%20Image).png) | [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#code-explanation) Code Explanation ---------------------------------------------------------------------------------------------------- * Frontend: Flutter with BLoC pattern for state management targeting iOS, Android, and Web * Backend: Firebase (Firestore, Authentication) for user data and chat history persistence * Speech Processing: speech\_to\_text package for real-time audio transcription * API Integration: Custom Dart client calling Perplexity Sonar API with structured prompts * Image Processing: Built-in image picker with base64 encoding for multimodal analysis * Data Architecture: Firestore collections per user with subcollections for debates, speeches, and images [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#open-source-sdks) Open Source SDKs ---------------------------------------------------------------------------------------------------- Built two reusable packages for the Flutter community: * **[perplexity\_dart](https://pub.dev/packages/perplexity_dart) ** - Core Dart SDK for Perplexity API * **[perplexity\_flutter](https://pub.dev/packages/perplexity_flutter) ** - Flutter widgets and BLoC integration [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#demo-video) Demo Video ---------------------------------------------------------------------------------------- [​](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics#links) Links ------------------------------------------------------------------------------ * **[GitHub Repository](https://github.com/vishnu32510/fact_pulse) ** - Full source code * **[Live Demo](https://fact-pulse.web.app/) ** - Try the web version * **[Devpost Submission](https://devpost.com/software/fact-dynamics) ** - Hackathon entry Was this page helpful? YesNo [CityPulse | AI-Powered Geospatial Discovery Search\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) [Perplexity Dart & Flutter SDKs\ \ Next](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) ⌘I --- # Perplexity Crawlers - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/bots#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Help & Resources Perplexity Crawlers Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) | User Agent | Description | | --- | --- | | PerplexityBot | `PerplexityBot` is designed to surface and link websites in search results on Perplexity. It is not used to crawl content for AI foundation models. To ensure your site appears in search results, we recommend allowing `PerplexityBot` in your site’s `robots.txt` file and permitting requests from our published IP ranges listed below.

Full user-agent string: `Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; PerplexityBot/1.0; +https://perplexity.ai/perplexitybot)`

Published IP addresses: [https://www.perplexity.com/perplexitybot.json](https://www.perplexity.com/perplexitybot.json) | | Perplexity‑User | `Perplexity-User` supports user actions within Perplexity. When users ask Perplexity a question, it might visit a web page to help provide an accurate answer and include a link to the page in its response. `Perplexity-User` controls which sites these user requests can access. It is not used for web crawling or to collect content for training AI foundation models.

Full user-agent string: `Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Perplexity-User/1.0; +https://perplexity.ai/perplexity-user)`

Published IP addresses: [https://www.perplexity.com/perplexity-user.json](https://www.perplexity.com/perplexity-user.json)


Since a user requested the fetch, this fetcher generally ignores robots.txt rules. | [​](https://docs.perplexity.ai/guides/bots#waf-configuration) WAF Configuration ---------------------------------------------------------------------------------- If you’re using a Web Application Firewall (WAF) to protect your site, you may need to explicitly whitelist Perplexity’s bots to ensure they can access your content. Below are configuration guidelines for popular WAF providers. ### [​](https://docs.perplexity.ai/guides/bots#cloudflare-waf) Cloudflare WAF To configure Cloudflare WAF to allow Perplexity bots: 1 Navigate to WAF settings In your Cloudflare dashboard, go to **Security** → **WAF**. 2 Create a new rule Click on **Custom rules** and create a new rule to allow Perplexity bots. 3 Configure rule conditions Set up a rule that combines both User-Agent and IP address conditions: * **Field**: User Agent * **Operator**: Contains * **Value**: `PerplexityBot` OR `Perplexity-User` **AND** * **Field**: IP Source Address * **Operator**: Is in * **Value**: Use the IP ranges from the official endpoints listed below 4 Set rule action Set the action to **Allow** to ensure these requests bypass other security rules. ### [​](https://docs.perplexity.ai/guides/bots#aws-waf) AWS WAF For AWS WAF configuration, create IP sets and string match conditions: 1 Create IP sets In the AWS WAF console, create IP sets for both PerplexityBot and Perplexity-User using the IP addresses from the official endpoints listed below. 2 Create string match conditions Create string match conditions for the User-Agent headers: * `PerplexityBot` * `Perplexity-User` 3 Create allow rules Create rules that combine the IP sets with the corresponding User-Agent strings, and set the action to **Allow**. 4 Associate with Web ACL Associate these rules with your Web ACL and ensure they have higher priority than blocking rules. ### [​](https://docs.perplexity.ai/guides/bots#ip-address-sources) IP Address Sources Always use the most current IP ranges from the official JSON endpoints. These addresses are updated regularly and should be the source of truth for your WAF configurations. * **PerplexityBot IP addresses**: [https://www.perplexity.com/perplexitybot.json](https://www.perplexity.com/perplexitybot.json) * **Perplexity-User IP addresses**: [https://www.perplexity.com/perplexity-user.json](https://www.perplexity.com/perplexity-user.json) Set up automated processes to periodically fetch and update your WAF rules with the latest IP ranges from these endpoints to ensure continuous access for Perplexity bots. ### [​](https://docs.perplexity.ai/guides/bots#best-practices) Best Practices When configuring WAF rules for Perplexity bots, combine both User-Agent string matching and IP address verification for enhanced security while ensuring legitimate bot traffic can access your content. Changes to WAF configurations may take some time to propagate. Monitor your logs to ensure the rules are working as expected and that legitimate Perplexity bot traffic is being allowed through. Was this page helpful? YesNo [Privacy & Security\ \ Previous](https://docs.perplexity.ai/guides/privacy-security) ⌘I --- # Flow & Focus | Personalized News for Genuine Understanding - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Flow & Focus | Personalized News for Genuine Understanding Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#links) **Flow & Focus** is a personalized news application that transforms news consumption into a learning experience. It uniquely combines rapid discovery through a vertical news feed (Flow) with in-depth, interactive learning dialogues (Focus), powered by Perplexity’s Sonar Pro and Sonar Deep Research models. [​](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#features) Features ------------------------------------------------------------------------------------- * **Dual Mode Interface**: Flow Feed for quick news discovery and Focus for personalized deep dives * **Vertical News Feed**: Swipeable news snippets with AI-generated summaries, tags, and background images * **Interactive Deep Dives**: Tap key phrases for focused content, with horizontally scrollable detail panes * **Personalized Learning**: AI-powered conversation segments with personas like “Oracle” and “Explorer” * **Smart Personalization**: Tracks reading patterns to tailor content selection automatically * **Real-time Content**: Leverages Sonar Pro for up-to-date news and Sonar Deep Research for detailed analysis * **Visual Enhancement**: Dynamic background images generated via Runware.ai based on content keywords [​](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#prerequisites) Prerequisites ----------------------------------------------------------------------------------------------- * Node.js 18+ and npm * Perplexity API key * Runware API key for image generation * Next.js 15 and React 19 environment [​](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#installation) Installation --------------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/michitomo/NewsReel.git cd NewsReel # Install dependencies npm install # Set up environment variables cp .env.example .env.local [​](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#configuration) Configuration ----------------------------------------------------------------------------------------------- Create `.env.local` file: Copy Ask AI PERPLEXITY_API_KEY=your_perplexity_api_key_here RUNWARE_API_KEY=your_runware_api_key_here PERPLEXITY_FOCUS_MODEL=sonar-deep-research [​](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#usage) Usage ------------------------------------------------------------------------------- 1. **Start Development Server**: Copy Ask AI npm run dev 2. **Access Application**: Open [http://localhost:3000](http://localhost:3000/) in your browser 3. **Flow Feed**: Scroll vertically through news snippets and tap key phrases for deep dives 4. **Focus Mode**: Generate personalized digests with interactive conversation segments 5. **Personalization**: Your viewing patterns automatically influence content selection [​](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#code-explanation) Code Explanation ----------------------------------------------------------------------------------------------------- * **Frontend**: Next.js 15 with React 19, TypeScript, Tailwind CSS, and Framer Motion for animations * **State Management**: Zustand with localStorage persistence for user preferences * **AI Integration**: Perplexity Sonar Pro for real-time news and Sonar Deep Research for in-depth analysis * **Image Generation**: Runware SDK integration for dynamic background images based on content keywords * **API Routes**: Server-side integration handling Perplexity and Runware API calls * **Mobile-First Design**: Swipe gestures and responsive layout for intuitive mobile experience [​](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus#links) Links ------------------------------------------------------------------------------- * [GitHub Repository](https://github.com/michitomo/NewsReel) * [Demo Video](https://www.youtube.com/watch?v=09h7zluuhQI) * [Perplexity Hackathon](https://perplexityhackathon.devpost.com/) * [Perplexity Hackathon Project](https://devpost.com/software/flow-focus) Was this page helpful? YesNo [Executive Intelligence | AI-Powered Strategic Decision Platform\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension\ \ Next](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) ⌘I --- # CityPulse | AI-Powered Geospatial Discovery Search - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase CityPulse | AI-Powered Geospatial Discovery Search Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [CityPulse - AI-Powered Geospatial Discovery](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search#citypulse-ai-powered-geospatial-discovery) * [What CityPulse Does](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search#what-citypulse-does) * [How It Uses Perplexity Sonar](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search#how-it-uses-perplexity-sonar) * [Links](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search#links) [​](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search#citypulse-ai-powered-geospatial-discovery) CityPulse - AI-Powered Geospatial Discovery ============================================================================================================================================================== ![CityPulse Main Interface](https://raw.githubusercontent.com/anevsky/CityPulse/main/assets/CityPulse-GeoSearch-App-1.jpg) CityPulse is an intelligent location-based discovery search that helps users explore what’s happening around them right now. It demonstrates how to create personalized, real-time local insights using Perplexity’s Sonar models. [![Demo Video](https://cdn.loom.com/sessions/thumbnails/6507fa27571442e680edf787b0f0690d-2fa2c36169822631-full-play.gif)](https://youtu.be/Y0UIhh3diJg) [​](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search#what-citypulse-does) What CityPulse Does ---------------------------------------------------------------------------------------------------------------- * **Real-time local discovery** - Find current events, restaurants, and local alerts near any location * **AI-powered search suggestions** - Get intelligent search recommendations as you type * **Personalized insights** - Receive AI-generated advice on what to try, best times to visit, and pro tips * **Interactive mapping** - Explore results on an interactive map with custom markers and detailed popups ![Search Interface](https://raw.githubusercontent.com/anevsky/CityPulse/main/assets/CityPulse-GeoSearch-App-2.jpg) [​](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search#how-it-uses-perplexity-sonar) How It Uses Perplexity Sonar ---------------------------------------------------------------------------------------------------------------------------------- CityPulse leverages two key Perplexity models: **Sonar for Real-Time Data** Copy Ask AI # Get current local information with geographic context response = client.chat.completions.create( model="sonar", messages=[{\ "role": "user", \ "content": f"Find current events, restaurants, and alerts near {lat}, {lng}"\ }], response_format={"type": "json_schema", "json_schema": {"schema": LOCAL_INFO_SCHEMA}} ) **Sonar Reasoning for Personalized Insights** Copy Ask AI # Generate AI-powered location recommendations response = client.chat.completions.create( model="sonar-reasoning", messages=[{\ "role": "user",\ "content": f"Provide personalized insights for {location_name}: what to try, best times to visit, pro tips"\ }] ) The app uses structured JSON schemas to ensure consistent data formatting and includes citation tracking for source verification. ![AI Insights](https://raw.githubusercontent.com/anevsky/CityPulse/main/assets/CityPulse-GeoSearch-App-3.jpg) [​](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search#links) Links ------------------------------------------------------------------------------------ * [GitHub Repository](https://github.com/anevsky/CityPulse) * [Live Demo](https://citypulse-ppx.uc.r.appspot.com/) * **[Built with ❤️ by Alex Nevsky](https://alexnevsky.com/) ** Was this page helpful? YesNo [Briefo | Perplexity Powered News & Finance Social App\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/briefo) [Fact Dynamics | Real-time Fact-Checking Flutter App\ \ Next](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) ⌘I --- # Executive Intelligence | AI-Powered Strategic Decision Platform - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Executive Intelligence | AI-Powered Strategic Decision Platform Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#links) **Executive Intelligence** is a comprehensive Perplexity Sonar-powered application that provides executives and board members with instant, accurate, and credible intelligence for strategic decision-making. It delivers board-ready insights derived from real-time data sources, powered by Perplexity’s Sonar API. [​](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#features) Features --------------------------------------------------------------------------------------------- * **Competitive Intelligence Briefs** with comprehensive, board-ready competitive analysis and verifiable citations * **Scenario Planning (“What If?” Analysis)** for dynamic future scenario generation based on real-time data * **Board Pack Memory** for saving and organizing intelligence briefs, scenario analyses, and benchmark reports * **Instant Benchmarking & Peer Comparison** with source-cited visual comparisons across critical metrics * **Real-time Data Integration** leveraging Perplexity Sonar API for up-to-date market intelligence * **Professional Formatting** with structured reports, executive summaries, and board-ready presentations [​](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#prerequisites) Prerequisites ------------------------------------------------------------------------------------------------------- * Node.js 18+ and npm/yarn * Git * Perplexity API key (Sonar Pro) [​](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#installation) Installation ----------------------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/raishs/perplexityhackathon.git cd perplexityhackathon # Install dependencies npm install # Set up environment variables cp .env.example .env.local [​](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#configuration) Configuration ------------------------------------------------------------------------------------------------------- Create `.env.local` file: Copy Ask AI PERPLEXITY_API_KEY=your_perplexity_api_key [​](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#usage) Usage --------------------------------------------------------------------------------------- 1. **Start Development Server**: Copy Ask AI npm run dev 2. **Access Application**: Open [http://localhost:3000](http://localhost:3000/) in your browser 3. **Generate Intelligence**: * Enter a company name in the input field * Click “Competitive Analysis” for comprehensive briefs * Use “Scenario Planning” for “what-if” analysis * Access “Benchmarking” for peer comparisons * Save reports to “Board Pack” for later access 4. **Board Pack Management**: Use the ”📁 Board Pack” button to view and manage saved intelligence reports [​](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#code-explanation) Code Explanation ------------------------------------------------------------------------------------------------------------- * **Frontend**: Next.js with TypeScript and React for modern, responsive UI * **Backend**: Next.js API routes handling Perplexity Sonar API integration * **AI Integration**: Perplexity Sonar Pro for real-time competitive intelligence and scenario analysis * **State Management**: React Context for boardroom memory and persistent data storage * **Markdown Processing**: Custom utilities for parsing AI responses and citation handling * **Error Handling**: Comprehensive timeout and error management for API calls * **Professional Output**: Structured formatting for board-ready presentations with source citations [​](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence#links) Links --------------------------------------------------------------------------------------- * [GitHub Repository](https://github.com/raishs/perplexityhackathon) Was this page helpful? YesNo [MVP LifeLine | AI Youth Empowerment Platform\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) [Flow & Focus | Personalized News for Genuine Understanding\ \ Next](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) ⌘I --- # FlameGuardAI | AI-powered wildfire prevention - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/flameguardai#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase FlameGuardAI | AI-powered wildfire prevention Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [🧠 What it does](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%A7%A0-what-it-does) * [Demo](https://docs.perplexity.ai/cookbook/showcase/flameguardai#demo) * [Try it out](https://docs.perplexity.ai/cookbook/showcase/flameguardai#try-it-out) * [Key Features:](https://docs.perplexity.ai/cookbook/showcase/flameguardai#key-features%3A) * [⚙️ How it works](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%E2%9A%99%EF%B8%8F-how-it-works) * [The FlameGuard AI™ Process](https://docs.perplexity.ai/cookbook/showcase/flameguardai#the-flameguard-ai%E2%84%A2-process) * [🔍 Deep Research with Perplexity Sonar API](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%94%8D-deep-research-with-perplexity-sonar-api) * [Technical Stack](https://docs.perplexity.ai/cookbook/showcase/flameguardai#technical-stack) * [🏆 Accomplishments that we’re proud of](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%8F%86-accomplishments-that-we%E2%80%99re-proud-of) * [📚 What we learned](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%93%9A-what-we-learned) * [🚀 What’s next for FlameGuard AI™ - Prevention is Better Than Cure](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%9A%80-what%E2%80%99s-next-for-flameguard-ai%E2%84%A2-prevention-is-better-than-cure) * [Next Steps:](https://docs.perplexity.ai/cookbook/showcase/flameguardai#next-steps%3A) [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%A7%A0-what-it-does) 🧠 What it does ----------------------------------------------------------------------------------------------------------- **FlameGuard AI™** helps homeowners, buyers, and property professionals detect and act on **external fire vulnerabilities** like wildfires or neighboring structure fires. It’s more than a scan — it’s a personalized research assistant for your home. ### [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#demo) Demo ### [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#try-it-out) Try it out * [FlameGuard AI](https://flameguardai.dlyog.com/) * [FlameGuard AI MCP](https://flameguardai-mcp.dlyog.com/) * [GitHub Repo](https://github.com/dlyog/fire-risk-assessor-drone-ai) ### [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#key-features:) Key Features: * 📸 Upload a home photo * 👁️ Analyze visible fire risks via **OpenAI Vision API** * 📚 Trigger deep research using the **Perplexity Sonar API** * 📄 Get a detailed, AI-generated report with: * Risk summary * Prevention strategies * Regional best practices * 🛠️ Optional contractor referrals for mitigation * 💬 Claude (MCP) chatbot integration for conversational analysis * 🧾 GDPR-compliant data controls Whether you’re protecting your home, buying a new one, or just want peace of mind — **FlameGuard AI™ turns a photo into a plan**. [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%E2%9A%99%EF%B8%8F-how-it-works) ⚙️ How it works ----------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#the-flameguard-ai%E2%84%A2-process) The FlameGuard AI™ Process 1. **📸 Upload**: User uploads a photo of their property 2. **👁️ AI Vision Analysis**: OpenAI Vision API identifies specific vulnerabilities (e.g., flammable roof, dry brush nearby) 3. **🔍 Deep Research**: For each risk, we generate a **custom research plan** and run **iterative agentic-style calls** to Perplexity Sonar 4. **📄 Report Generation**: Research is **aggregated, organized, and formatted** into an actionable HTML report — complete with citations, links, and visual guidance 5. **📧 Delivery**: Detailed report sent via email with DIY solutions and professional recommendations ### [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%94%8D-deep-research-with-perplexity-sonar-api) 🔍 Deep Research with Perplexity Sonar API The real innovation is how we use the **Perplexity Sonar API**: * We treat it like a research assistant gathering the best available information * Each vulnerability triggers multiple queries covering severity, mitigation strategies, and localized insights * Results include regional fire codes, weather patterns, and local contractor availability This kind of **structured, trustworthy, AI-powered research would not be possible without Perplexity**. ### [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#technical-stack) Technical Stack FlameGuard AI™ is powered by a modern GenAI stack and built to scale: * **Frontend**: Lightweight HTML dashboard with user account control, photo upload, and report access * **Backend**: Python (Flask) with RESTful APIs * **Database**: PostgreSQL (local) with **Azure SQL-ready** schema * **AI Integration**: OpenAI Vision API + Perplexity Sonar API * **Cloud-ready**: Built for **Azure App Service** with Dockerized deployment [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%8F%86-accomplishments-that-we%E2%80%99re-proud-of) 🏆 Accomplishments that we’re proud of ----------------------------------------------------------------------------------------------------------------------------------------------------------------- * Successfully used **OpenAI Vision + Perplexity Sonar API** together in a meaningful, real-world workflow * Built a functioning **MCP server** that integrates seamlessly with Claude for desktop users * Created a product that is **genuinely useful for homeowners today** — not just a demo * Kept the experience simple, affordable, and scalable from the ground up * Made structured deep research feel accessible and trustworthy [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%93%9A-what-we-learned) 📚 What we learned ----------------------------------------------------------------------------------------------------------------- * The **Perplexity Sonar API** is incredibly powerful when used agentically — not just for answers, but for reasoning. * Combining **multimodal AI (image + research)** opens up powerful decision-support tools. * Users want **actionable insights**, not just data — pairing research with guidance makes all the difference. * Trust and clarity are key: our design had to communicate complex information simply and helpfully. [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#%F0%9F%9A%80-what%E2%80%99s-next-for-flameguard-ai%E2%84%A2-prevention-is-better-than-cure) 🚀 What’s next for FlameGuard AI™ - Prevention is Better Than Cure ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- We’re just getting started. ### [​](https://docs.perplexity.ai/cookbook/showcase/flameguardai#next-steps:) Next Steps: * 🌐 Deploy to **Azure App Services** with production-ready database * 📱 Launch mobile version with location-based scanning * 🏡 Partner with **home inspection services** and **homeowners associations** * 💬 Enhance Claude/MCP integration with voice-activated AI reporting * 💸 Introduce B2B plans for real estate firms and home safety consultants * 🛡️ Expand database of **local contractor networks** and regional fire codes We’re proud to stand with homeowners — not just to raise awareness, but to enable action. **FlameGuard AI™ – Because some homes survive when others don’t.** * * * **Contact us to know more: [\[email protected\]](https://docs.perplexity.ai/cdn-cgi/l/email-protection#70191e161f30141c091f175e131f1d) ** Was this page helpful? YesNo [CycleSyncAI | Personalized Health Plans Powered by Sonar API\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) [Monday – Voice-First AI Learning Assistant\ \ Next](https://docs.perplexity.ai/cookbook/showcase/monday) ⌘I --- # Briefo | Perplexity Powered News & Finance Social App - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/briefo#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Briefo | Perplexity Powered News & Finance Social App Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo#briefo-%7C-perplexity-powered-news-%26-finance-social-app) * [Features](https://docs.perplexity.ai/cookbook/showcase/briefo#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/briefo#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/briefo#installation) * [Environment variables](https://docs.perplexity.ai/cookbook/showcase/briefo#environment-variables) * [Usage](https://docs.perplexity.ai/cookbook/showcase/briefo#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/briefo#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/briefo#links) [​](https://docs.perplexity.ai/cookbook/showcase/briefo#briefo-|-perplexity-powered-news-&-finance-social-app) Briefo | Perplexity Powered News & Finance Social App ======================================================================================================================================================================= **Briefo** delivers a personalized, AI generated newsfeed and company deep dives. Readers can follow breaking stories, request on demand financial analyses, and discuss insights with friends, all in one mobile experience powered by Perplexity’s Sonar API. [​](https://docs.perplexity.ai/cookbook/showcase/briefo#features) Features ----------------------------------------------------------------------------- * Personalized newsfeed across 17 categories with AI summaries and source links * Private and public threads for article discussion and sharing * Watch list with real time market snapshots and optional AI analyses * Deep research reports generated on 12 selectable criteria such as management, competitors, and valuation * General purpose chat assistant that remembers each user’s preferred topics [​](https://docs.perplexity.ai/cookbook/showcase/briefo#prerequisites) Prerequisites --------------------------------------------------------------------------------------- * Node 18 LTS or newer * npm, Yarn, or pnpm * Expo CLI (`npm i -g expo-cli`) * Supabase CLI 1.0 or newer for local emulation and Edge Function deploys [​](https://docs.perplexity.ai/cookbook/showcase/briefo#installation) Installation ------------------------------------------------------------------------------------- Copy Ask AI git clone https://github.com/adamblackman/briefo-public.git cd briefo-public npm install ### [​](https://docs.perplexity.ai/cookbook/showcase/briefo#environment-variables) Environment variables Copy Ask AI # .env (project root) MY_SUPABASE_URL=https://.supabase.co MY_SUPABASE_SERVICE_ROLE_KEY=... PERPLEXITY_API_KEY=... LINKPREVIEW_API_KEY=... ALPACA_API_KEY=... ALPACA_SECRET_KEY=... # .env.local (inside supabase/) # duplicate or override any secrets needed by Edge Functions [​](https://docs.perplexity.ai/cookbook/showcase/briefo#usage) Usage ----------------------------------------------------------------------- Run the Expo development server: Copy Ask AI npx expo start Deploy Edge Functions when you are ready: Copy Ask AI supabase functions deploy perplexity-news perplexity-chat perplexity-research portfolio-tab-data [​](https://docs.perplexity.ai/cookbook/showcase/briefo#code-explanation) Code Explanation --------------------------------------------------------------------------------------------- * Frontend: React Native with Expo Router (TypeScript) targeting iOS, Android, and Web * Backend: Supabase (PostgreSQL, Row Level Security, Realtime) for data and authentication * Edge Functions: TypeScript on Deno calling Perplexity, Alpaca, Alpha Vantage, and LinkPreview APIs * Hooks: Reusable React Query style data hooks live in lib/ and hooks/ * Testing and Linting: ESLint, Prettier, and Expo Lint maintain code quality [​](https://docs.perplexity.ai/cookbook/showcase/briefo#links) Links ----------------------------------------------------------------------- [GitHub Repository](https://github.com/adamblackman/briefo-public) [Live Demo](https://www.briefo.fun/) Was this page helpful? YesNo [Perplexity API Cookbook\ \ Previous](https://docs.perplexity.ai/cookbook) [CityPulse | AI-Powered Geospatial Discovery Search\ \ Next](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) ⌘I --- # FirstPrinciples | AI Learning Roadmap Generator - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/first-principle#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase FirstPrinciples | AI Learning Roadmap Generator Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/first-principle#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/first-principle#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/first-principle#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/first-principle#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/first-principle#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/first-principle#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/first-principle#links) **FirstPrinciples App** is an AI-powered tool that transforms your broad learning goals into structured, personalized roadmaps. Through an interactive chat, the AI engages you in a conversation, asking targeted questions to refine your learning needs before generating a detailed plan. The application is built to help you learn more efficiently by providing a clear path forward. [​](https://docs.perplexity.ai/cookbook/showcase/first-principle#features) Features -------------------------------------------------------------------------------------- * **Interactive Chat Interface** for defining and refining learning goals through conversation * **AI-Powered Topic Narrowing** with smart, targeted questions to specify learning objectives * **Session Management** allowing multiple roadmap discussions and progress tracking * **Visual Progress Indicators** showing when sufficient information has been gathered * **Personalized Learning Plans** with structured, step-by-step roadmaps * **Conversational AI Flow** combining OpenAI and Perplexity APIs for intelligent interactions [​](https://docs.perplexity.ai/cookbook/showcase/first-principle#prerequisites) Prerequisites ------------------------------------------------------------------------------------------------ * Python 3.8+ and pip * Node.js 16+ and npm * OpenAI API key * Perplexity API key [​](https://docs.perplexity.ai/cookbook/showcase/first-principle#installation) Installation ---------------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/william-Dic/First-Principle.git cd First-Principle # Backend setup cd flask-server pip install -r requirements.txt # Frontend setup cd ../client npm install [​](https://docs.perplexity.ai/cookbook/showcase/first-principle#configuration) Configuration ------------------------------------------------------------------------------------------------ Create `.env` file in the `flask-server` directory: Copy Ask AI OPENAI_API_KEY=your_openai_api_key PPLX_API_KEY=your_perplexity_api_key PERPLEXITY_API_KEY=your_perplexity_api_key [​](https://docs.perplexity.ai/cookbook/showcase/first-principle#usage) Usage -------------------------------------------------------------------------------- 1. **Start Backend**: Copy Ask AI cd flask-server python server.py Server runs on [http://localhost:5000](http://localhost:5000/) 2. **Start Frontend**: Copy Ask AI cd client npm start Client runs on [http://localhost:3000](http://localhost:3000/) 3. **Generate Roadmap**: * Open [http://localhost:3000](http://localhost:3000/) in your browser * Describe what you want to learn in the chat interface * Answer AI follow-up questions to refine your learning goals * Receive a personalized, structured learning roadmap [​](https://docs.perplexity.ai/cookbook/showcase/first-principle#code-explanation) Code Explanation ------------------------------------------------------------------------------------------------------ * **Frontend**: React application with conversational chat interface and progress indicators * **Backend**: Flask server managing API calls, session state, and conversation flow * **AI Integration**: Combines OpenAI API for conversational flow and Perplexity API for intelligent topic analysis * **Session Management**: Tracks conversation state and learning goal refinement * **Roadmap Generation**: Creates structured, actionable learning plans based on user input * **Conversational Flow**: Implements goal-oriented dialogue to narrow down learning objectives [​](https://docs.perplexity.ai/cookbook/showcase/first-principle#links) Links -------------------------------------------------------------------------------- * [GitHub Repository](https://github.com/william-Dic/First-Principle.git) * [Demo Video](https://github.com/user-attachments/assets/6016c5dd-6c18-415e-b982-fafb56170b87) Was this page helpful? YesNo [Ellipsis | One-Click Podcast Generation Agent\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) [BazaarAISaathi | AI-Powered Indian Stock Market Assistant\ \ Next](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) ⌘I --- # Privacy & Security - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/privacy-security#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Help & Resources Privacy & Security Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) On this page * [Data Privacy & Retention](https://docs.perplexity.ai/guides/privacy-security#data-privacy-%26-retention) * [Zero Data Retention Policy](https://docs.perplexity.ai/guides/privacy-security#zero-data-retention-policy) * [Data We Collect](https://docs.perplexity.ai/guides/privacy-security#data-we-collect) * [Security Certifications & Compliance](https://docs.perplexity.ai/guides/privacy-security#security-certifications-%26-compliance) * [Current Certifications](https://docs.perplexity.ai/guides/privacy-security#current-certifications) * [Additional Security Information](https://docs.perplexity.ai/guides/privacy-security#additional-security-information) [​](https://docs.perplexity.ai/guides/privacy-security#data-privacy-&-retention) Data Privacy & Retention ------------------------------------------------------------------------------------------------------------ ### [​](https://docs.perplexity.ai/guides/privacy-security#zero-data-retention-policy) Zero Data Retention Policy Perplexity maintains a strict **Zero Data Retention Policy** for the Sonar API. We do not retain any data sent via the Sonar API, and we absolutely do not use any customer data to train our models or for any other purposes beyond processing your immediate request. ### [​](https://docs.perplexity.ai/guides/privacy-security#data-we-collect) Data We Collect The only data we collect through the Sonar API consists of essential billable metrics required for service operation: * Number of tokens processed * Model used for each request * Request timestamp and duration * API key identification (for billing purposes) This billing metadata does not include any content from your prompts, responses, or other user data. [​](https://docs.perplexity.ai/guides/privacy-security#security-certifications-&-compliance) Security Certifications & Compliance ------------------------------------------------------------------------------------------------------------------------------------ Perplexity is compliant with industry-leading security standards and certifications: ### [​](https://docs.perplexity.ai/guides/privacy-security#current-certifications) Current Certifications **[SOC 2 Type II Report](https://trust.perplexity.ai/) ** - Comprehensive security controls audit covering security, availability, processing integrity, confidentiality, and privacy **[2025 HIPAA Gap Assessment](https://trust.perplexity.ai/) ** - Healthcare data protection compliance evaluation **[CAIQlite](https://trust.perplexity.ai/) ** - Cloud security assessment questionnaire demonstrating cloud security posture [​](https://docs.perplexity.ai/guides/privacy-security#additional-security-information) Additional Security Information -------------------------------------------------------------------------------------------------------------------------- For comprehensive details about our security measures, infrastructure protection, and compliance frameworks, visit our dedicated security portal:[Perplexity Trust Center\ -----------------------\ \ Access detailed security documentation, compliance reports, and transparency information](https://trust.perplexity.ai/) All security measures and certifications are regularly updated and maintained to ensure the highest standards of data protection and service security. Was this page helpful? YesNo [System Status\ \ Previous](https://docs.perplexity.ai/status/status) [Perplexity Crawlers\ \ Next](https://docs.perplexity.ai/guides/bots) ⌘I --- # Ellipsis | One-Click Podcast Generation Agent - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Ellipsis | One-Click Podcast Generation Agent Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#code-explanation) * [Demo Video](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#demo-video) * [Links](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#links) **Ellipsis** is a next-generation podcast generation agent that brings human-like, high-quality audio content to life on any topic with just one click. Whether it’s breaking news, deep-dive tech explainers, movie reviews, or post-match sports breakdowns, Ellipsis crafts intelligent podcast episodes that sound like they were created by seasoned hosts in a professional studio. [​](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#features) Features ------------------------------------------------------------------------------- * **Intelligent Multi-Speaker Dialogue** with multiple distinct voices and personalities * **Comprehensive Topic Coverage** from LLM architectures to lunar eclipses * **Custom Evaluation Engine** ensuring factual accuracy, legal compliance, and conversational quality * **Fully Automated Podcast Generation** with human-like, podcast-ready audio output * **Real-time Streaming Updates** via Server-Sent Events (SSE) * **Podbean Integration** for direct podcast publishing * **Trending Topics Detection** using Perplexity API [​](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#prerequisites) Prerequisites ----------------------------------------------------------------------------------------- * Node.js v16+ and npm/yarn * Python 3.10+ and pip * Redis server running (default on port 6380) * Perplexity API key, Podbean credentials [​](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#installation) Installation --------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/dineshkannan010/Ellipsis.git cd Ellipsis # Backend setup cd backend python -m venv venv source venv/bin/activate # macOS/Linux pip install -r requirements.txt # Install native packages pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu pip install git+https://github.com/freddyaboulton/orpheus-cpp.git pip install huggingface_hub[hf_xet] hf_xet # Frontend setup cd ../frontend npm install [​](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#configuration) Configuration ----------------------------------------------------------------------------------------- Create `backend/.env`: Copy Ask AI REDIS_URL=redis://your-redis-host:6379 PERPLEXITY_API_KEY=your_key_here PODBEAN_CLIENT_ID=... PODBEAN_CLIENT_SECRET=... Create `frontend/.env`: Copy Ask AI REACT_APP_API_URL=http://your-backend-host:5000 [​](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#usage) Usage ------------------------------------------------------------------------- 1. **Start Redis Server**: Copy Ask AI redis-server --port 6380 2. **Launch Backend**: Copy Ask AI cd backend python app.py 3. **Launch Frontend**: Copy Ask AI cd frontend npm run dev 4. **Optional: Podbean Integration**: Copy Ask AI cd backend/integrations/podbean_mcp pip install -e . python server.py python client.py server.py 5. **Generate Content**: Enter a topic in the homepage textbox and hit Enter. Switch to `ContentGenerationView` to see live script & audio progress. [​](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#code-explanation) Code Explanation ----------------------------------------------------------------------------------------------- * **Backend**: Python Flask with Redis pub/sub, llama.cpp, and Orpheus TTS for audio generation * **Frontend**: React with Vite, Tailwind CSS, and Server-Sent Events for real-time updates * **AI Integration**: Perplexity API for content generation and trending topics detection * **Audio Processing**: Multi-speaker TTS with distinct voice personalities * **Content Evaluation**: Built-in pipelines for factual accuracy and legal compliance * **Podcast Publishing**: Direct integration with Podbean via MCP server [​](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#demo-video) Demo Video ----------------------------------------------------------------------------------- [​](https://docs.perplexity.ai/cookbook/showcase/Ellipsis#links) Links ------------------------------------------------------------------------- * [GitHub Repository](https://github.com/dineshkannan010/Ellipsis) * [Devpost Submission](https://devpost.com/software/ellipsis) Was this page helpful? YesNo [Monday – Voice-First AI Learning Assistant\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/monday) [FirstPrinciples | AI Learning Roadmap Generator\ \ Next](https://docs.perplexity.ai/cookbook/showcase/first-principle) ⌘I --- # API Groups & Billing - Perplexity [Skip to main content](https://docs.perplexity.ai/getting-started/api-groups#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Admin API Groups & Billing Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) On this page * [What is an API Group?](https://docs.perplexity.ai/getting-started/api-groups#what-is-an-api-group) * [Prerequisites](https://docs.perplexity.ai/getting-started/api-groups#prerequisites) * [Accessing the API Portal](https://docs.perplexity.ai/getting-started/api-groups#accessing-the-api-portal) * [Creating and Managing an API Group](https://docs.perplexity.ai/getting-started/api-groups#creating-and-managing-an-api-group) * [Billing and Payment Methods](https://docs.perplexity.ai/getting-started/api-groups#billing-and-payment-methods) * [How Billing Works](https://docs.perplexity.ai/getting-started/api-groups#how-billing-works) * [Setting Up Payment](https://docs.perplexity.ai/getting-started/api-groups#setting-up-payment) * [Managing API Keys](https://docs.perplexity.ai/getting-started/api-groups#managing-api-keys) * [What are API Keys?](https://docs.perplexity.ai/getting-started/api-groups#what-are-api-keys) * [Creating an API Key](https://docs.perplexity.ai/getting-started/api-groups#creating-an-api-key) * [Adding and Managing Members](https://docs.perplexity.ai/getting-started/api-groups#adding-and-managing-members) * [Adding a Member](https://docs.perplexity.ai/getting-started/api-groups#adding-a-member) * [Filtering Members by Role](https://docs.perplexity.ai/getting-started/api-groups#filtering-members-by-role) * [Roles](https://docs.perplexity.ai/getting-started/api-groups#roles) * [Viewing Usage Metrics](https://docs.perplexity.ai/getting-started/api-groups#viewing-usage-metrics) * [Tracking Spend Per API Key](https://docs.perplexity.ai/getting-started/api-groups#tracking-spend-per-api-key) [​](https://docs.perplexity.ai/getting-started/api-groups#what-is-an-api-group) What is an API Group? -------------------------------------------------------------------------------------------------------- An **API Group** is your organization’s workspace in the Perplexity API Portal. It allows you to: * **Manage billing** and payment methods for API usage * **Create and control API keys** for accessing the Perplexity API * **Invite team members** and control their permissions (optional) * **Monitor usage and costs** across all your API keys [​](https://docs.perplexity.ai/getting-started/api-groups#prerequisites) Prerequisites ----------------------------------------------------------------------------------------- Before getting started, make sure you have: * A Perplexity account (sign up at [perplexity.ai](https://perplexity.ai/) ) * **Admin permissions** for billing and API key management * A **credit card** ready for payment setup (you won’t be charged initially) If you’re joining an existing team, you’ll need an invitation from an Admin. Contact your team lead to get access. [​](https://docs.perplexity.ai/getting-started/api-groups#accessing-the-api-portal) Accessing the API Portal --------------------------------------------------------------------------------------------------------------- Once signed in, navigate to the left-hand sidebar and expand the **API** section to access your API group and related settings. ![API Group Location](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/images/api_portal/api_group_location.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=e06ffdaa832991c18f9908943a9510b5) * * * [​](https://docs.perplexity.ai/getting-started/api-groups#creating-and-managing-an-api-group) Creating and Managing an API Group ----------------------------------------------------------------------------------------------------------------------------------- To set up your organization: 1 Access API Group Settings Click **API Group** in the left sidebar. 2 Complete Organization Details Fill out your organization’s name, address, and tax details. Your organization name and address will appear on invoices and help us support you better. **Fields include:** * Organization name and description * Address (Line 1, Line 2, City, State, Zip, Country) * Tax ID ![API Group Details](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/images/api_portal/api_group_details.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=55a355327c4738a8102fa78db2aabbe9) * * * [​](https://docs.perplexity.ai/getting-started/api-groups#billing-and-payment-methods) Billing and Payment Methods --------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/getting-started/api-groups#how-billing-works) How Billing Works The Perplexity API uses a **credit-based billing system**: * **Credits** are purchased in advance and used for API calls * **Different models** consume different amounts of credits per request * **Usage is charged** based on tokens processed and search queries made * **Automatic top-up** can be enabled to avoid service interruptions See our [Pricing page](https://docs.perplexity.ai/getting-started/pricing) for detailed cost information per model and usage type. ### [​](https://docs.perplexity.ai/getting-started/api-groups#setting-up-payment) Setting Up Payment [Access Billing Dashboard\ ------------------------\ \ Navigate directly to your API billing dashboard to manage payment methods, view usage, and configure billing settings.\ \ Go to Billing](https://www.perplexity.ai/account/api/billing) 1 Navigate to Billing Go to the **API Billing** tab in your API Portal. ![API Billing](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/images/api_portal/api_billing.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=2e2bb3598954d408eccb85d7523426e9) 2 Add Payment Method Click **Add Payment Method** and enter your credit card information. This step will not charge your credit card. It just stores payment information for future API usage. 3 Configure Auto Top-Up (Recommended) Enable automatic credit top-up to avoid service interruptions. ![Auto Reload](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/images/api_portal/auto_reload.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=3605774e24e8429a675216244126f917) If you run out of credits, your API keys will be blocked until you add to your credit balance. Auto top-up prevents this by automatically adding credits when your balance drops below a threshold. * * * [​](https://docs.perplexity.ai/getting-started/api-groups#managing-api-keys) Managing API Keys ------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/getting-started/api-groups#what-are-api-keys) What are API Keys? API keys are your credentials for accessing the Perplexity API. Each key: * **Authenticates your requests** to the Perplexity API * **Tracks usage and billing** for cost attribution * **Can be revoked or regenerated** for security purposes * **Should be kept secure** and never shared publicly You’ll need to include your API key in the Authorization header of every API request: `Authorization: Bearer YOUR_API_KEY` ### [​](https://docs.perplexity.ai/getting-started/api-groups#creating-an-api-key) Creating an API Key 1 Navigate to API Keys Go to the **API Keys** tab in your API Portal. 2 Generate New Key Click **\+ Create Key** to generate a new API key. ![Generate API Keys](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/images/api_portal/generate_api_keys.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=01afce0ba02019235fa4a0c6c21b7624) 3 Secure Your Key Copy and securely store your API key immediately. API keys are sensitive credentials. Never expose them in client-side code or share them in public repositories. * * * [​](https://docs.perplexity.ai/getting-started/api-groups#adding-and-managing-members) Adding and Managing Members --------------------------------------------------------------------------------------------------------------------- Admins can invite team members to the organization with specific roles: **Admin** or **Member**. ### [​](https://docs.perplexity.ai/getting-started/api-groups#adding-a-member) Adding a Member 1 Initiate Member Invitation Click **\+ Add Member**. ![Click on Add Member](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/images/api_portal/click_on_add_member.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=fa336b8a62d0602bf18b53fd65b02953) 2 Enter Member Details Enter the user’s email address and click **Invite**. ![Enter New Member Email](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/images/api_portal/enter_new_member_email.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=4fc27ae417addaa70612961e60fd6389) 3 Member Receives Invitation The invited user will receive an email with a link to join your group. Once they accept, they’ll appear in your member list with their assigned role. ### [​](https://docs.perplexity.ai/getting-started/api-groups#filtering-members-by-role) Filtering Members by Role Use the dropdown to filter your list of team members by role. ![Filter Members by Role](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/images/api_portal/filter_members_by_role.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=ca2cf54efd00a05c1062262ea00f2848) ### [​](https://docs.perplexity.ai/getting-started/api-groups#roles) Roles * **Admin**: Full access to invite/remove members, manage billing, and view usage data. * **Member**: Can view usage and account limits but cannot modify settings. Only Admins can make changes to billing and member permissions. * * * [​](https://docs.perplexity.ai/getting-started/api-groups#viewing-usage-metrics) Viewing Usage Metrics --------------------------------------------------------------------------------------------------------- All members can view API usage by selecting **Usage Metrics** from the sidebar. Features include: * Total API call trends over time * Breakdown by API model and key * Optional date range filters Usage metrics help you monitor API activity and optimize for cost or performance. ### [​](https://docs.perplexity.ai/getting-started/api-groups#tracking-spend-per-api-key) Tracking Spend Per API Key You can track billing for each of your API keys by following these steps: 1 Navigate to Usage Metrics Navigate to the [API section](https://www.perplexity.ai/account/api) of your **Settings** and click on **Usage Metrics** ![Navigate to dashboard](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/guides/assets/pricing/view_dashboard.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=afb598684633b152c5752b5ace7246ee) 2 Access Invoice History Select **Invoice history** > **Invoices** ![View invoice history](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/guides/assets/pricing/view_invoice_history.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=835023ff6e4e271006d23646890aea47) 3 View Invoice Details Click on any invoice to view details ![View spend per API key](https://mintcdn.com/perplexity/l9g7Fas5bu7d8tY5/guides/assets/pricing/view_spend_per_api_key.png?w=2500&fit=max&auto=format&n=l9g7Fas5bu7d8tY5&q=85&s=e9ae27aae538134e04731d3e6cbf5e06) 4 Identify API Key Charges Each item from the total bill will have a code at the end (e.g., pro (743S)) * The 4 characters in parentheses are the last 4 characters of your API key Was this page helpful? YesNo [File Attachments with Sonar\ \ Previous](https://docs.perplexity.ai/guides/file-attachments) [API Key Management\ \ Next](https://docs.perplexity.ai/guides/api-key-management) ⌘I --- # Daily News Briefing | AI-Powered News Summaries for Obsidian - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Daily News Briefing | AI-Powered News Summaries for Obsidian Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#code-explanation) * [Technical Implementation](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#technical-implementation) * [Links](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#links) **Daily News Briefing** is an Obsidian plugin that delivers AI-powered news summaries directly to your vault. Stay informed about your topics of interest with smart, automated news collection and summarization using Perplexity’s Sonar API for intelligent content curation. [​](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#features) Features ------------------------------------------------------------------------------------------ * **Personalized News Collection** based on your topics of interest and preferences * **AI-Powered Summarization** of news articles using Perplexity Sonar API * **Automated Daily Briefings** delivered directly to your Obsidian vault * **Customizable Delivery Schedule** and format options * **Seamless Obsidian Integration** with your existing knowledge management workflow * **Trusted Source Filtering** to ensure quality and reliability * **Markdown Formatting** for easy linking and organization within your vault [​](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#prerequisites) Prerequisites ---------------------------------------------------------------------------------------------------- * Obsidian desktop app installed * Perplexity API key (Sonar API access) * Internet connection for fetching news articles * TypeScript development environment (for customization) [​](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#installation) Installation -------------------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/ChenziqiAdam/Daily-News-Briefing.git cd Daily-News-Briefing # Install dependencies npm install # Build the plugin npm run build [​](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#configuration) Configuration ---------------------------------------------------------------------------------------------------- 1. **Install Plugin**: Copy the built plugin to your Obsidian plugins folder 2. **Enable Plugin**: Activate in Obsidian settings 3. **API Setup**: Enter your Perplexity API key in plugin settings 4. **Configure Topics**: Set up your news topics and delivery preferences [​](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#usage) Usage ------------------------------------------------------------------------------------ 1. **Configure Interests**: Set up preferred topics, sources, and delivery schedule 2. **Automated Collection**: Plugin uses Perplexity Sonar API to gather latest news 3. **AI Summarization**: Articles are processed and summarized using Perplexity’s capabilities 4. **Vault Delivery**: Summaries are formatted as Markdown notes in your Obsidian vault 5. **Knowledge Integration**: Link news briefings with other notes in your knowledge base [​](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#code-explanation) Code Explanation ---------------------------------------------------------------------------------------------------------- * **Frontend**: TypeScript-based Obsidian plugin with custom UI components * **AI Integration**: Perplexity Sonar API for intelligent news gathering and summarization * **Content Processing**: Automated article extraction and summarization workflows * **Scheduling**: Configurable delivery schedules and topic monitoring * **Markdown Generation**: Structured content formatting for Obsidian compatibility * **Error Handling**: Robust error management for API limits and network issues [​](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#technical-implementation) Technical Implementation -------------------------------------------------------------------------------------------------------------------------- The plugin leverages Perplexity Sonar API for: Copy Ask AI // News gathering with Perplexity Sonar API const newsQuery = `latest news about ${topic} in the past 24 hours`; const searchResponse = await perplexityClient.search({ query: newsQuery, max_results: 5, include_domains: userPreferences.trustedSources || [] }); // AI-powered summarization const summaryPrompt = `Summarize these news articles about ${topic}`; const summaryResponse = await perplexityClient.generate({ prompt: summaryPrompt, model: "sonar-medium-online", max_tokens: 500 }); [​](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing#links) Links ------------------------------------------------------------------------------------ * [GitHub Repository](https://github.com/ChenziqiAdam/Daily-News-Briefing) Was this page helpful? YesNo [PosterLens | Scientific Poster Scanner & Research Assistant\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/posterlens) [UnCovered | Real-Time Fact-Checking Chrome Extension\ \ Next](https://docs.perplexity.ai/cookbook/showcase/uncovered) ⌘I --- # Monday – Voice-First AI Learning Assistant - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/monday#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Monday – Voice-First AI Learning Assistant Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/monday#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/monday#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/monday#installation) * [Usage](https://docs.perplexity.ai/cookbook/showcase/monday#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/monday#code-explanation) * [Demo Video](https://docs.perplexity.ai/cookbook/showcase/monday#demo-video) * [Links](https://docs.perplexity.ai/cookbook/showcase/monday#links) **Monday** is a voice-enabled AI learning companion designed to bridge the gap between natural language queries and high-quality educational content. Inspired by Marvel’s JARVIS and FRIDAY, Monday delivers tailored responses in three modes—Basic, Reasoning, and Deep Research—while integrating immersive visualizations, curated video content, and accessibility-first design. [​](https://docs.perplexity.ai/cookbook/showcase/monday#features) Features ----------------------------------------------------------------------------- * **Three Learning Modes**: Basic factual answers, step-by-step reasoning, and deep research investigations * **Voice-first interaction** for hands-free learning with natural language processing * **Real-time 3D visualizations** of concepts using Three.js & WebXR * **Curated educational YouTube video integration** from trusted sources * **Multi-modal feedback** combining text, speech (via ElevenLabs), and spatial panels * **VR-optional design** for immersive experiences without requiring a headset * **Accessibility-focused interface** for mobility- and vision-impaired users [​](https://docs.perplexity.ai/cookbook/showcase/monday#prerequisites) Prerequisites --------------------------------------------------------------------------------------- * Node.js 18 LTS or newer * Modern web browser (Chrome, Edge, or Firefox recommended) * Microphone for voice interaction * Optional: VR headset for immersive mode (WebXR compatible) * Perplexity API key, ElevenLabs API key, and YouTube API key [​](https://docs.perplexity.ai/cookbook/showcase/monday#installation) Installation ------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/srivastavanik/monday.git cd monday git checkout final cd nidsmonday # Install dependencies npm install Copy Ask AI # Create a .env file and set your API keys PERPLEXITY_API_KEY=your_api_key ELEVENLABS_API_KEY=your_api_key YOUTUBE_API_KEY=your_api_key Copy Ask AI # Start Backend Server node backend-server.js # Start frontend npm run dev [​](https://docs.perplexity.ai/cookbook/showcase/monday#usage) Usage ----------------------------------------------------------------------- 1. Launch the app in your browser 2. Say **“Hey Monday”** to activate the assistant 3. Ask a question in one of three modes: * **Basic Mode** – “What is photosynthesis?” * **Reasoning Mode** – “Think about how blockchain works.” * **Deep Research Mode** – “Research into the history of quantum mechanics.” 4. View answers as floating text panels, voice responses, and interactive 3D models [​](https://docs.perplexity.ai/cookbook/showcase/monday#code-explanation) Code Explanation --------------------------------------------------------------------------------------------- * **Frontend**: TypeScript with Three.js for 3D visualizations and WebXR for VR support * **Backend**: Node.js with Socket.IO for real-time voice command processing * **AI Integration**: Perplexity Sonar API for intelligent responses with reasoning extraction * **Voice Processing**: ElevenLabs for speech synthesis and natural language understanding * **Content Curation**: YouTube API integration with smart keyword extraction for educational videos * **Accessibility**: Voice-first design with spatial audio and haptic feedback support [​](https://docs.perplexity.ai/cookbook/showcase/monday#demo-video) Demo Video --------------------------------------------------------------------------------- [​](https://docs.perplexity.ai/cookbook/showcase/monday#links) Links ----------------------------------------------------------------------- * [GitHub Repository](https://github.com/srivastavanik/monday/tree/final) Was this page helpful? YesNo [FlameGuardAI | AI-powered wildfire prevention\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/flameguardai) [Ellipsis | One-Click Podcast Generation Agent\ \ Next](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) ⌘I --- # MVP LifeLine | AI Youth Empowerment Platform - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase MVP LifeLine | AI Youth Empowerment Platform Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#links) **MVP LifeLine** is a multilingual, offline-first AI platform empowering youth emotionally, financially, and professionally—anytime, anywhere. Over 1.3 billion youth globally face barriers to career opportunities and mental well-being, especially in underserved and remote regions. MVP LifeLine breaks these barriers by combining AI, offline access, multilingual support, and a holistic tool ecosystem. [​](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#features) Features ------------------------------------------------------------------------------------------ * **Dual Mode AI** with Career Coach and Emotional Companion powered by Perplexity Sonar API * **Multilingual Support** across 10+ languages including English, French, Arabic, Spanish, Hindi, and regional languages * **Offline-First Design** with SMS/USSD integration for low-connectivity regions * **Holistic Tool Ecosystem** covering career, wellness, finance, and productivity * **SmartQ Access** for context-aware, emotionally intelligent AI responses * **Digital Hustle Hub** with AI gig discovery and freelancing tools * **Wellness Zone** with guided meditations and mental reset prompts * **Finance Zone** with budget tracking and youth-friendly money tips * **Productivity Zone** with AI Kanban board and habit tracking [​](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#prerequisites) Prerequisites ---------------------------------------------------------------------------------------------------- * Flutter SDK and Dart * Firebase project setup * Twilio account for SMS/USSD integration * Perplexity API key (Sonar) * OpenAI API key (for augmentation) [​](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#installation) Installation -------------------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/JohnUmoh/asgard.git cd asgard # Install Flutter dependencies flutter pub get # Configure Firebase flutterfire configure # Set up environment variables cp .env.example .env [​](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#configuration) Configuration ---------------------------------------------------------------------------------------------------- Create `.env` file: Copy Ask AI PERPLEXITY_API_KEY=your_sonar_api_key OPENAI_API_KEY=your_openai_api_key FIREBASE_PROJECT_ID=your_firebase_project_id TWILIO_ACCOUNT_SID=your_twilio_sid TWILIO_AUTH_TOKEN=your_twilio_token [​](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#usage) Usage ------------------------------------------------------------------------------------ 1. **Setup Firebase**: Copy Ask AI flutterfire configure 2. **Run the Application**: Copy Ask AI flutter run 3. **Access Features**: * Switch between Career Coach and Emotional Companion modes * Use SmartQ for AI-powered assistance in multiple languages * Access offline features via SMS/USSD when connectivity is limited * Explore career tools, wellness features, and productivity boosters [​](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#code-explanation) Code Explanation ---------------------------------------------------------------------------------------------------------- * **Frontend**: Flutter cross-platform application with responsive design for mobile and web * **Backend**: Firebase for authentication, data storage, and real-time synchronization * **AI Integration**: Perplexity Sonar API for dual-mode AI interactions (Career Coach & Emotional Companion) * **Offline Support**: Twilio integration for SMS/USSD communication in low-connectivity areas * **Multilingual**: Sonar API handling 10+ languages with context-aware responses * **Data Sync**: Offline data capture with automatic re-sync when connectivity returns * **Personalization**: AI adapts to user’s language, literacy level, mood history, and preferences [​](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app#links) Links ------------------------------------------------------------------------------------ * [GitHub Repository](https://github.com/JohnUmoh/asgard) * [Live Demo](https://mvplifelineaiapp.netlify.app/) Was this page helpful? YesNo [4Point Hoops | AI Basketball Analytics Platform\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) [Executive Intelligence | AI-Powered Strategic Decision Platform\ \ Next](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) ⌘I --- # Sonar Chromium Browser | Native Search Omnibox and Context Menu - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Sonar Chromium Browser | Native Search Omnibox and Context Menu Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#code-explanation) * [Demo Video](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#demo-video) * [Links](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#links) **Sonar Chromium Browser** is a Chromium browser patch that natively integrates Perplexity’s Sonar API to provide AI-powered functionality directly in the browser. Users can type `sonar ` in the omnibox for instant AI answers or select text and right-click “Summarize with Sonar” for quick summaries, streamlining research and browsing workflows. [​](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#features) Features --------------------------------------------------------------------------------------------- * **Omnibox AI Answers** with `sonar ` syntax for instant responses * **Context-menu Summarization** for selected text with one-click access * **Native Browser Integration** using Chromium’s omnibox and context-menu APIs * **Dual Model Support** using Sonar Pro for omnibox and Sonar for summaries * **Debounced Input Handling** for efficient API usage * **Custom Browser Build** demonstrating AI integration patterns [​](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#prerequisites) Prerequisites ------------------------------------------------------------------------------------------------------- * Ubuntu 22.04 (WSL2 recommended) * Chromium source code checkout * Perplexity API key * 16GB+ RAM for Chromium build * Git and standard build tools [​](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#installation) Installation ----------------------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/KoushikBaagh/perplexity-hackathon-chromium.git cd perplexity-hackathon-chromium # Apply patches to Chromium source # Follow the README for detailed Chromium setup instructions [​](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#configuration) Configuration ------------------------------------------------------------------------------------------------------- Update API keys in the modified files: Copy Ask AI // In sonar_autocomplete_provider.cc and render_view_context_menu.cc const std::string API_KEY = "your_perplexity_api_key_here"; [​](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#usage) Usage --------------------------------------------------------------------------------------- 1. **Build Chromium** with applied patches following the repository instructions 2. **Launch the custom browser** with AI integration 3. **Use Omnibox AI**: Type `sonar what is quantum tunneling?` in address bar 4. **Use Context Summarization**: Select text, right-click “Summarize with Sonar” [​](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#code-explanation) Code Explanation ------------------------------------------------------------------------------------------------------------- * **Omnibox Integration**: Custom autocomplete provider hooking into Chromium’s omnibox API * **Context Menu**: Modified render view context menu for text summarization * **API Integration**: Direct Perplexity Sonar API calls with debounced input handling * **Model Selection**: Sonar Pro for omnibox queries, Sonar for text summarization * **Browser Architecture**: Demonstrates Chromium extension points for AI features * **Build Process**: Custom Chromium build with AI patches applied [​](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#demo-video) Demo Video ------------------------------------------------------------------------------------------------- [​](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser#links) Links --------------------------------------------------------------------------------------- * [GitHub Repository](https://github.com/KoushikBaagh/perplexity-hackathon-chromium) * [Chromium Gerrit Repository](https://chromium-review.googlesource.com/c/chromium/src/+/6778540) Was this page helpful? YesNo [Greenify | Localized community-driven greenification/plantation solution with AI\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/greenify) [PosterLens | Scientific Poster Scanner & Research Assistant\ \ Next](https://docs.perplexity.ai/cookbook/showcase/posterlens) ⌘I --- # PosterLens | Scientific Poster Scanner & Research Assistant - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/posterlens#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase PosterLens | Scientific Poster Scanner & Research Assistant Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/posterlens#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/posterlens#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/posterlens#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/posterlens#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/posterlens#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/posterlens#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/posterlens#links) **PosterLens** is an iOS app that transforms static scientific posters into interactive, explorable insights using OCR and AI. Created for the Perplexity Hackathon 2025, it allows researchers, MSLs, and medical writers to scan posters and explore them interactively using natural language, extracting meaning and surfacing related studies instantly. ![PosterLens Screenshot](https://cdn.prod.website-files.com/66d49e8555a289120a81ec3e/68930ad938e072c05d1be0b9_PosterLens.png) [​](https://docs.perplexity.ai/cookbook/showcase/posterlens#features) Features --------------------------------------------------------------------------------- * **Scientific Poster Scanning** using device camera and Apple Vision OCR * **Natural Language Q&A** about poster content with AI-powered responses * **Semantic Search Integration** using Perplexity Sonar Pro for related studies * **Citation Validation** with PubMed E-utilities for academic accuracy * **Auto-Generated Research Questions** and future research directions * **On-Device Processing** for privacy and performance * **Interactive Research Experience** transforming static content into dynamic insights [​](https://docs.perplexity.ai/cookbook/showcase/posterlens#prerequisites) Prerequisites ------------------------------------------------------------------------------------------- * iOS 17+ device with camera * Xcode 15+ for development * Apple Developer account for App Store distribution * Perplexity API key (Sonar Pro) * OpenAI API key (GPT-3.5) * PubMed E-utilities access [​](https://docs.perplexity.ai/cookbook/showcase/posterlens#installation) Installation ----------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/nickjlamb/PosterLens.git cd PosterLens # Open in Xcode open PosterLens.xcodeproj [​](https://docs.perplexity.ai/cookbook/showcase/posterlens#configuration) Configuration ------------------------------------------------------------------------------------------- Add your API keys to the project configuration: Copy Ask AI // API Configuration PERPLEXITY_API_KEY=your_sonar_pro_api_key OPENAI_API_KEY=your_gpt_api_key PUBMED_API_KEY=your_pubmed_api_key [​](https://docs.perplexity.ai/cookbook/showcase/posterlens#usage) Usage --------------------------------------------------------------------------- 1. **Install from App Store**: Download PosterLens from the iOS App Store 2. **Scan Poster**: Point your camera at a scientific poster 3. **OCR Processing**: Apple Vision automatically extracts text content 4. **Ask Questions**: Use natural language to query the poster content 5. **Explore Related Research**: Discover semantically related studies via Sonar Pro 6. **Validate Citations**: Check academic references with PubMed integration [​](https://docs.perplexity.ai/cookbook/showcase/posterlens#code-explanation) Code Explanation ------------------------------------------------------------------------------------------------- * **Frontend**: Native iOS app built with SwiftUI for modern UI/UX * **OCR Processing**: Apple Vision framework for text extraction from images * **AI Integration**: Perplexity Sonar Pro API for semantic search and context understanding * **Natural Language**: GPT-3.5 for Q&A and content interpretation * **Academic Validation**: PubMed E-utilities for citation verification * **On-Device Processing**: Local OCR and processing for privacy and performance * **Research Enhancement**: Auto-generation of research questions and future directions [​](https://docs.perplexity.ai/cookbook/showcase/posterlens#links) Links --------------------------------------------------------------------------- * [GitHub Repository](https://github.com/nickjlamb/PosterLens) * [App Store](https://apps.apple.com/us/app/posterlens-research-scanner/id6745453368) Was this page helpful? YesNo [Sonar Chromium Browser | Native Search Omnibox and Context Menu\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) [Daily News Briefing | AI-Powered News Summaries for Obsidian\ \ Next](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) ⌘I --- # PerplexiCart | AI-Powered Value-Aligned Shopping Assistant - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/perplexicart#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase PerplexiCart | AI-Powered Value-Aligned Shopping Assistant Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/perplexicart#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/perplexicart#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/perplexicart#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/perplexicart#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/perplexicart#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/perplexicart#code-explanation) * [How the Sonar API Is Used](https://docs.perplexity.ai/cookbook/showcase/perplexicart#how-the-sonar-api-is-used) * [Links](https://docs.perplexity.ai/cookbook/showcase/perplexicart#links) **PerplexiCart** helps users make informed, value-aligned purchasing decisions. Powered by the **Perplexity Sonar API**, it analyzes products across the web and returns structured insights with prioritized recommendations, pros/cons, trade‑off analysis, and user sentiment — tailored to preferences like Eco‑Friendly, Durability, Ethical, and region‑specific needs. [​](https://docs.perplexity.ai/cookbook/showcase/perplexicart#features) Features ----------------------------------------------------------------------------------- * **Intelligent Product Recommendations** beyond simple spec comparison * **Priority-Based Value Alignment** (Best Value, Eco‑Friendly, Ethical, Durability, Made in India) * **Contextual Personalization** (skin type, usage patterns, region, etc.) * **Structured Research Output** with: * Research summary and top recommendations * Value alignment with reasoning * Pros/Cons and key specifications * User sentiment and community insights (Reddit, Quora) * Trade‑off analysis and buying tips * **Transparent Sources** with citations for verification [​](https://docs.perplexity.ai/cookbook/showcase/perplexicart#prerequisites) Prerequisites --------------------------------------------------------------------------------------------- * Node.js 18+ and npm/yarn * Python 3.10+ and pip * Perplexity API key [​](https://docs.perplexity.ai/cookbook/showcase/perplexicart#installation) Installation ------------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/fizakhan90/perplexicart.git cd perplexicart # Backend (FastAPI) setup cd backend python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -r requirements.txt # Frontend (Next.js) setup cd ../frontend npm install [​](https://docs.perplexity.ai/cookbook/showcase/perplexicart#configuration) Configuration --------------------------------------------------------------------------------------------- Create a `.env` file in the backend directory: Copy Ask AI PERPLEXITY_API_KEY=your_perplexity_api_key (Optional) Add any app‑specific settings as needed (cache, region defaults, etc.). [​](https://docs.perplexity.ai/cookbook/showcase/perplexicart#usage) Usage ----------------------------------------------------------------------------- 1. **Start Backend (FastAPI)**: Copy Ask AI cd backend uvicorn main:app --reload # adapt module:app if your entrypoint differs 2. **Start Frontend (Next.js)**: Copy Ask AI cd frontend npm run dev 3. **Open the App**: Visit `http://localhost:3000` and search for a product. Select your priority (e.g., Eco‑Friendly) and add optional context (skin type, region). [​](https://docs.perplexity.ai/cookbook/showcase/perplexicart#code-explanation) Code Explanation --------------------------------------------------------------------------------------------------- * **Backend (FastAPI)**: Orchestrates Sonar calls with dynamic prompt engineering based on query, selected priority, and context * **Structured Outputs**: Enforces a strict JSON schema via `response_format` to ensure consistent UI rendering * **Live Web Research**: Directs Sonar to search e‑commerce platforms, forums, review blogs, and sustainability reports * **Semantic Analysis**: Extracts value alignment, pros/cons, sentiment, and cites sources for transparency * **Frontend (Next.js/React)**: Presents a clear, user‑friendly view of recommendations, trade‑offs, and citations [​](https://docs.perplexity.ai/cookbook/showcase/perplexicart#how-the-sonar-api-is-used) How the Sonar API Is Used --------------------------------------------------------------------------------------------------------------------- PerplexiCart leverages the **Perplexity Sonar API** as its intelligence core, dynamically generating customized prompts based on user inputs like search queries, priorities and context. The API performs comprehensive web research across e-commerce sites, forums, and review platforms, with responses structured in a consistent JSON format. Through semantic analysis, it extracts key product insights including alignment with user priorities, pros/cons, and sentiment - all backed by cited sources. The FastAPI backend processes these structured responses before serving them to the Next.js frontend for a polished user experience. [​](https://docs.perplexity.ai/cookbook/showcase/perplexicart#links) Links ----------------------------------------------------------------------------- * **Live Demo**: [https://perplexicart.vercel.app/](https://perplexicart.vercel.app/) * **GitHub Repository**: [https://github.com/fizakhan90/perplexicart](https://github.com/fizakhan90/perplexicart) Was this page helpful? YesNo [UnCovered | Real-Time Fact-Checking Chrome Extension\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/uncovered) [TruthTracer | AI-Powered Misinformation Detection Platform\ \ Next](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) ⌘I --- # Greenify | Localized community-driven greenification/plantation solution with AI - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/greenify#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Greenify | Localized community-driven greenification/plantation solution with AI Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/greenify#features) * [Abstract Data Flow Diagram](https://docs.perplexity.ai/cookbook/showcase/greenify#abstract-data-flow-diagram) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/greenify#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/greenify#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/greenify#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/greenify#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/greenify#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/greenify#links) **Greenify** is a mobile application designed to encourage sustainable practices by analyzing live images and building communities. Users capture photos of their space (balcony, roadside, basement, etc.) and Greenify automatically analyzes the image using Perplexity’s Sonar API to suggest suitable plants for that location. The app also connects like-minded people in the locality to create communities for sustainable, economic, and social growth. [​](https://docs.perplexity.ai/cookbook/showcase/greenify#features) Features ------------------------------------------------------------------------------- * **AI-Powered Plant Analysis** using image recognition and location data to suggest suitable plants * **Location-Based Recommendations** considering weather, sunlight, and environmental conditions * **Community Building** connecting users with similar plant interests and sustainable goals * **Cross-Platform Mobile App** built with Expo for iOS, Android, and web * **Real-time Weather Integration** for accurate plant suitability assessment * **Structured JSON Output** using Pydantic models for consistent data handling * **AR Model Support** for enhanced plant visualization [​](https://docs.perplexity.ai/cookbook/showcase/greenify#abstract-data-flow-diagram) Abstract Data Flow Diagram ------------------------------------------------------------------------------------------------------------------- ![Abstract Data Flow Diagram](https://d112y698adiu2z.cloudfront.net/photos/production/software_photos/003/418/290/datas/gallery.jpg) [​](https://docs.perplexity.ai/cookbook/showcase/greenify#prerequisites) Prerequisites ----------------------------------------------------------------------------------------- * Node.js 20.19.4+ and npm * Python 3.10.0+ and pip * Expo CLI and SDK 51+ * Perplexity API key (Sonar Pro and Sonar Deep Research) * Android SDK/Studio or Xcode (for local builds) * Mobile device with camera for image capture [​](https://docs.perplexity.ai/cookbook/showcase/greenify#installation) Installation --------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/deepjyotipaulhere/greenify.git cd greenify # Install frontend dependencies npm install # Install backend dependencies cd service pip install -r requirements.txt [​](https://docs.perplexity.ai/cookbook/showcase/greenify#configuration) Configuration ----------------------------------------------------------------------------------------- Create `.env` file in the `service` directory: Copy Ask AI PPLX_API_KEY=your_perplexity_api_key_here [​](https://docs.perplexity.ai/cookbook/showcase/greenify#usage) Usage ------------------------------------------------------------------------- 1. **Start Backend Service**: Copy Ask AI cd service python app.py 2. **Start Frontend App**: Copy Ask AI npx expo start 3. **Access the App**: * Install Expo Go app and scan QR code, or * Open web browser on mobile and navigate to the URL shown 4. **Use the App**: * Grant camera and location permissions * Take a photo of your space (balcony, garden, etc.) * Receive AI-powered plant recommendations * Connect with nearby users for community building ![demo](https://raw.githubusercontent.com/deepjyotipaulhere/greenify/refs/heads/master/assets/images/ezgif-4647c5467e6dac.gif) [​](https://docs.perplexity.ai/cookbook/showcase/greenify#code-explanation) Code Explanation ----------------------------------------------------------------------------------------------- * **Frontend**: React Native with Expo for cross-platform mobile development * **Backend**: Python Flask API handling image processing and Perplexity API integration * **AI Integration**: Perplexity Sonar Pro for image analysis and Sonar Deep Research for plant recommendations * **Data Models**: Pydantic models for structured JSON output and data validation * **Image Processing**: Real-time image analysis with location-based context * **Community Features**: User matching based on plant suggestions and sustainable interests * **Weather Integration**: Real-time weather data for accurate plant suitability assessment [​](https://docs.perplexity.ai/cookbook/showcase/greenify#links) Links ------------------------------------------------------------------------- * [GitHub Repository](https://github.com/deepjyotipaulhere/greenify) * [Live Demo](https://greenify.expo.app/) Was this page helpful? YesNo [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) [Sonar Chromium Browser | Native Search Omnibox and Context Menu\ \ Next](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) ⌘I --- # System Status - Perplexity [Skip to main content](https://docs.perplexity.ai/status/status#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Help & Resources System Status Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) You can check the real-time status of our services at [status.perplexity.ai](https://status.perplexity.ai/) . Was this page helpful? YesNo [Frequently Asked Questions\ \ Previous](https://docs.perplexity.ai/faq/faq) [Privacy & Security\ \ Next](https://docs.perplexity.ai/guides/privacy-security) ⌘I --- # Valetudo AI | Trusted Medical Answer Assistant - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Valetudo AI | Trusted Medical Answer Assistant Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Valetudo AI](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#valetudo-ai) * [Features](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#features) * [How It Uses the Sonar API](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#how-it-uses-the-sonar-api) * [Links](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#links) * [Demo Video](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#demo-video) * [Screenshots](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#screenshots) * [Home Interface](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#home-interface) * [Prompt Templates](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#prompt-templates) * [Image Upload](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#image-upload) * [Date & Location Filters](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#date-%26-location-filters) [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#valetudo-ai) Valetudo AI ======================================================================================== **Valetudo AI** is a science-backed medical assistant powered by the Perplexity Sonar API. It provides fast, clear, and well-cited answers to health questions — helping users cut through misinformation with filters, image analysis, and ready-made prompt templates. Designed for conscious users — like parents, patients, and medical students — seeking reliable information. [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#features) Features ---------------------------------------------------------------------------------- * **Cited Answers** — sourced from a curated list of 10 trusted medical domains * **Smart Filters** — by date and country for localized, up-to-date insights * **Image Upload** — analyze photos of medication, conditions, or packaging * **Prompt Templates** — 7 categories for symptom checks, drug safety, research, and more * **Simple UI** — built with React and Tailwind CSS [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#how-it-uses-the-sonar-api) How It Uses the Sonar API -------------------------------------------------------------------------------------------------------------------- Valetudo AI integrates with [Perplexity Sonar Pro](https://docs.perplexity.ai/) , leveraging advanced features for domain-specific search and rich responses: | Feature | API Field | Purpose | | --- | --- | --- | | Context Control | `search_context_size: medium` | Balances speed and depth for focused medical Q&A | | Trusted Domains | `search_domain_filter` | Restricts results to vetted health sources | | Visual Input | `image_url` | Enables image-based medical queries | | Freshness Filter | `search_after/before_date_filter` | Helps surface recent and relevant findings | | Local Relevance | `user_location` | Tailors answers based on user’s region | [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#links) Links ---------------------------------------------------------------------------- * [GitHub Repository](https://github.com/vero-code/valetudo-ai) * [Devpost Submission](https://devpost.com/software/valetudo-ai) * [View All Screenshots](https://github.com/vero-code/valetudo-ai/tree/master/screenshots) [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#demo-video) Demo Video -------------------------------------------------------------------------------------- See Valetudo AI in action: [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#screenshots) Screenshots ---------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#home-interface) Home Interface ![Home screen](https://raw.githubusercontent.com/vero-code/valetudo-ai/refs/heads/master/screenshots/1-home.png) ### [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#prompt-templates) Prompt Templates ![Prompt templates](https://raw.githubusercontent.com/vero-code/valetudo-ai/refs/heads/master/screenshots/10-prompts.png) ### [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#image-upload) Image Upload ![Image upload](https://raw.githubusercontent.com/vero-code/valetudo-ai/refs/heads/master/screenshots/8-image-upload.png) ### [​](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai#date-&-location-filters) Date & Location Filters ![Date filter](https://raw.githubusercontent.com/vero-code/valetudo-ai/refs/heads/master/screenshots/7-date-filter.png) ![Location filter](https://raw.githubusercontent.com/vero-code/valetudo-ai/refs/heads/master/screenshots/9-location-filter.png) Was this page helpful? YesNo [PerplexiGrid | Interactive Analytics Dashboards\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) [CycleSyncAI | Personalized Health Plans Powered by Sonar API\ \ Next](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) ⌘I --- # Perplexity Lens | AI-Powered Knowledge Graph Browser Extension - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Perplexity Lens | AI-Powered Knowledge Graph Browser Extension Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#links) **Perplexity Lens** is a powerful browser extension that transforms your browsing experience by providing AI-powered insights using Perplexity AI and creating a personalized knowledge graph that visually connects the concepts you encounter online. [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#features) Features -------------------------------------------------------------------------------------- * **Smart Text Selection** with AI-generated explanations for selected text * **Webpage Summarization** for instant, concise overviews of entire pages * **Contextual RAG Insights** using Retrieval-Augmented Generation for detailed context and meanings * **Knowledge Graph Visualization** with interactive D3.js graphs showing concept connections * **Public Sharing** with URL generation for sharing graphs with others * **User Authentication** via Firebase for secure access * **Dual Storage** with local IndexedDB and cloud Firebase storage * **Responsive UI** fully functional across all devices [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#prerequisites) Prerequisites ------------------------------------------------------------------------------------------------ * Node.js v14+ and npm v6+ * Google Chrome or compatible browser * Firebase account for cloud functionality * Firebase CLI (`npm install -g firebase-tools`) * Perplexity API key and OpenAI API key [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#installation) Installation ---------------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/iamaayushijain/perplexity-lens.git cd perplexity_lens # Install dependencies npm install # Build the extension npm run build [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#configuration) Configuration ------------------------------------------------------------------------------------------------ Edit `src/config.ts`: Copy Ask AI export const PERPLEXITY_API_KEY = 'your-perplexity-key'; export const EMBEDDING_API_KEY = 'your-openai-key'; export const FIREBASE_HOSTING_URL = 'https://your-project-id.web.app'; [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#usage) Usage -------------------------------------------------------------------------------- 1. **Load Extension**: Go to `chrome://extensions/`, enable Developer mode, click “Load unpacked” and select the `dist/` directory 2. **Sign In**: Click the extension icon and authenticate via Firebase 3. **Use Features**: * **Highlight Text**: Select text on any webpage for AI-powered insights * **Summarize Page**: Use the “Summarize” feature for webpage overviews * **Ask Anything**: Hover or click on words/phrases for definitions or explanations * **View Graph**: Navigate to the Graph tab to see your knowledge graph * **Explore**: Zoom, drag, and hover over nodes in the interactive graph * **Share**: Click “Share Graph” to generate a public link [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#code-explanation) Code Explanation ------------------------------------------------------------------------------------------------------ * **Frontend**: React with TypeScript and TailwindCSS for modern, responsive UI * **Browser Extension**: Chrome extension architecture with popup and content scripts * **AI Integration**: Perplexity AI for intelligent text explanations and summarization * **Knowledge Graph**: D3.js for interactive graph visualization and concept connections * **Storage**: Dual storage system with local IndexedDB and cloud Firebase * **Authentication**: Firebase Auth for secure user access and data management * **RAG System**: Retrieval-Augmented Generation for contextual insights and definitions [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens#links) Links -------------------------------------------------------------------------------- * [GitHub Repository](https://github.com/iamaayushijain/perplexity-lens) * [Blog Post](https://ashjin.hashnode.dev/perplexity-lens-supercharge-your-web-experience-with-personalized-knowledge-graphs) Was this page helpful? YesNo [Flow & Focus | Personalized News for Genuine Understanding\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) [Greenify | Localized community-driven greenification/plantation solution with AI\ \ Next](https://docs.perplexity.ai/cookbook/showcase/greenify) ⌘I --- # PerplexiGrid | Interactive Analytics Dashboards - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase PerplexiGrid | Interactive Analytics Dashboards Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#features) * [How it uses Sonar](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#how-it-uses-sonar) * [Usage](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#code-explanation) * [Prompt Modes](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#prompt-modes) * [Tech Stack](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#tech-stack) * [Links](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#links) **PerplexiGrid** turns natural language into rich, interactive dashboards. Connect your data and mix it with live web data, ask a question, and let the Sonar API do the rest! Complete with drag-and-drop layout, AI widget generation, and ECharts-powered visualizations. [​](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#features) Features ----------------------------------------------------------------------------------- * **Natural Language to Dashboards**: Convert plain English prompts into fully functional analytics dashboards with 25+ widget types * **Live Data Integration**: Blend your own data sources with real-time web data for comprehensive insights * **Interactive Grid Layout**: Drag-and-drop interface for customizing dashboard layouts and styling * **AI-Powered Refinement**: Refine or add widgets using conversational updates * **Export & Share**: Generate PDF exports, high-res images, and shareable dashboard links [​](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#how-it-uses-sonar) How it uses Sonar ----------------------------------------------------------------------------------------------------- PerplexiGrid leverages the Sonar API through four specialized modes: * **Full Dashboard Generation (f1)**: Creates comprehensive dashboards with multiple widgets using Sonar Pro’s advanced capabilities * **Lightweight Mode (l1)**: Generates quick visualizations for embedded systems and real-time applications * **Dashboard Updates (r1)**: Enables dynamic modifications through natural language while maintaining context * **Widget Refinement (r2)**: Provides precise control over individual widget updates The system uses structured JSON schema responses to ensure consistent, ECharts-compatible output that can be directly rendered as interactive visualizations. [​](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#usage) Usage ----------------------------------------------------------------------------- 1. Open the app and start a new dashboard 2. Prompt it like: _“Show me market trends in AI startups in 2024”_ (Sonar generates chart configs, which are parsed and rendered as live widgets) ![Prompt #1](https://www.perplexigrid.com/guide/prompt_dark.gif) 3. Rearrange and style the widgets with the grid interface ![Prompt #2](https://www.perplexigrid.com/guide/move_dark.gif) ![Prompt #3](https://www.perplexigrid.com/guide/customize_dark.gif) 5. Add your own datasources to blend your data with live web data ![Prompt #4](https://www.perplexigrid.com/guide/datasource_dark.gif) 6. Refine them via text prompts or export the dashboard as needed 7. Collaborate and share easily ![Prompt #5](https://www.perplexigrid.com/guide/invite_dark.gif) [​](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#code-explanation) Code Explanation --------------------------------------------------------------------------------------------------- The user sends messages that are turned into prompts to a Supabase Edge Function that wraps the Perplexity Sonar API. Depending on the mode (`f1`, `l1`, `r1`, or `r2`), the function generates full structured outputs for dashboards, lightweight visualizations, or targeted updates. The generated layout is parsed into structured widget definitions and passed through our widget creation engine. Explore our [main sonar-api service here.](https://github.com/PetarRan/perplexigrid/blob/main/server/supabase/functions/_shared/perplexityService.ts) [​](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#prompt-modes) Prompt Modes ------------------------------------------------------------------------------------------- | Mode | Description | Use Case | Notes | | --- | --- | --- | --- | | `f1` | First-time full dashboard generation | User starts with an empty canvas and enters an initial prompt | Produces a complete dashboard layout with multiple widgets | | `l1` | Lightweight dashboard generation | Used for quick insights or previews with minimal tokens | Faster and cheaper, but returns fewer widgets with less instruction depth | | `r1` | Full dashboard regeneration | User wants to replace all existing widgets with a new prompt | Rebuilds the entire dashboard while keeping layout intact | | `r2` | Targeted widget update | User wants to change a specific widget (e.g. “make this a pie chart”) | Only the selected widget is modified based on the new instruction | [​](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#tech-stack) Tech Stack --------------------------------------------------------------------------------------- * **Frontend**: React + Vite (TypeScript), ECharts, react-grid-layout * **Backend**: Supabase Edge Functions (TypeScript on Deno) * **AI Engine**: Perplexity Sonar Pro * **Infrastructure**: Supabase (PostgreSQL, RLS, Auth), Vercel deployment [​](https://docs.perplexity.ai/cookbook/showcase/perplexigrid#links) Links ----------------------------------------------------------------------------- * [GitHub Repository](https://github.com/PetarRan/perplexigrid) * [Live Demo](https://app.perplexigrid.com/) * [Website](https://www.perplexigrid.com/) Was this page helpful? YesNo [Perplexity Dart & Flutter SDKs\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) [Valetudo AI | Trusted Medical Answer Assistant\ \ Next](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) ⌘I --- # StarPlex | AI-Powered Startup Intelligence Platform - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/starplex#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase StarPlex | AI-Powered Startup Intelligence Platform Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/starplex#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/starplex#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/starplex#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/starplex#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/starplex#usage) * [How StarPlex Uses Perplexity Sonar API](https://docs.perplexity.ai/cookbook/showcase/starplex#how-starplex-uses-perplexity-sonar-api) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/starplex#code-explanation) * [Links](https://docs.perplexity.ai/cookbook/showcase/starplex#links) **StarPlex** is an AI-powered startup intelligence platform that helps entrepreneurs validate their business ideas and connect with the resources they need to succeed. Powered primarily by **Perplexity Sonar Pro**, it features an interactive **3D globe interface** as its main UI. Simply enter your startup idea, and watch as the AI engine analyzes and visualizes insights directly on the globe—mapping out competitors, markets, demographics, VCs, and potential co-founders across the world in real-time. [​](https://docs.perplexity.ai/cookbook/showcase/starplex#features) Features ------------------------------------------------------------------------------- * **Market Validation Analysis** with AI-proof scoring, market cap estimation, and growth trend analysis * **Interactive 3D Globe Interface** for visualizing global startup intelligence data * **Competitor Research** with threat scoring and competitive landscape mapping * **VC & Investor Matching** based on investment thesis and portfolio alignment * **Co-founder Discovery** with compatibility scoring and expertise matching * **Demographic Research** with heatmap visualization of target audience locations * **AI Pitch Deck Generation** creating investor-ready presentations * **Context-Aware Chatbot** with RAG integration across all research data [​](https://docs.perplexity.ai/cookbook/showcase/starplex#prerequisites) Prerequisites ----------------------------------------------------------------------------------------- * Node.js 18+ and npm * Python 3.8+ and pip * Perplexity API key (Sonar Pro) * Mapbox token and SERP API key [​](https://docs.perplexity.ai/cookbook/showcase/starplex#installation) Installation --------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/JerryWu0430/StarPlex.git cd StarPlex # Backend setup cd backend pip install -r requirements.txt # Frontend setup cd ../frontend npm install [​](https://docs.perplexity.ai/cookbook/showcase/starplex#configuration) Configuration ----------------------------------------------------------------------------------------- Create `.env` file in the backend directory: Copy Ask AI PERPLEXITY_API_KEY=your_perplexity_api_key MAPBOX_TOKEN=your_mapbox_token SERPAPI_KEY=your_serpapi_key [​](https://docs.perplexity.ai/cookbook/showcase/starplex#usage) Usage ------------------------------------------------------------------------- 1. **Start Backend**: Copy Ask AI cd backend python main.py 2. **Start Frontend**: Copy Ask AI cd frontend npm run dev 3. **Access Application**: Open [http://localhost:3000](http://localhost:3000/) and enter your startup idea 4. **Explore Intelligence**: Use the 3D globe to visualize competitors, VCs, demographics, and co-founders 5. **Generate Assets**: Create pitch decks and chat with the AI assistant about your analysis [​](https://docs.perplexity.ai/cookbook/showcase/starplex#how-starplex-uses-perplexity-sonar-api) How StarPlex Uses Perplexity Sonar API ------------------------------------------------------------------------------------------------------------------------------------------- StarPlex leverages Perplexity’s Sonar API through a **multi-module intelligence architecture**: **Market Analysis Engine** Uses Sonar Pro for comprehensive market validation, combining Google Trends data with AI analysis to generate market cap estimates, AI-disruption scores, and growth projections with structured JSON outputs. **Competitor Intelligence** Employs multiple concurrent Sonar queries to identify competing companies, funding status, and threat levels. Each competitor receives a 1-10 threat score with detailed competitive positioning analysis. **VC & Co-founder Matching** Leverages Sonar’s real-time web knowledge to find relevant investors and potential co-founders, scoring matches based on investment thesis alignment, expertise fit, and geographic proximity. **Context-Aware Business Assistant** Implements RAG (Retrieval-Augmented Generation) by feeding all research data into Sonar conversations, creating a knowledgeable startup advisor that can answer questions about market positioning, competitive threats, and strategic decisions. **Geographic Intelligence** Combines Sonar’s demographic insights with Mapbox geocoding to create interactive heatmaps showing where target audiences are concentrated globally. [​](https://docs.perplexity.ai/cookbook/showcase/starplex#code-explanation) Code Explanation ----------------------------------------------------------------------------------------------- * **Backend**: Python FastAPI with AsyncIO for concurrent Perplexity API calls across multiple analysis modules * **Frontend**: Next.js with React 19, featuring Cobe for 3D globe visualization and Mapbox GL for interactive mapping * **AI Integration**: Multi-model Perplexity strategy using Sonar Pro for complex analysis and Sonar for faster queries * **Data Pipeline**: Intelligent caching, structured JSON responses, and real-time streaming for immediate user feedback * **Visualization**: Dynamic data binding between Perplexity insights and interactive globe/map interfaces [​](https://docs.perplexity.ai/cookbook/showcase/starplex#links) Links ------------------------------------------------------------------------- * [GitHub Repository](https://github.com/JerryWu0430/StarPlex) * [Live Demo](https://starplex.app/) * [Devpost Submission](https://devpost.com/software/starplex) Was this page helpful? YesNo [TruthTracer | AI-Powered Misinformation Detection Platform\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) [Perplexity Client | Desktop AI Chat Interface with API Controls\ \ Next](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) ⌘I --- # Rate Limits & Usage Tiers - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Admin Rate Limits & Usage Tiers Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) On this page * [What are Usage Tiers?](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#what-are-usage-tiers) * [Tier Progression](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#tier-progression) * [How Tiers Work](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#how-tiers-work) * [Rate Limits by Model](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#rate-limits-by-model) * [Search Rate Limits](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#search-rate-limits) * [How Rate Limiting Works](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#how-rate-limiting-works) * [Technical Implementation](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#technical-implementation) * [What Happens When You Hit Rate Limits?](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#what-happens-when-you-hit-rate-limits) * [Upgrading Your Tier](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#upgrading-your-tier) [​](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#what-are-usage-tiers) What are Usage Tiers? ------------------------------------------------------------------------------------------------------------ Usage tiers determine your **rate limits** and access to **beta features** based on your cumulative API spending. As you spend more on API credits over time, you automatically advance to higher tiers with increased rate limits. You can check your current usage tier by visiting your [API settings page](https://www.perplexity.ai/settings/api) . * * * [​](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#tier-progression) Tier Progression --------------------------------------------------------------------------------------------------- | Tier | Total Credits Purchased | Status | | --- | --- | --- | | **Tier 0** | $0 | New accounts, limited access | | **Tier 1** | $50+ | Light usage, basic limits | | **Tier 2** | $250+ | Regular usage | | **Tier 3** | $500+ | Heavy usage | | **Tier 4** | $1,000+ | Production usage | | **Tier 5** | $5,000+ | Enterprise usage | Tiers are based on **cumulative purchases** across your account lifetime, not current balance. * * * [​](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#how-tiers-work) How Tiers Work ----------------------------------------------------------------------------------------------- * **Automatic advancement** - Tiers increase based on your total lifetime credit purchases * **Rate limit increases** - Higher tiers get significantly more requests per minute * **Permanent status** - Once you reach a tier, you keep it (no downgrade) [​](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#rate-limits-by-model) Rate Limits by Model ----------------------------------------------------------------------------------------------------------- * Tier 0 * Tier 1 * Tier 2 * Tier 3 * Tier 4 * Tier 5 | Model | Requests per minute (RPM) | | --- | --- | | `sonar-deep-research` | 5 | | `sonar-reasoning-pro` | 50 | | `sonar-pro` | 50 | | `sonar` | 50 | | POST `/async/chat/completions` | 5 | | GET `/async/chat/completions` | 3000 | | GET `/async/chat/completions/{request_id}` | 6000 | | Model | Requests per minute (RPM) | | --- | --- | | `sonar-deep-research` | 10 | | `sonar-reasoning-pro` | 50 | | `sonar-pro` | 50 | | `sonar` | 50 | | POST `/async/chat/completions` | 10 | | GET `/async/chat/completions` | 3000 | | GET `/async/chat/completions/{request_id}` | 6000 | | Model | Requests per minute (RPM) | | --- | --- | | `sonar-deep-research` | 20 | | `sonar-reasoning-pro` | 500 | | `sonar-pro` | 500 | | `sonar` | 500 | | POST `/async/chat/completions` | 20 | | GET `/async/chat/completions` | 3000 | | GET `/async/chat/completions/{request_id}` | 6000 | | Model | Requests per minute (RPM) | | --- | --- | | `sonar-deep-research` | 40 | | `sonar-reasoning-pro` | 1,000 | | `sonar-pro` | 1,000 | | `sonar` | 1,000 | | POST `/async/chat/completions` | 40 | | GET `/async/chat/completions` | 3000 | | GET `/async/chat/completions/{request_id}` | 6000 | | Model | Requests per minute (RPM) | | --- | --- | | `sonar-deep-research` | 60 | | `sonar-reasoning-pro` | 2,000 | | `sonar-pro` | 2,000 | | `sonar` | 2,000 | | POST `/async/chat/completions` | 60 | | GET `/async/chat/completions` | 3000 | | GET `/async/chat/completions/{request_id}` | 6000 | | Model | Requests per minute (RPM) | | --- | --- | | `sonar-deep-research` | 100 | | `sonar-reasoning-pro` | 2,000 | | `sonar-pro` | 2,000 | | `sonar` | 2,000 | | POST `/async/chat/completions` | 100 | | GET `/async/chat/completions` | 3000 | | GET `/async/chat/completions/{request_id}` | 6000 | * * * [​](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#search-rate-limits) Search Rate Limits ------------------------------------------------------------------------------------------------------- The Search API has separate rate limits that apply to all usage tiers: | Endpoint | Rate Limit | Burst Capacity | | --- | --- | --- | | POST `/search` | 50 requests per second | 50 requests | **Search Rate Limiter Behavior:** * **Burst**: Can handle 50 requests instantly * **Sustained**: Exactly 50 QPS average over time Search rate limits are independent of your usage tier and apply consistently across all accounts using the same leaky bucket algorithm. **Need Higher Search Rate Limits?**If you require increased rate limits for the Search API beyond the standard 50 requests per second, please fill out our [rate limit increase request form](https://perplexity.typeform.com/to/yctmfyVT) . We’ll review your use case and work with you to accommodate your needs. * * * [​](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#how-rate-limiting-works) How Rate Limiting Works ----------------------------------------------------------------------------------------------------------------- Our rate limiting system uses a **leaky bucket algorithm** that allows for burst traffic while maintaining strict long-term rate control. ### [​](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#technical-implementation) Technical Implementation Leaky Bucket Algorithm Explained The leaky bucket algorithm works like a bucket with a small hole in the bottom: * **Bucket Capacity**: Maximum number of requests you can make instantly (burst capacity) * **Leak Rate**: How quickly tokens refill over time (your rate limit) * **Token Refill**: New requests become available at regular intervals **Key Benefits:** * ✅ Allows legitimate burst traffic * ✅ Prevents sustained abuse * ✅ Predictable and fair rate enforcement Rate Limiter Behavior Example Let’s examine how **50 requests per second** works in practice:**Parameters:** * Capacity: 50 tokens * Leak rate: 50 tokens/second * Refill: 1 token every 20ms **Scenario 1: Burst Traffic** Copy Ask AI Time 0.0s: Bucket full (50 tokens) → Send 50 requests instantly → ALL ALLOWED ✅ → Send 51st request → REJECTED ❌ (bucket empty) Time 0.020s: 1 token refilled → Send 1 request → ALLOWED ✅ → Send 2nd request → REJECTED ❌ Time 0.040s: 1 more token refilled → Send 1 request → ALLOWED ✅ **Scenario 2: Steady 50 QPS** Copy Ask AI Request every 20ms: Time 0.0s: Request → ✅ (50→49 tokens) Time 0.020s: Request → ✅ (49+1-1=49 tokens) Time 0.040s: Request → ✅ (49+1-1=49 tokens) ... maintains 49-50 tokens, all requests pass **Scenario 3: Slightly Over 50 QPS** Copy Ask AI Request every 19ms (≈52.6 QPS): → Eventually tokens deplete faster than refill → Some requests start getting rejected → Achieves exactly 50 QPS on average Real-World Implications **What this means for your applications:****✅ Burst Tolerance:** * Can handle your full rate limit instantly * Perfect for batch operations or sudden traffic spikes * No need to artificially spread requests **✅ Predictable Behavior:** * Strict average rate enforcement over time * Quick recovery after burst usage * Consistent performance across different usage patterns **❌ Abuse Prevention:** * Prevents sustained over-limit usage * Blocks excessive burst attempts * Maintains fair resource allocation **Best Practices:** * Take advantage of burst capacity for batch operations * Monitor your usage patterns to optimize request timing * Implement proper error handling for 429 responses * * * [​](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#what-happens-when-you-hit-rate-limits) What Happens When You Hit Rate Limits? ---------------------------------------------------------------------------------------------------------------------------------------------- When you exceed your rate limits: 1. **429 Error** - Your request gets rejected with “Too Many Requests” 2. **Continuous Refill** - Tokens refill continuously based on your rate limit 3. **Immediate Recovery** - New requests become available as soon as tokens refill **Example Recovery Times:** * **50 QPS limit**: 1 token refills every 20ms * **500 QPS limit**: 1 token refills every 2ms * **1,000 QPS limit**: 1 token refills every 1ms **Best Practices:** * Monitor your usage to predict when you’ll need higher tiers * Consider upgrading your tier proactively for production applications * Implement exponential backoff with jitter in your code * Take advantage of burst capacity for batch operations * Don’t artificially spread requests if you have available burst capacity * * * [​](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#upgrading-your-tier) Upgrading Your Tier --------------------------------------------------------------------------------------------------------- 1 Check Current Tier Visit your [API settings page](https://www.perplexity.ai/settings/api) to see your current tier and total spending. 2 Purchase More Credits Add credits to your account through the billing section. Your tier will automatically upgrade once you reach the spending threshold. 3 Verify Upgrade Your new rate limits take effect immediately after the tier upgrade. Check your settings page to confirm. Higher tiers significantly improve your API experience with increased rate limits, especially important for production applications. Was this page helpful? YesNo [API Key Management\ \ Previous](https://docs.perplexity.ai/guides/api-key-management) [Changelog\ \ Next](https://docs.perplexity.ai/changelog/changelog) ⌘I --- # Perplexity Dart & Flutter SDKs - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Perplexity Dart & Flutter SDKs Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#perplexity-dart-%26-flutter-sdks) * [Features](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#installation) * [For Dart Projects (Core API Only)](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#for-dart-projects-core-api-only) * [For Flutter Projects (Full Widget Support)](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#for-flutter-projects-full-widget-support) * [Environment variables](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#environment-variables) * [Usage](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#usage) * [Core API Integration](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#core-api-integration) * [Flutter Widget Layer](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#flutter-widget-layer) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#code-explanation) * [Architecture](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#architecture) * [Two-layer design](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#two-layer-design) * [Links](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#links) * [Packages](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#packages) * [Examples](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#examples) [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#perplexity-dart-&-flutter-sdks) Perplexity Dart & Flutter SDKs ===================================================================================================================================== **Perplexity Dart & Flutter SDKs** provide a comprehensive toolkit for integrating Perplexity’s AI capabilities into Dart and Flutter applications. Built specifically for the Flutter community, these packages include a lightweight core API client and ready-to-use Flutter widgets with BLoC state management. [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#features) Features ----------------------------------------------------------------------------------------- * Type-safe API client with fully typed models and compile-time safety * Streaming and non-streaming chat completions with real-time response handling * Support for all Perplexity models (Sonar, Sonar Pro, Deep Research, Reasoning variants) * Multi-image processing with base64, data URI, and HTTPS URL support * Ready-to-use Flutter widgets with BLoC state management integration * Advanced configuration options (temperature, top-p, search filters, domain restrictions) * Cross-platform support for iOS, Android, Web, and Desktop * Future-proof design with custom model string support for new Perplexity releases [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#prerequisites) Prerequisites --------------------------------------------------------------------------------------------------- * Dart SDK 2.17.0 or newer * Flutter SDK 3.0.0 or newer (for Flutter-specific features) * Perplexity API key from Perplexity API Console * Basic knowledge of Flutter BLoC pattern for widget integration [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#installation) Installation ------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#for-dart-projects-core-api-only) For Dart Projects (Core API Only) Copy Ask AI dart pub add perplexity_dart ### [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#for-flutter-projects-full-widget-support) For Flutter Projects (Full Widget Support) Copy Ask AI flutter pub add perplexity_flutter ### [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#environment-variables) Environment variables Copy Ask AI // Add to your app's configuration const String perplexityApiKey = 'your_perplexity_api_key_here'; [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#usage) Usage ----------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#core-api-integration) Core API Integration * Type-safe client with all Perplexity models (Sonar, Sonar Pro, Deep Research, Reasoning) * Streaming and non-streaming chat completions * Multimodal processing with flexible MessagePart system for text + images ### [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#flutter-widget-layer) Flutter Widget Layer * `ChatWrapperWidget` for BLoC state management * `PerplexityChatView` for real-time message display * `PerplexityChatInput` for user interaction handling [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#code-explanation) Code Explanation --------------------------------------------------------------------------------------------------------- * Core Layer: Pure Dart API client (`perplexity_dart`) for cross-platform Perplexity API integration * UI Layer: Flutter widgets (`perplexity_flutter`) with BLoC state management for rapid development * Type Safety: Fully typed models and responses prevent runtime errors and provide IntelliSense * Multimodal: Flexible MessagePart system for combining text and images in single requests * Streaming: Built-in support for real-time chat completions with proper chunk handling * Architecture: Two-layer design allows lightweight API usage or full Flutter widget integration [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#architecture) Architecture ------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#two-layer-design) Two-layer design * **Core (`perplexity_dart`)** - Pure Dart API client for all platforms * **UI (`perplexity_flutter`)** - Flutter widgets + BLoC state management Uses flexible MessagePart system for multimodal content combining text and images. [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#links) Links ----------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#packages) Packages * [perplexity\_dart on pub.dev](https://pub.dev/packages/perplexity_dart) | [GitHub](https://github.com/vishnu32510/perplexity_dart) * [perplexity\_flutter on pub.dev](https://pub.dev/packages/perplexity_flutter) | [GitHub](https://github.com/vishnu32510/perplexity_flutter) ### [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter#examples) Examples * [Flutter Example App](https://github.com/vishnu32510/perplexity_dart/tree/main/example_flutter_app) * [Dart Examples](https://github.com/vishnu32510/perplexity_dart/tree/main/example) Was this page helpful? YesNo [Fact Dynamics | Real-time Fact-Checking Flutter App\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) [PerplexiGrid | Interactive Analytics Dashboards\ \ Next](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) ⌘I --- # Perplexity MCP Server - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/mcp-server#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Getting Started Perplexity MCP Server Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) On this page * [Overview](https://docs.perplexity.ai/guides/mcp-server#overview) * [Installation](https://docs.perplexity.ai/guides/mcp-server#installation) * [One-Click Install](https://docs.perplexity.ai/guides/mcp-server#one-click-install) * [Manual Setup](https://docs.perplexity.ai/guides/mcp-server#manual-setup) * [Available Tools](https://docs.perplexity.ai/guides/mcp-server#available-tools) [​](https://docs.perplexity.ai/guides/mcp-server#overview) Overview ---------------------------------------------------------------------- The Perplexity MCP Server enables AI assistants to access Perplexity’s powerful search and reasoning capabilities directly within their workflows. Using the Model Context Protocol (MCP), you can integrate real-time web search, conversational AI, and advanced reasoning into any MCP-compatible client. The **Model Context Protocol (MCP)** is an open standard that connects AI assistants with external data sources and tools. Learn more at [modelcontextprotocol.io](https://modelcontextprotocol.io/introduction) . [​](https://docs.perplexity.ai/guides/mcp-server#installation) Installation ------------------------------------------------------------------------------ ### [​](https://docs.perplexity.ai/guides/mcp-server#one-click-install) One-Click Install Get started instantly with these one-click installers: [Install in Cursor\ -----------------\ \ Automatically configure the Perplexity MCP server in Cursor with one click.](https://cursor.com/en/install-mcp?name=perplexity&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBwZXJwbGV4aXR5LWFpL21jcC1zZXJ2ZXIiXX0=) [Install in VS Code\ ------------------\ \ Automatically configure the Perplexity MCP server in VS Code with one click.](https://vscode.dev/redirect/mcp/install?name=perplexity&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40perplexity-ai%2Fmcp-server%22%5D%7D) ### [​](https://docs.perplexity.ai/guides/mcp-server#manual-setup) Manual Setup 1 Get Your API Key [Generate API Key\ ----------------\ \ Navigate to the API Portal and generate a new key.\ \ Get Key](https://www.perplexity.ai/account/api/group) 2 Configure Your Client Add the MCP server to your client configuration: * Claude Code * Cursor * Claude Desktop * Other Clients **Option 1: Plugin Install (Recommended)**The easiest way to get started: Copy Ask AI # Add the Perplexity marketplace /plugin marketplace add perplexityai/modelcontextprotocol # Install the plugin /plugin install perplexity # Set your API key export PERPLEXITY_API_KEY="your_key_here" **Option 2: Manual Configuration**Add to your `claude.json`: Copy Ask AI { "mcpServers": { "perplexity": { "type": "stdio", "command": "npx", "args": ["-y", "perplexity-mcp"], "env": { "PERPLEXITY_API_KEY": "your_key_here" } } } } Add to your `mcp.json`: Copy Ask AI { "mcpServers": { "perplexity": { "command": "npx", "args": ["-y", "@perplexity-ai/mcp-server"], "env": { "PERPLEXITY_API_KEY": "your_key_here" } } } } Add to your `claude_desktop_config.json`: Copy Ask AI { "mcpServers": { "perplexity": { "command": "npx", "args": ["-y", "@perplexity-ai/mcp-server"], "env": { "PERPLEXITY_API_KEY": "your_key_here" } } } } For any MCP-compatible client: Copy Ask AI npx @perplexity-ai/mcp-server Set environment variable: `PERPLEXITY_API_KEY=your_key_here` 3 Start Using Restart your MCP client and start using Perplexity’s tools in your AI workflows. [​](https://docs.perplexity.ai/guides/mcp-server#available-tools) Available Tools ------------------------------------------------------------------------------------ perplexity\_search ------------------ Direct web search using the Perplexity Search API. Returns ranked search results with titles, URLs, snippets, and metadata.**Best for:** Finding current information, news, facts, or specific web content. perplexity\_ask --------------- General-purpose conversational AI with real-time web search using the `sonar-pro` model.**Best for:** Quick questions, everyday searches, and conversational queries that benefit from web context. perplexity\_research -------------------- Deep, comprehensive research using the `sonar-deep-research` model. Provides thorough analysis with citations.**Best for:** Complex topics requiring detailed investigation, comprehensive reports, and in-depth analysis. perplexity\_reason ------------------ Advanced reasoning and problem-solving using the `sonar-reasoning-pro` model.**Best for:** Logical problems, complex analysis, decision-making, and tasks requiring step-by-step reasoning. For detailed setup instructions, troubleshooting, and proxy configuration, visit our [GitHub repository](https://github.com/perplexityai/modelcontextprotocol) . Was this page helpful? YesNo [Pricing\ \ Previous](https://docs.perplexity.ai/getting-started/pricing) [Quickstart\ \ Next](https://docs.perplexity.ai/guides/perplexity-sdk) ⌘I --- # API Roadmap - Perplexity [Skip to main content](https://docs.perplexity.ai/feature-roadmap#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Help & Resources API Roadmap Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) On this page * [Timeline and Availability](https://docs.perplexity.ai/feature-roadmap#timeline-and-availability) Our roadmap is shaped by our users - have a feature in mind? Submit your suggestion [here](https://community.perplexity.ai/) and help us build the future of AI together. Video Upload Capabilities Multimodal video processing We’re expanding our multimodal capabilities to include video uploads.This feature will enable: * **Video Content Analysis**: Upload and analyze video files directly through the API * **Frame-by-Frame Processing**: Extract insights from video content at multiple time points * **Visual Scene Understanding**: Analyze visual elements, objects, and activities in video content * **Multimodal Search**: Search for information based on both visual and audio elements from your uploaded videos Supported formats will include common video file types (MP4, MOV, AVI) with reasonable file size limits for API efficiency.This capability will unlock new use cases in content moderation, educational analysis, media research, and automated video summarization. File Search & Connectors Expanded data access Expanding your ability to access and process information: * **File Repository Integration**: Query file repositories tied to your API organization * **Multi-format File Search**: Search across various file types (PDFs, documents, spreadsheets) * **External Data Source Integration**: Connect to external data stores and databases * **Enterprise Connector Parity**: Full feature parity with enterprise connector capabilities This feature will allow your applications to tap into a broader range of data sources for more comprehensive insights, enabling you to build applications that can search and analyze your organization’s entire knowledge base. Expanded Structured Outputs Support Enhanced response formatting We’re expanding our structured outputs capabilities: * **Universal JSON Support**: JSON structured outputs are now available for all models across all tiers * **Complete Regex Support**: Extending regex pattern support to all models (currently available for `sonar` and `sonar-reasoning-pro`) * **Advanced Schema Validation**: Enhanced validation options for more reliable structured data * **Output Templates**: Pre-defined templates for common use cases This expansion will make it easier to build applications that require consistent, structured data from our API responses. Documentation Overhaul More comprehensive resources We’re committed to making our documentation a truly exceptional resource: * **Improved Layout**: Optimized structure for better self-serve workflows * **Consistent Design**: Unified branding between our landing page and documentation * **Enhanced Content**: Revised explanations for better developer understanding * **Vertical-Specific Guides**: Specialized documentation for publishers, merchants, and other industry partners * **High-Fidelity Demos**: More comprehensive examples beyond our basic cookbook demos * **Comprehensive Prompt Guide**: In-depth resources to help you build effectively with our search + LLM API * **API Selection Guides**: Clear guidance on which API is best suited for specific scenarios These improvements will help you get up to speed faster and make the most of our API capabilities. Increased Rate Limits Support for high-volume applications We’re scaling our infrastructure to support significantly higher request volumes: * **Enterprise-Scale Rate Limits**: Supporting use cases up to 100K requests per minute * **High-Growth Startup Support**: Designed specifically for rapidly scaling applications * **Infrastructure Reliability**: Enhanced stability and reduced latency spikes under high load * **Regional Scaling**: Expanded infrastructure deployment for global applications This enhancement will ensure our API can grow alongside your application’s user base and processing needs, supporting everything from high-growth startups to enterprise-scale deployments. Better Error Handling Clearer troubleshooting Improving our error framework: * More descriptive error messages * Clearer guidance on resolving common issues This will reduce debugging time and help you understand and address issues more efficiently. Multimedia Capabilities Beyond text processing Broadening the types of content you can work with: * **URL Content Integration**: Specify URLs within prompts to search for and analyze content from specific web pages directly * **Advanced URL Parsing**: Extract and analyze content from web pages with enhanced accuracy and context understanding * **Web Page Analysis**: Deep content extraction including text, images, and structured data from URLs * **Real-time Web Content**: Access to live web content for dynamic analysis and research These features will enable new use cases and richer interactions within your applications, allowing you to reference specific web content and build more comprehensive research workflows with real-time web data integration. Context Management / Memory Improved context handling We’re addressing the limitations of managing context in API calls by introducing new context management features.Key improvements include: * **Efficient Context Storage**: Avoid appending responses from previous API calls to new ones, reducing the risk of exceeding context windows. * **Session-Based Memory**: Enable session-based memory to maintain context across multiple API calls without manual intervention. These enhancements will make it easier to build applications that require persistent context without hitting technical limitations. Pro Search Public Release Advanced agentic capabilities for all We’re preparing to make Pro Search available to all API users: * **Multi-step Reasoning**: Access to the advanced agentic search capabilities currently in beta * **Dynamic Tool Execution**: Automated web searches, URL content fetching, and Python code execution * **Intelligent Classification**: Automatic determination of when to use pro search vs fast search based on query complexity * **Transparent Reasoning**: Real-time streaming of the model’s thought process and tool usage This will unlock sophisticated research workflows and enable your applications to handle complex, multi-dimensional queries that require computational analysis and deep web research. Voice-to-Voice API Real-time audio interactions Introducing voice-based interactions through our API: * **Real-time Voice Processing**: Direct voice input and audio response generation * **Natural Conversation Flow**: Maintain context across voice interactions * **Multi-language Support**: Voice capabilities across multiple languages * **Low-latency Streaming**: Optimized for real-time voice applications This capability will enable voice assistants, interactive applications, and hands-free interfaces that can search and reason about information through natural speech. Finance Tools Integration Financial data and analysis Expanding our capabilities with specialized financial tools: * **Market Data Access**: Real-time and historical stock prices, market indicators * **Ticker Symbol Lookup**: Intelligent company and symbol resolution * **Financial Analysis Tools**: Price history, trend analysis, and market insights * **SEC Filing Integration**: Enhanced search and analysis of financial documents These tools will enable sophisticated financial applications, trading platforms, and investment research tools with access to comprehensive financial data and analysis capabilities. Labs Features via API Experimental capabilities Bringing cutting-edge experimental features to the API: * **Early Access Features**: Test new capabilities before general release * **Advanced Model Variants**: Access to experimental model configurations * **Prototype Integrations**: Early versions of upcoming integrations and tools * **Developer Feedback Integration**: Direct influence on feature development through testing This will give developers early access to innovative features and the opportunity to shape the future direction of our API capabilities. Enhanced Third-Party Integrations Seamless ecosystem connectivity Expanding our integration ecosystem: * **Agentic Framework Support**: Enhanced integrations with LangChain, LlamaIndex, and other AI frameworks * **Developer Platform Integration**: Native support for popular development environments * **Workflow Automation**: Integration with automation platforms and CI/CD pipelines * **Real-time Collaboration**: Enhanced tooling for team-based development These integrations will make it easier to incorporate our API into your existing development workflows and build more sophisticated AI applications. Developer Analytics Dashboard Comprehensive usage insights Advanced analytics and monitoring for your API usage: * **Query Analysis**: Detailed insights into query patterns, types, and performance * **Usage Metrics**: Comprehensive tracking of API calls, response times, and success rates * **Error Monitoring**: Detailed error tracking and debugging information * **Performance Optimization**: Insights to help optimize your application’s API usage * **Cost Management**: Detailed billing breakdowns and usage forecasting This dashboard will provide the visibility you need to optimize your applications, manage costs, and understand user behavior patterns. [​](https://docs.perplexity.ai/feature-roadmap#timeline-and-availability) Timeline and Availability ------------------------------------------------------------------------------------------------------ This roadmap represents our current development priorities. Features will be released incrementally, with some becoming available in the coming months and others planned for later in the year. We’ll announce new feature availability through our [changelog](https://docs.perplexity.ai/changelog) and via email notifications to API users. Was this page helpful? YesNo [Get in Touch\ \ Previous](https://docs.perplexity.ai/discussions/discussions) [Frequently Asked Questions\ \ Next](https://docs.perplexity.ai/faq/faq) ⌘I --- # TruthTracer | AI-Powered Misinformation Detection Platform - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase TruthTracer | AI-Powered Misinformation Detection Platform Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Demo](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#demo) * [Features](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#code-explanation) * [How the Sonar API is Used](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#how-the-sonar-api-is-used) * [Links](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#links) **TruthTracer** is a comprehensive misinformation detection platform that leverages Perplexity’s Sonar API to provide multi-layered claim analysis. The platform combines fact-checking, trust chain tracing, and Socratic reasoning to deliver accurate, evidence-based verification results with confidence scores and detailed sourcing. ### [​](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#demo) Demo [​](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#features) Features ----------------------------------------------------------------------------------- * **Multi-method Analysis** combining fact-checking, trust chain analysis, and Socratic reasoning * **AI-Powered Verification** using Perplexity’s Sonar, Sonar Deep Research, and Sonar Reasoning models * **Real-time Processing** with parallel execution of multiple analysis methods * **Evidence-based Results** providing sources, confidence scores, and detailed reasoning * **Clean Architecture** with NestJS backend and React frontend * **Production-Ready** with Docker deployment, comprehensive testing, and API documentation * **Configurable Confidence Scoring** with customizable weights and thresholds [​](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#prerequisites) Prerequisites --------------------------------------------------------------------------------------------- * Node.js 18+ and npm * Perplexity API key (Sonar models access) * Docker (optional for deployment) * Git for repository cloning [​](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#installation) Installation ------------------------------------------------------------------------------------------- Copy Ask AI # Clone the backend repository git clone https://github.com/anthony-okoye/truth-tracer-backend.git cd truth-tracer-backend # Install dependencies npm install # Clone the frontend repository git clone https://github.com/anthony-okoye/truth-tracer-front.git cd truth-tracer-front # Install frontend dependencies npm install [​](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#configuration) Configuration --------------------------------------------------------------------------------------------- Create `.env` file in the backend directory: Copy Ask AI # Required SONAR_API_KEY=your_perplexity_api_key SONAR_API_URL=https://api.perplexity.ai # Optional configuration SONAR_TIMEOUT=30000 SONAR_MAX_RETRIES=3 CONFIDENCE_WEIGHT_FACT_CHECK=0.35 CONFIDENCE_WEIGHT_TRUST_CHAIN=0.25 CONFIDENCE_WEIGHT_SOCRATIC=0.20 [​](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#usage) Usage ----------------------------------------------------------------------------- 1. **Start Backend**: Copy Ask AI cd truth-tracer-backend npm run start:dev 2. **Start Frontend**: Copy Ask AI cd truth-tracer-front npm start 3. **Access Application**: Open [http://localhost:3000](http://localhost:3000/) in your browser 4. **Analyze Claims**: * Enter a claim in the text area * Click “Analyze Claim” to run fact-checking, trust chain analysis, and Socratic reasoning * View results with confidence scores, sources, and detailed explanations [​](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#code-explanation) Code Explanation --------------------------------------------------------------------------------------------------- * **Backend**: NestJS application with clean architecture following TypeScript best practices * **AI Integration**: Perplexity Sonar API with three specialized models - Sonar for fact-checking, Sonar Deep Research for trust chain analysis, and Sonar Reasoning for logical evaluation * **Parallel Processing**: Simultaneous execution of all three analysis methods for efficient claim verification * **Response Sanitization**: Custom JSON parsing and validation to handle various API response formats * **Confidence Scoring**: Weighted scoring system combining results from all three analysis methods * **Frontend**: React application with intuitive claim submission interface and detailed results visualization * **Testing**: Comprehensive test suite including unit tests, end-to-end tests, and claim analysis testing [​](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#how-the-sonar-api-is-used) How the Sonar API is Used --------------------------------------------------------------------------------------------------------------------- TruthTracer leverages Perplexity’s Sonar API through three distinct analysis approaches: Copy Ask AI // Parallel execution of multiple Sonar models const [factCheckResult, trustChainResult, socraticResult] = await Promise.all([\ sonarClient.chat.completions.create({\ model: "sonar",\ messages: [{ role: "user", content: factCheckPrompt }],\ max_tokens: 500\ }),\ sonarClient.chat.completions.create({\ model: "sonar-deep-research", \ messages: [{ role: "user", content: trustChainPrompt }],\ max_tokens: 2500\ }),\ sonarClient.chat.completions.create({\ model: "sonar-reasoning",\ messages: [{ role: "user", content: socraticPrompt }],\ max_tokens: 4000\ })\ ]); [​](https://docs.perplexity.ai/cookbook/showcase/truth-tracer#links) Links ----------------------------------------------------------------------------- * [Live Demo](https://truthtracer.netlify.app/) * [Backend Repository](https://github.com/anthony-okoye/truth-tracer-backend) * [Frontend Repository](https://github.com/anthony-okoye/truth-tracer-front) Was this page helpful? YesNo [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/perplexicart) [StarPlex | AI-Powered Startup Intelligence Platform\ \ Next](https://docs.perplexity.ai/cookbook/showcase/starplex) ⌘I --- # Pricing - Perplexity [Skip to main content](https://docs.perplexity.ai/getting-started/pricing#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Getting Started Pricing Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) This page shows **pricing information** to help you understand API costs. For **billing setup**, payment methods, and usage monitoring, visit the [Admin section](https://docs.perplexity.ai/getting-started/api-groups) . [​](https://docs.perplexity.ai/getting-started/pricing#search-api-pricing) Search API Pricing ------------------------------------------------------------------------------------------------ | API | Price per 1K requests | Description | | --- | --- | --- | | **Search API** | $5.00 | Raw web search results with advanced filtering | **No token costs:** Search API charges per request only, with no additional token-based pricing. [​](https://docs.perplexity.ai/getting-started/pricing#grounded-llm-pricing) Grounded LLM Pricing ---------------------------------------------------------------------------------------------------- **Total cost per query** = Token costs + Request fee (varies by search context size, applies to Sonar, Sonar Pro, Sonar Reasoning, and Sonar Reasoning Pro models only) * Token Pricing * Request Pricing * Pro Search Pricing [​](https://docs.perplexity.ai/getting-started/pricing#token-pricing) Token Pricing -------------------------------------------------------------------------------------- **Token pricing** is based on the number of tokens in your request and response. | Model | Input Tokens ($/1M) | Output Tokens ($/1M) | Citation Tokens ($/1M) | Search Queries ($/1K) | Reasoning Tokens ($/1M) | | --- | --- | --- | --- | --- | --- | | **Sonar** | $1 | $1 | \- | \- | \- | | **Sonar Pro** | $3 | $15 | \- | \- | \- | | **Sonar Reasoning** | $1 | $5 | \- | \- | \- | | **Sonar Reasoning Pro** | $2 | $8 | \- | \- | \- | | **Sonar Deep Research** | $2 | $8 | $2 | $5 | $3 | [​](https://docs.perplexity.ai/getting-started/pricing#request-pricing-by-search-context-size) Request Pricing by Search Context Size ---------------------------------------------------------------------------------------------------------------------------------------- **Search context** determines how much web information is retrieved. Higher context = more comprehensive results. The following table shows the request fee for each model for every **1000 requests**. | Model | Low Context Size | Medium Context Size | High Context Size | | --- | --- | --- | --- | | **Sonar** | $5 | $8 | $12 | | **Sonar Pro** | $6 | $10 | $14 | | **Sonar Reasoning** | $5 | $8 | $12 | | **Sonar Reasoning Pro** | $6 | $10 | $14 | * **Low**: (default) fastest, cheapest * **Medium**: Balanced cost/quality * **High**: Maximum search depth, best for research [Learn more about search context →](https://docs.perplexity.ai/guides/search-context-size-guide) [​](https://docs.perplexity.ai/getting-started/pricing#pro-search-pricing-pro-search-for-sonar-pro) Pro Search Pricing (Pro Search for Sonar Pro) ---------------------------------------------------------------------------------------------------------------------------------------------------- **Pro Search** enhances Sonar Pro with automated tool usage and multi-step reasoning. When enabled, the model can perform multiple web searches and fetch URL content to answer complex queries. [Learn more about Pro Search here](https://docs.perplexity.ai/guides/pro-search-quickstart) . Pro Search requires `stream: true` and is enabled via the `search_type` parameter in `web_search_options`. ### [​](https://docs.perplexity.ai/getting-started/pricing#search-type-options) Search Type Options | Search Type | Description | Request Fee (per 1K) | | --- | --- | --- | | **`fast`** | (default) Standard Sonar Pro behavior | $6 / $10 / $14 | | **`pro`** | Multi-step tool usage for complex queries | $14 / $18 / $22 | | **`auto`** | Automatic classification based on query complexity | Varies by classification | Request fees vary by search context size (Low / Medium / High). Token pricing remains the same as standard Sonar Pro ($3 per 1M input, $15 pe r 1M output). Token and Cost Glossary ### [​](https://docs.perplexity.ai/getting-started/pricing#input-tokens) Input Tokens The number of tokens in your prompt or message to the API. This includes: * Your question or instruction * Any context or examples you provide * System messages and formatting **Example:** “What is the weather in New York?” = ~8 input tokens ### [​](https://docs.perplexity.ai/getting-started/pricing#output-tokens) Output Tokens The number of tokens in the API’s response. This includes: * The generated answer or content * Any explanations or additional context * Search results and references **Example:** “The weather in New York is currently sunny with a temperature of 72°F.” = ~15 output tokens ### [​](https://docs.perplexity.ai/getting-started/pricing#citation-tokens) Citation Tokens Tokens used specifically for generating search results and references in responses. Only applies to **Sonar Deep Research** model.**Example:** Including source links, reference numbers, and bibliographic information ### [​](https://docs.perplexity.ai/getting-started/pricing#search-context-size-vs-context-window) Search Context Size vs Context Window **Search context size** is _not_ the same as the **context window**. * **Search context size**: How much web information is retrieved during search (affects request pricing) * **Context window**: Maximum tokens the model can process in one request (affects token limits) ### [​](https://docs.perplexity.ai/getting-started/pricing#search-queries) Search Queries The number of individual searches conducted by **Sonar Deep Research** during query processing. This is separate from your initial user query. * The model automatically determines how many searches are needed * You cannot control the exact number of search queries * The `reasoning_effort` parameter influences the number of searches performed * Only applies to **Sonar Deep Research** model ### [​](https://docs.perplexity.ai/getting-started/pricing#reasoning-tokens) Reasoning Tokens Tokens used for step-by-step logical reasoning and problem-solving. Only applies to **Sonar Deep Research** model.**Example:** Breaking down a complex math problem into sequential steps with explanations **Token Calculation:** 1 token ≈ 4 characters in English text. The exact count may vary based on language and content complexity. [​](https://docs.perplexity.ai/getting-started/pricing#cost-examples) Cost Examples -------------------------------------------------------------------------------------- Sonar Web Search Example ------------------------ **Sonar** • 500 input + 200 output tokens * Low * Medium * High | Component | Cost | | --- | --- | | Input tokens | $0.0005 | | Output tokens | $0.0002 | | Request fee | $0.005 | | **Total** | **$0.0057** | | Component | Cost | | --- | --- | | Input tokens | $0.0005 | | Output tokens | $0.0002 | | Request fee | $0.008 | | **Total** | **$0.0087** | | Component | Cost | | --- | --- | | Input tokens | $0.0005 | | Output tokens | $0.0002 | | Request fee | $0.012 | | **Total** | **$0.0127** | Deep Research Example --------------------- **Sonar Deep Research** * Low * Medium * High | Component | Cost | | --- | --- | | Input tokens (33) | $0.000066 | | Output tokens (7163) | $0.057304 | | Citation tokens (20016) | $0.040032 | | Reasoning tokens (73997) | $0.221991 | | Search queries (18) | $0.09 | | **Total** | **$0.409393** | | Component | Cost | | --- | --- | | Input tokens (7) | $0.00 | | Output tokens (3847) | $0.031 | | Citation tokens (47293) | $0.095 | | Reasoning tokens (308156) | $0.924 | | Search queries (28) | $0.14 | | **Total** | **$1.190** | | Component | Cost | | --- | --- | | Input tokens (8) | $0.00 | | Output tokens (4435) | $0.035 | | Citation tokens (58196) | $0.116 | | Reasoning tokens (339594) | $1.019 | | Search queries (30) | $0.15 | | **Total** | **$1.320** | [​](https://docs.perplexity.ai/getting-started/pricing#choosing-the-right-api) Choosing the Right API -------------------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/getting-started/pricing#search-api) Search API | API | Description | Best For | | --- | --- | --- | | **Search API** | Raw web search results with advanced filtering | Custom search engines, research tools, competitive intelligence, news aggregation | ### [​](https://docs.perplexity.ai/getting-started/pricing#sonar-models-chat-completions) Sonar Models (Chat Completions) | Model | Description | Best For | | --- | --- | --- | | **Sonar** | Lightweight, cost-effective search model | Quick facts, news updates, simple Q&A, high-volume applications | | **Sonar Pro** | Advanced search with deeper content understanding | Complex queries, competitive analysis, detailed research | | **Sonar Reasoning** | Quick problem-solving with step-by-step logic and search | Logic puzzles, math problems, transparent reasoning | | **Sonar Reasoning Pro** | Enhanced multi-step reasoning with web search | Complex problem-solving, research analysis, strategic planning | | **Sonar Deep Research** | Exhaustive research and detailed report generation with search | Academic research, market analysis, comprehensive reports | **Need help choosing?** Use Search API when you want raw data to process yourself. Use Sonar models when you want AI-generated answers with search grounding. Was this page helpful? YesNo [Previous](https://docs.perplexity.ai/getting-started/overview) [Perplexity MCP Server\ \ Next](https://docs.perplexity.ai/guides/mcp-server) ⌘I --- # Perplexity Client | Desktop AI Chat Interface with API Controls - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase Perplexity Client | Desktop AI Chat Interface with API Controls Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#installation) * [Build](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#build) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#usage) * [Screenshots](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#screenshots) * [Limitations](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#limitations) * [Links](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#links) **Perplexity Client** is an Electron-based desktop application that provides a polished interface for interacting with Perplexity’s Sonar API. Unlike typical chat interfaces, it exposes advanced API parameters like temperature, top-p, and max tokens, making it ideal for developers who want fine-grained control over their AI interactions while enjoying a beautiful, macOS-inspired UI. ![Perplexity Client Interface](https://mintcdn.com/perplexity/0IKRIb5gmMrclqVS/cookbook/static/img/perplexity-client-main.png?w=2500&fit=max&auto=format&n=0IKRIb5gmMrclqVS&q=85&s=5d266a4b15de3e1fcd48232b12d439c5) [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#features) Features ---------------------------------------------------------------------------------------- * **Multiple Sonar Models** with support for Sonar, Sonar Pro, and Sonar Reasoning Pro * **Custom Spaces** with save/load functionality for different use cases * **API Parameter Controls** including temperature, top-p, and max tokens adjustments * **API Debugging Mode** showing full request/response payloads for troubleshooting * **Token Usage Tracking** to monitor API consumption and costs * **Focus Modes** for specialized tasks like coding, writing, and research [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#prerequisites) Prerequisites -------------------------------------------------------------------------------------------------- * Node.js v16 or higher * npm or yarn * Perplexity API key [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#installation) Installation ------------------------------------------------------------------------------------------------ Copy Ask AI # Clone the repository git clone https://github.com/straight-heart/Perplexity-client-.git cd Perplexity-client- # Install dependencies npm install npm run dev [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#build) Build ---------------------------------------------------------------------------------- Build the application for your platform: Copy Ask AI npm run build:win # Windows npm run build:mac # macOS npm run build:linux # Linux [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#configuration) Configuration -------------------------------------------------------------------------------------------------- API keys are managed directly within the application: 1. Launch the app and open Settings (gear icon) 2. In the **API Keys** section, click **Add Key** 3. Enter your Perplexity API key 4. The key is stored securely and persists across sessions For custom system prompts, use the **Spaces** feature to save and switch between different instruction sets. [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#usage) Usage ---------------------------------------------------------------------------------- 1. **Launch**: Run `npm run dev` or use the built application 2. **Add API Key**: Open Settings and add your Perplexity API key 3. **Select Model**: Use the dropdown to choose between Sonar variants 4. **Create Spaces**: Set up custom system prompts for different tasks 5. **Chat**: Start conversing with real-time streaming responses 6. **Debug**: Enable API debugging to see full request/response details 7. **Track Usage**: Monitor token consumption in the Settings panel [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#screenshots) Screenshots ---------------------------------------------------------------------------------------------- | Feature | Preview | | --- | --- | | Spaces (Custom Instructions) | ![Spaces](https://mintcdn.com/perplexity/0IKRIb5gmMrclqVS/cookbook/static/img/perplexity-client-spaces.png?w=2500&fit=max&auto=format&n=0IKRIb5gmMrclqVS&q=85&s=47ca04dc84da5dfe82456697db752539) | | Model & Parameter Controls | ![Parameters](https://mintcdn.com/perplexity/0IKRIb5gmMrclqVS/cookbook/static/img/perplexity-client-parameters.png?w=2500&fit=max&auto=format&n=0IKRIb5gmMrclqVS&q=85&s=da018c0456628131a9d51faa3c6cdbe1) | | API Debugging Mode | ![Debug](https://mintcdn.com/perplexity/0IKRIb5gmMrclqVS/cookbook/static/img/perplexity-client-debug.png?w=2500&fit=max&auto=format&n=0IKRIb5gmMrclqVS&q=85&s=b14f8ca08a495f594b3d8cf27d45557a) | | Theme Selection | ![Themes](https://mintcdn.com/perplexity/0IKRIb5gmMrclqVS/cookbook/static/img/perplexity-client-themes.png?w=2500&fit=max&auto=format&n=0IKRIb5gmMrclqVS&q=85&s=64fa07121d3cfceb3d25ce8f3f973614) | [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#limitations) Limitations ---------------------------------------------------------------------------------------------- * Desktop only (Windows, macOS, Linux) — no mobile or web version * Requires internet connection for API calls * API key required for functionality [​](https://docs.perplexity.ai/cookbook/showcase/perplexity-client#links) Links ---------------------------------------------------------------------------------- * [GitHub Repository](https://github.com/straight-heart/Perplexity-client-) Was this page helpful? YesNo [StarPlex | AI-Powered Startup Intelligence Platform\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/starplex) [Examples Overview\ \ Next](https://docs.perplexity.ai/cookbook/examples/README) ⌘I --- # UnCovered | Real-Time Fact-Checking Chrome Extension - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/showcase/uncovered#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Community Showcase UnCovered | Real-Time Fact-Checking Chrome Extension Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * [Briefo | Perplexity Powered News & Finance Social App](https://docs.perplexity.ai/cookbook/showcase/briefo) * [CityPulse | AI-Powered Geospatial Discovery Search](https://docs.perplexity.ai/cookbook/showcase/citypulse-ai-search) * [Fact Dynamics | Real-time Fact-Checking Flutter App](https://docs.perplexity.ai/cookbook/showcase/fact-dynamics) * [Perplexity Dart & Flutter SDKs](https://docs.perplexity.ai/cookbook/showcase/perplexity-flutter) * [PerplexiGrid | Interactive Analytics Dashboards](https://docs.perplexity.ai/cookbook/showcase/perplexigrid) * [Valetudo AI | Trusted Medical Answer Assistant](https://docs.perplexity.ai/cookbook/showcase/valetudo-ai) * [CycleSyncAI | Personalized Health Plans Powered by Sonar API](https://docs.perplexity.ai/cookbook/showcase/cycle-sync-ai) * [FlameGuardAI | AI-powered wildfire prevention](https://docs.perplexity.ai/cookbook/showcase/flameguardai) * [Monday – Voice-First AI Learning Assistant](https://docs.perplexity.ai/cookbook/showcase/monday) * [Ellipsis | One-Click Podcast Generation Agent](https://docs.perplexity.ai/cookbook/showcase/Ellipsis) * [FirstPrinciples | AI Learning Roadmap Generator](https://docs.perplexity.ai/cookbook/showcase/first-principle) * [BazaarAISaathi | AI-Powered Indian Stock Market Assistant](https://docs.perplexity.ai/cookbook/showcase/bazaar-ai-saathi) * [4Point Hoops | AI Basketball Analytics Platform](https://docs.perplexity.ai/cookbook/showcase/4point-Hoops) * [MVP LifeLine | AI Youth Empowerment Platform](https://docs.perplexity.ai/cookbook/showcase/mvp-lifeline-ai-app) * [Executive Intelligence | AI-Powered Strategic Decision Platform](https://docs.perplexity.ai/cookbook/showcase/executive-intelligence) * [Flow & Focus | Personalized News for Genuine Understanding](https://docs.perplexity.ai/cookbook/showcase/flow-and-focus) * [Perplexity Lens | AI-Powered Knowledge Graph Browser Extension](https://docs.perplexity.ai/cookbook/showcase/perplexity-lens) * [Greenify | Localized community-driven greenification/plantation solution with AI](https://docs.perplexity.ai/cookbook/showcase/greenify) * [Sonar Chromium Browser | Native Search Omnibox and Context Menu](https://docs.perplexity.ai/cookbook/showcase/sonar-chromium-browser) * [PosterLens | Scientific Poster Scanner & Research Assistant](https://docs.perplexity.ai/cookbook/showcase/posterlens) * [Daily News Briefing | AI-Powered News Summaries for Obsidian](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) * [UnCovered | Real-Time Fact-Checking Chrome Extension](https://docs.perplexity.ai/cookbook/showcase/uncovered) * [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant](https://docs.perplexity.ai/cookbook/showcase/perplexicart) * [TruthTracer | AI-Powered Misinformation Detection Platform](https://docs.perplexity.ai/cookbook/showcase/truth-tracer) * [StarPlex | AI-Powered Startup Intelligence Platform](https://docs.perplexity.ai/cookbook/showcase/starplex) * [Perplexity Client | Desktop AI Chat Interface with API Controls](https://docs.perplexity.ai/cookbook/showcase/perplexity-client) * Examples * Integration Guides On this page * [Features](https://docs.perplexity.ai/cookbook/showcase/uncovered#features) * [Prerequisites](https://docs.perplexity.ai/cookbook/showcase/uncovered#prerequisites) * [Installation](https://docs.perplexity.ai/cookbook/showcase/uncovered#installation) * [Configuration](https://docs.perplexity.ai/cookbook/showcase/uncovered#configuration) * [Usage](https://docs.perplexity.ai/cookbook/showcase/uncovered#usage) * [Code Explanation](https://docs.perplexity.ai/cookbook/showcase/uncovered#code-explanation) * [Technical Implementation](https://docs.perplexity.ai/cookbook/showcase/uncovered#technical-implementation) * [Demo Video](https://docs.perplexity.ai/cookbook/showcase/uncovered#demo-video) * [Links](https://docs.perplexity.ai/cookbook/showcase/uncovered#links) **UnCovered** is a Chrome extension that verifies text, images, websites, and screenshots in real-time—right where you browse. Built on Perplexity’s Sonar API, it provides instant truth with citations, verdicts, and deep analysis using just a right-click, without breaking your browsing flow. [​](https://docs.perplexity.ai/cookbook/showcase/uncovered#features) Features -------------------------------------------------------------------------------- * **3-Click Verification**: Select → Right-click → Verify (Text, Image, Link, or Screenshot) * **Text Analysis Modes**: Quick Search, Fact-Check, and Deep Research capabilities * **Image Fact-Checking**: Reverse image analysis and multimodal claim verification * **Screenshot & Video Frame Capture**: Analyze visuals like infographics, memes, or chart snapshots * **Citation-Backed Results**: All answers include sources and fact-verdicts (True/False/Unconfirmed) * **Instant Rebuttal Generator**: Create concise, fact-based replies to misinformation * **Zero-Friction UX**: Stay on the same page — no copy-paste, no new tabs required [​](https://docs.perplexity.ai/cookbook/showcase/uncovered#prerequisites) Prerequisites ------------------------------------------------------------------------------------------ * Chrome browser * Node.js 16+ and npm * MongoDB database * Cloudinary account for image storage * Perplexity API key (Sonar Pro and Deep Research access) * Google OAuth credentials [​](https://docs.perplexity.ai/cookbook/showcase/uncovered#installation) Installation ---------------------------------------------------------------------------------------- Copy Ask AI # Clone the repository git clone https://github.com/aayushsingh7/UnCovered.git cd UnCovered # Install dependencies npm install # Build the Chrome extension npm run build [​](https://docs.perplexity.ai/cookbook/showcase/uncovered#configuration) Configuration ------------------------------------------------------------------------------------------ Set up your environment variables: Copy Ask AI PERPLEXITY_API_KEY=your_sonar_api_key MONGODB_URI=your_mongodb_connection_string CLOUDINARY_URL=your_cloudinary_credentials GOOGLE_OAUTH_CLIENT_ID=your_google_oauth_id [​](https://docs.perplexity.ai/cookbook/showcase/uncovered#usage) Usage -------------------------------------------------------------------------- 1. **Text/Link Verification**: * Select text or right-click a link * Choose Quick Search / Fact-Check / Deep Research * Get trusted results with verdicts and citations 2. **Image Verification**: * Right-click any image * Choose from Quick Search or Fact-Check * Detect misinformation and visual manipulation 3. **Screenshot/Infographic Analysis**: * Click UnCovered icon in the toolbar * Use “Capture Screen” to analyze visual content 4. **Get Instant Rebuttal**: * Auto-generate fact-based responses to correct misinformation [​](https://docs.perplexity.ai/cookbook/showcase/uncovered#code-explanation) Code Explanation ------------------------------------------------------------------------------------------------ * **Frontend**: Vanilla JavaScript Chrome extension with context menu integration * **Backend**: Node.js Express server handling API requests and user authentication * **AI Integration**: Perplexity Sonar Pro and Deep Research APIs for intelligent fact-checking * **Image Processing**: Cloudinary integration for screenshot and image analysis * **Database**: MongoDB for user data and verification history * **Authentication**: Google OAuth for secure user management * **Multimodal Analysis**: Support for text, images, screenshots, and video frames [​](https://docs.perplexity.ai/cookbook/showcase/uncovered#technical-implementation) Technical Implementation ---------------------------------------------------------------------------------------------------------------- UnCovered leverages Perplexity Sonar API in three core modes: Copy Ask AI // Quick Search and Fact-Check with Sonar Pro const quickResponse = await perplexityClient.chat.completions.create({ model: "sonar-pro", messages: [{ role: "user", content: factCheckPrompt }] }); // Deep Research for comprehensive analysis const deepResponse = await perplexityClient.chat.completions.create({ model: "sonar-deep-research", messages: [{ role: "user", content: deepAnalysisPrompt }] }); [​](https://docs.perplexity.ai/cookbook/showcase/uncovered#demo-video) Demo Video ------------------------------------------------------------------------------------ [​](https://docs.perplexity.ai/cookbook/showcase/uncovered#links) Links -------------------------------------------------------------------------- * [GitHub Repository](https://github.com/aayushsingh7/UnCovered) * [Live Demo](https://uncovered.vercel.app/) Was this page helpful? YesNo [Daily News Briefing | AI-Powered News Summaries for Obsidian\ \ Previous](https://docs.perplexity.ai/cookbook/showcase/daily-news-briefing) [PerplexiCart | AI-Powered Value-Aligned Shopping Assistant\ \ Next](https://docs.perplexity.ai/cookbook/showcase/perplexicart) ⌘I --- # Quickstart - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/perplexity-sdk#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Perplexity SDK Quickstart Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) On this page * [Overview](https://docs.perplexity.ai/guides/perplexity-sdk#overview) * [Available APIs](https://docs.perplexity.ai/guides/perplexity-sdk#available-apis) * [Installation](https://docs.perplexity.ai/guides/perplexity-sdk#installation) * [Authentication](https://docs.perplexity.ai/guides/perplexity-sdk#authentication) * [Using Environment Variables](https://docs.perplexity.ai/guides/perplexity-sdk#using-environment-variables) * [Resources](https://docs.perplexity.ai/guides/perplexity-sdk#resources) [​](https://docs.perplexity.ai/guides/perplexity-sdk#overview) Overview -------------------------------------------------------------------------- The official Perplexity SDKs provide convenient access to the Perplexity APIs from Python 3.8+ and Node.js applications. Both SDKs include type definitions for all request parameters and response fields, with both synchronous and asynchronous clients. [​](https://docs.perplexity.ai/guides/perplexity-sdk#available-apis) Available APIs -------------------------------------------------------------------------------------- [Chat Completions\ ----------------\ \ AI responses with web-grounded knowledge, conversation context, and streaming support.](https://docs.perplexity.ai/guides/chat-completions-sdk) [Search\ ------\ \ Ranked web search results with filtering, multi-query support, and domain controls.](https://docs.perplexity.ai/guides/perplexity-sdk-search) [​](https://docs.perplexity.ai/guides/perplexity-sdk#installation) Installation ---------------------------------------------------------------------------------- Install the SDK for your preferred language: Python TypeScript/JavaScript Copy Ask AI pip install perplexityai [​](https://docs.perplexity.ai/guides/perplexity-sdk#authentication) Authentication -------------------------------------------------------------------------------------- [Get your Perplexity API Key\ ---------------------------\ \ Navigate to the **API Keys** tab in the API Portal and generate a new key.\ \ Click here](https://perplexity.ai/account/api) After generating the key, set it as an environment variable in your terminal: * Windows * MacOS/Linux Copy Ask AI setx PERPLEXITY_API_KEY "your_api_key_here" Copy Ask AI export PERPLEXITY_API_KEY="your_api_key_here" ### [​](https://docs.perplexity.ai/guides/perplexity-sdk#using-environment-variables) Using Environment Variables You can use the environment variable directly: Python TypeScript/JavaScript Copy Ask AI import os from perplexity import Perplexity client = Perplexity() # Automatically uses PERPLEXITY_API_KEY Or use [python-dotenv](https://pypi.org/project/python-dotenv/) (Python) or [dotenv](https://www.npmjs.com/package/dotenv) (Node.js) to load the environment variable from a `.env` file: Python TypeScript/JavaScript Copy Ask AI import os from dotenv import load_dotenv from perplexity import Perplexity load_dotenv() client = Perplexity() # Uses PERPLEXITY_API_KEY from .env file Now you’re ready to start using the Perplexity APIs! Choose your API below for step-by-step usage guides. [Chat Completions\ ----------------\ \ Get started with AI responses](https://docs.perplexity.ai/guides/chat-completions-sdk) [Search\ ------\ \ Get started with web search](https://docs.perplexity.ai/guides/perplexity-sdk-search) [​](https://docs.perplexity.ai/guides/perplexity-sdk#resources) Resources ---------------------------------------------------------------------------- [Python Package\ --------------\ \ Install from PyPI with pip](https://pypi.org/project/perplexityai/) [Node.js Package\ ---------------\ \ Install from npm registry](https://www.npmjs.com/package/@perplexity-ai/perplexity_ai) Was this page helpful? YesNo [Perplexity MCP Server\ \ Previous](https://docs.perplexity.ai/guides/mcp-server) [Error Handling\ \ Next](https://docs.perplexity.ai/guides/perplexity-sdk-error-handling) ⌘I --- # Prompt Guide - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/prompt-guide#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Prompting & Output Control Prompt Guide Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * [Prompt Guide](https://docs.perplexity.ai/guides/prompt-guide) * [Structured Outputs Guide](https://docs.perplexity.ai/guides/structured-outputs) * [Streaming Responses](https://docs.perplexity.ai/guides/streaming-responses) * [Stream Mode: Concise vs Full](https://docs.perplexity.ai/guides/pro-search-stream-mode-guide) * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [​](https://docs.perplexity.ai/guides/prompt-guide#system-prompt) System Prompt ---------------------------------------------------------------------------------- You can use the system prompt to provide instructions related to style, tone, and language of the response. The real-time search component of our models does not attend to the system prompt. **Example of a system prompt** Copy Ask AI You are a helpful AI assistant. Rules: 1. Provide only the final answer. It is important that you do not include any explanation on the steps below. 2. Do not show the intermediate steps information. Steps: 1. Decide if the answer should be a brief sentence or a list of suggestions. 2. If it is a list of suggestions, first, write a brief and natural introduction based on the original query. 3. Followed by a list of suggestions, each suggestion should be split by two newlines. [​](https://docs.perplexity.ai/guides/prompt-guide#user-prompt) User Prompt ------------------------------------------------------------------------------ You should use the user prompt to pass in the actual query for which you need an answer for. The user prompt will be used to kick off a real-time web search to make sure the answer has the latest and the most relevant information needed. **Example of a user prompt** Copy Ask AI What are the best sushi restaurants in the world currently? [​](https://docs.perplexity.ai/guides/prompt-guide#web-search-models:-general-prompting-guidelines) Web Search Models: General Prompting Guidelines ====================================================================================================================================================== Our web search-powered models combine the capabilities of LLMs with real-time web searches. Understanding how they differ from traditional LLMs will help you craft more effective prompts. [​](https://docs.perplexity.ai/guides/prompt-guide#best-practices-for-prompting-web-search-models) Best Practices for Prompting Web Search Models ---------------------------------------------------------------------------------------------------------------------------------------------------- Be Specific and Contextual -------------------------- Unlike traditional LLMs, our web search models require specificity to retrieve relevant search results. Adding just 2-3 extra words of context can dramatically improve performance.**Good Example**: “Explain recent advances in climate prediction models for urban planning”**Poor Example**: “Tell me about climate models” Avoid Few-Shot Prompting ------------------------ While few-shot prompting works well for traditional LLMs, it confuses web search models by triggering searches for your examples rather than your actual query.**Good Example**: “Summarize the current research on mRNA vaccine technology”**Poor Example**: “Here’s an example of a good summary about vaccines: \[example text\]. Now summarize the current research on mRNA vaccines.” Think Like a Web Search User ---------------------------- Craft prompts with search-friendly terms that would appear on relevant web pages. Consider how experts in the field would describe the topic online.**Good Example**: “Compare the energy efficiency ratings of heat pumps vs. traditional HVAC systems for residential use”**Poor Example**: “Tell me which home heating is better” Provide Relevant Context ------------------------ Include critical context to guide the web search toward the most relevant content, but keep prompts concise and focused.**Good Example**: “Explain the impact of the 2023 EU digital markets regulations on app store competition for small developers”**Poor Example**: “What are the rules for app stores?” [​](https://docs.perplexity.ai/guides/prompt-guide#web-search-model-pitfalls-to-avoid) Web Search Model Pitfalls to Avoid ---------------------------------------------------------------------------------------------------------------------------- Overly Generic Questions ------------------------ Generic prompts lead to scattered web search results and unfocused responses. Always narrow your scope.**Avoid**: “What’s happening in AI?”**Instead**: “What are the three most significant commercial applications of generative AI in healthcare in the past year?” Traditional LLM Techniques -------------------------- Prompting strategies designed for traditional LLM often don’t work well with web search models. Adapt your approach accordingly.**Avoid**: “Act as an expert chef and give me a recipe for sourdough bread. Start by explaining the history of sourdough, then list ingredients, then…”**Instead**: “What’s a reliable sourdough bread recipe for beginners? Include ingredients and step-by-step instructions.” Complex Multi-Part Requests --------------------------- Complex prompts with multiple unrelated questions can confuse the search component. Focus on one topic per query.**Avoid**: “Explain quantum computing, and also tell me about regenerative agriculture, and provide stock market predictions.”**Instead**: “Explain quantum computing principles that might impact cryptography in the next decade.” Assuming Search Intent ---------------------- Don’t assume the model will search for what you intended without specific direction. Be explicit about exactly what information you need.**Avoid**: “Tell me about the latest developments.”**Instead**: “What are the latest developments in offshore wind energy technology announced in the past 6 months?” [​](https://docs.perplexity.ai/guides/prompt-guide#handling-urls-and-source-information) Handling URLs and Source Information -------------------------------------------------------------------------------------------------------------------------------- **Never ask for URLs or source links in your prompts.** The generative model cannot see the actual URLs from the web search, which means any URLs it provides in the response text are likely to be hallucinated and incorrect. ### [​](https://docs.perplexity.ai/guides/prompt-guide#the-right-way-to-access-sources) The Right Way to Access Sources URLs and source information are automatically returned in the `search_results` field of the API response. This field contains accurate information about the sources used, including: * `title`: The title of the source page * `url`: The actual URL of the source * `date`: The publication date of the content **Example of incorrect prompting:** Copy Ask AI ❌ BAD: "From the past 5 days, identify high-potential Canadian news stories... For each item, include: - A clear headline - 1–2 sentence summary - Include a link to a source" **Example of correct prompting:** Copy Ask AI ✅ GOOD: "From the past 5 days, identify high-potential Canadian news stories... For each item, include: - A clear headline - 1–2 sentence summary - Why it matters from a thought-leadership perspective" // Then parse URLs from the search_results field in the API response ### [​](https://docs.perplexity.ai/guides/prompt-guide#why-this-matters) Why This Matters The web search and language generation components work differently: 1. **Web Search Component**: Finds and retrieves content from specific URLs 2. **Language Generation Component**: Processes the retrieved content but doesn’t have access to the original URLs 3. **API Response**: Provides both the generated text and the accurate source URLs separately When you ask for URLs in your prompt, the language model will attempt to generate them based on patterns it has seen, but these will not be the actual URLs that were searched. Always use the `search_results` field for accurate source information. [​](https://docs.perplexity.ai/guides/prompt-guide#preventing-hallucination-in-search-results) Preventing Hallucination in Search Results -------------------------------------------------------------------------------------------------------------------------------------------- **LLMs are designed to be “helpful” and may attempt to provide answers even when they lack sufficient information.** This can lead to hallucinated or inaccurate responses, especially when asking about sources that Sonar cannot access. ### [​](https://docs.perplexity.ai/guides/prompt-guide#understanding-the-helpfulness-problem) Understanding the Helpfulness Problem Large Language Models are trained to be assistive and will often try to provide an answer even when they’re not confident about the information. This tendency can be problematic when: * You request information from sources that Sonar cannot access (e.g., LinkedIn posts, private documents, paywalled content) * The search doesn’t return relevant results for your specific query * You ask for very recent information that may not be indexed yet ### [​](https://docs.perplexity.ai/guides/prompt-guide#common-scenarios-that-lead-to-hallucination) Common Scenarios That Lead to Hallucination **Inaccessible Sources:** Copy Ask AI ❌ PROBLEMATIC: "What did the CEO of XYZ company post on LinkedIn yesterday about their new product launch?" _Sonar may not be able to access LinkedIn content, but the model might still attempt to provide an answer based on general knowledge or patterns._ **Overly Specific Recent Events:** Copy Ask AI ❌ PROBLEMATIC: "What was discussed in the closed-door meeting between Company A and Company B last week?" _Private information that wouldn’t be publicly searchable may still get a fabricated response._ ### [​](https://docs.perplexity.ai/guides/prompt-guide#how-to-prevent-hallucination) How to Prevent Hallucination **Use Explicit Instructions:** Include clear guidance in your prompts about what to do when information isn’t available: Copy Ask AI ✅ GOOD: "Search for recent developments in quantum computing breakthroughs. If you are not able to get search results or find relevant information, please state that clearly rather than providing speculative information." **Set Clear Boundaries:** Copy Ask AI ✅ GOOD: "Based on publicly available sources from the past week, what are the latest policy changes in Canadian healthcare? If no recent information is found, please indicate that no recent updates were discovered." **Request Source Transparency:** Copy Ask AI ✅ GOOD: "Find information about Tesla's latest earnings report. Only provide information that you can verify from your search results, and clearly state if certain details are not available." ### [​](https://docs.perplexity.ai/guides/prompt-guide#best-practices-for-reliable-results) Best Practices for Reliable Results Be Explicit About Limitations ----------------------------- Always instruct the model to acknowledge when it cannot find information rather than guessing.**Example**: “If you cannot find reliable sources for this information, please say so explicitly.” Focus on Accessible Sources --------------------------- Stick to information that is likely to be publicly indexed and searchable.**Avoid**: LinkedIn posts, private company documents, closed meetings **Prefer**: News articles, public reports, official announcements Use Conditional Language ------------------------ Frame requests with conditional statements that give the model permission to say “I don’t know.”**Example**: “If available, provide details about… Otherwise, indicate what information could not be found.” Verify with Multiple Queries ---------------------------- For critical information, consider breaking complex requests into smaller, more specific queries to verify consistency.**Strategy**: Ask the same question in different ways and compare results for consistency. [​](https://docs.perplexity.ai/guides/prompt-guide#use-built-in-search-parameters,-not-prompts) Use Built-in Search Parameters, Not Prompts ---------------------------------------------------------------------------------------------------------------------------------------------- **Always use Perplexity’s built-in search parameters instead of trying to control search behavior through prompts.** API parameters are guaranteed to work and are much more effective than asking the model to filter results. ### [​](https://docs.perplexity.ai/guides/prompt-guide#why-built-in-parameters-are-better) Why Built-in Parameters Are Better When you want to control search behavior—such as limiting sources, filtering by date, or adjusting search depth—use the API’s built-in parameters rather than prompt instructions. The search component processes these parameters directly, ensuring reliable and consistent results. ### [​](https://docs.perplexity.ai/guides/prompt-guide#common-mistakes:-prompt-based-control) Common Mistakes: Prompt-Based Control **❌ Ineffective - Trying to control via prompts:** Copy Ask AI { "model": "sonar-pro", "messages": [\ {\ "role": "user", \ "content": "Search only on Wikipedia and official government sites for information about climate change policies. Make sure to only look at sources from the past month."\ }\ ] } ### [​](https://docs.perplexity.ai/guides/prompt-guide#correct-approach:-use-api-parameters) Correct Approach: Use API Parameters **✅ Effective - Using built-in parameters:** Copy Ask AI { "model": "sonar-pro", "messages": [\ {\ "role": "user", \ "content": "What are the latest climate change policies?"\ }\ ], "search_domain_filter": ["wikipedia.org"] } ### [​](https://docs.perplexity.ai/guides/prompt-guide#available-search-parameters) Available Search Parameters ### [​](https://docs.perplexity.ai/guides/prompt-guide#benefits-of-using-built-in-parameters) Benefits of Using Built-in Parameters Guaranteed Execution -------------------- Built-in parameters are processed directly by the search engine, ensuring they’re applied correctly every time. Better Performance ------------------ Parameters filter results before they reach the language model, leading to more focused and relevant responses. Cleaner Prompts --------------- Keep your prompts focused on what you want the model to generate, not how to search. Consistent Results ------------------ API parameters provide predictable behavior across different queries and use cases. ### [​](https://docs.perplexity.ai/guides/prompt-guide#advanced-techniques) Advanced Techniques We recommend for users _not_ to tune language parameters such as `temperature`, as the default settings for these have already been optimized. Parameter Optimization ---------------------- Adjust model parameters based on your specific needs: * **Search Domain Filter**: Limit results to trusted sources for research-heavy queries. * **Search Context Size**: Use “high” for comprehensive research questions and “low” for simple factual queries. Example configuration for technical documentation: Copy Ask AI { "search_domain_filter": ["wikipedia.org", "docs.python.org"], "web_search_options": { "search_context_size": "medium" } } ### [​](https://docs.perplexity.ai/guides/prompt-guide#tips-for-different-query-types) Tips for Different Query Types | Query Type | Best Practices | | --- | --- | | **Factual Research** | • Use specific questions • Use search domain filters for academic sources • Consider “high” search context size | | **Creative Content** | • Provide detailed style guidelines in system prompt • Specify tone, voice, and audience | | **Technical Questions** | • Include relevant technical context • Specify preferred programming language/framework • Use domain filters for documentation sites | | **Analysis & Insights** | • Request step-by-step reasoning • Ask for specific metrics or criteria | Was this page helpful? YesNo [OpenAI Compatibility\ \ Previous](https://docs.perplexity.ai/guides/chat-completions-guide) [Structured Outputs Guide\ \ Next](https://docs.perplexity.ai/guides/structured-outputs) ⌘I --- # Built-in Tool Capabilities - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/pro-search-tools#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Pro Search Built-in Tool Capabilities Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Quickstart](https://docs.perplexity.ai/guides/pro-search-quickstart) * [Built-in Tool Capabilities](https://docs.perplexity.ai/guides/pro-search-tools) * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) On this page * [Overview](https://docs.perplexity.ai/guides/pro-search-tools#overview) * [web\_search](https://docs.perplexity.ai/guides/pro-search-tools#web-search) * [fetch\_url\_content](https://docs.perplexity.ai/guides/pro-search-tools#fetch-url-content) * [Multi-Tool Workflows](https://docs.perplexity.ai/guides/pro-search-tools#multi-tool-workflows) * [Related Resources](https://docs.perplexity.ai/guides/pro-search-tools#related-resources) [​](https://docs.perplexity.ai/guides/pro-search-tools#overview) Overview ---------------------------------------------------------------------------- Pro Search provides two built-in tools that the model uses automatically to answer your queries. The model decides which tools to use and when—you don’t need to configure anything. These tools are called automatically by the system; you cannot register custom tools. All tool executions appear in the `reasoning_steps` array of streaming responses, giving you visibility into how the model researched your query. [​](https://docs.perplexity.ai/guides/pro-search-tools#web-search) web\_search --------------------------------------------------------------------------------- Conducts web searches to find current information, statistics, and expert opinions. **Example in action:** Copy Ask AI { "thought": "I need current data on EV market trends", "type": "web_search", "web_search": { "search_keywords": [\ "EV Statistics 2023-2024",\ "electric vehicle sales data",\ "global EV market trends"\ ], "search_results": [\ {\ "title": "Trends in electric cars",\ "url": "https://www.iea.org/reports/global-ev-outlook-2024/trends-in-electric-cars",\ "date": "2024-03-15",\ "last_updated": null,\ "snippet": "Electric car sales neared 14 million in 2023, 95% of which were in China, Europe and the United States...",\ "source": "web"\ }\ ] } } [​](https://docs.perplexity.ai/guides/pro-search-tools#fetch-url-content) fetch\_url\_content ------------------------------------------------------------------------------------------------ Retrieves full content from specific URLs to access detailed information beyond search result snippets. **Example in action:** Copy Ask AI { "thought": "This research paper contains detailed methodology I need to review", "type": "fetch_url_content", "fetch_url_content": { "contents": [\ {\ "title": "Attention Is All You Need",\ "url": "https://arxiv.org/pdf/1706.03762",\ "date": null,\ "last_updated": null,\ "snippet": "The dominant sequence transduction models are based on complex recurrent or convolutional neural networks that include an encoder and a decoder...",\ "source": "web"\ }\ ] } } [​](https://docs.perplexity.ai/guides/pro-search-tools#multi-tool-workflows) Multi-Tool Workflows ---------------------------------------------------------------------------------------------------- The model automatically combines multiple tools when needed. For example, when asked to research solar panel options, it might: 1. Use `web_search` to find current incentives and costs 2. Use `fetch_url_content` to read detailed policy documents 3. Use `web_search` again to verify electricity rates and compare providers [​](https://docs.perplexity.ai/guides/pro-search-tools#related-resources) Related Resources ---------------------------------------------------------------------------------------------- [Quickstart\ ----------\ \ Get started with Pro Search basics](https://docs.perplexity.ai/guides/pro-search-quickstart) [Stream Mode Guide\ -----------------\ \ Learn about streaming and real-time reasoning visibility](https://docs.perplexity.ai/guides/stream-mode-guide) [API Reference\ -------------\ \ Complete API documentation](https://docs.perplexity.ai/api-reference/chat-completions-post) Was this page helpful? YesNo [Quickstart\ \ Previous](https://docs.perplexity.ai/guides/pro-search-quickstart) [Chat Completions SDK\ \ Next](https://docs.perplexity.ai/guides/chat-completions-sdk) ⌘I --- # Sonar Search Context Size - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/search-context-size-guide#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Search & Filtering Sonar Search Context Size Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * [Sonar Domain Filter Guide](https://docs.perplexity.ai/guides/search-domain-filters) * [Sonar Language Filter Guide](https://docs.perplexity.ai/guides/language-filter-guide) * [Academic Filter Guide](https://docs.perplexity.ai/guides/academic-filter-guide) * [Sonar Date and Time Filters](https://docs.perplexity.ai/guides/date-range-filter-guide) * [SEC Filings Filter Guide](https://docs.perplexity.ai/guides/sec-guide) * [User Location Filter Guide](https://docs.perplexity.ai/guides/user-location-filter-guide) * [Sonar Search Context Size](https://docs.perplexity.ai/guides/search-context-size-guide) * [Sonar Web Search Control](https://docs.perplexity.ai/guides/search-control-guide) * [Returning Images with Sonar](https://docs.perplexity.ai/guides/returning-images) * [Returning Videos with Sonar](https://docs.perplexity.ai/guides/returning-videos) * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) The `search_context_size` parameter allows you to control how much search context is retrieved from the web during query resolution, letting you balance cost and comprehensiveness. * Default `search_context_size` is `low` * Selecting `"high"` increases search costs due to more extensive web retrieval. Use `"low"` when cost efficiency is critical. [​](https://docs.perplexity.ai/guides/search-context-size-guide#overview) Overview ------------------------------------------------------------------------------------- The `search_context_size` field—passed via the `web_search_options` object—determines how much search context is retrieved by the Sonar models. This setting can help you optimize for either: * Cost savings with minimal search input (`low`) * Comprehensive answers by maximizing retrieved information (`high`) * A balance of both (`medium`) This flexibility allows teams to tune their API usage to their budget and use case. To enable this feature, include the web\_search\_options.search\_context\_size parameter in your request payload: Copy Ask AI "web_search_options": { "search_context_size": "medium" } [​](https://docs.perplexity.ai/guides/search-context-size-guide#best-practices) Best Practices ------------------------------------------------------------------------------------------------- **Choosing the Right Context Size** * `low`: Best for short factual queries or when operating under strict token cost constraints. * `medium`: The default and best suited for general use cases. * `high`: Use for deep research, exploratory questions, or when citations and evidence coverage are critical. **Cost Optimization** * Selecting `low` or `medium` can significantly reduce overall token usage, especially at scale. * Consider defaulting to `low` for high-volume endpoints and selectively upgrading to `high` for complex user prompts. Combining with Other Filters * You can use `search_context_size` alongside other features like `search_domain_filter` to further control the scope of search. * Combining `medium` with a focused domain filter often gives a good tradeoff between quality and cost. Performance Considerations * Larger context sizes may slightly increase response latency due to more extensive search and reranking. * If you’re batching queries or supporting real-time interfaces, test with different settings to balance user experience and runtime. [​](https://docs.perplexity.ai/guides/search-context-size-guide#examples) Examples ------------------------------------------------------------------------------------- **1\. Minimal Search Context (“low”)** This option limits the search context retrieved for the model, reducing cost per request while still producing useful responses for simpler questions. [​](https://docs.perplexity.ai/guides/search-context-size-guide#request) Request ----------------------------------------------------------------------------------- cURL Python TypeScript Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header "Authorization: Bearer $SONAR_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "sonar", "messages": [\ {\ "role": "system",\ "content": "Be precise and concise."\ },\ {\ "role": "user",\ "content": "How many stars are there in our galaxy?"\ }\ ], "web_search_options": { "search_context_size": "low" } }' | jq **Pro-tip**: Use `low` when cost optimization is more important than answer completeness. **2\. Comprehensive Search Context (“high”)** This option maximizes the amount of search context used to answer the question, resulting in more thorough and nuanced responses. [​](https://docs.perplexity.ai/guides/search-context-size-guide#request-2) Request ------------------------------------------------------------------------------------- cURL Python TypeScript Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header "Authorization: Bearer $SONAR_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "sonar", "messages": [\ {\ "role": "system",\ "content": "Be precise and concise."\ },\ {\ "role": "user",\ "content": "Explain the economic causes of the 2008 financial crisis."\ }\ ], "web_search_options": { "search_context_size": "high" } }' | jq **Pro-tip**: Use `high` for research-heavy or nuanced queries where coverage matters more than cost. ⸻ Was this page helpful? YesNo [User Location Filter Guide\ \ Previous](https://docs.perplexity.ai/guides/user-location-filter-guide) [Sonar Web Search Control\ \ Next](https://docs.perplexity.ai/guides/search-control-guide) ⌘I --- # Structured Outputs Guide - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/structured-outputs#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Prompting & Output Control Structured Outputs Guide Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * [Prompt Guide](https://docs.perplexity.ai/guides/prompt-guide) * [Structured Outputs Guide](https://docs.perplexity.ai/guides/structured-outputs) * [Streaming Responses](https://docs.perplexity.ai/guides/streaming-responses) * [Stream Mode: Concise vs Full](https://docs.perplexity.ai/guides/pro-search-stream-mode-guide) * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [​](https://docs.perplexity.ai/guides/structured-outputs#overview) Overview ------------------------------------------------------------------------------ Structured outputs enable you to enforce specific response formats from Perplexity’s models, ensuring consistent, machine-readable data that can be directly integrated into your applications without manual parsing. We currently support two types of structured outputs: **JSON Schema** and **Regex**. LLM responses will work to match the specified format, except for the following cases: * The output exceeds `max_tokens` Enabling the structured outputs can be done by adding a `response_format` field in the request: **JSON Schema** * `response_format: { type: "json_schema", json_schema: {"schema": object} }` . * The schema should be a valid JSON schema object. **Regex** (only available for `sonar` right now) * `response_format: { type: "regex", regex: {"regex": str} }` . * The regex is a regular expression string. **Improve Schema Compliance**: Give the LLM some hints about the output format in your prompts to improve adherence to the structured format.For example, include phrases like “Please return the data as a JSON object with the following structure…” or “Extract the information and format it as specified in the schema.” The first request with a new JSON Schema or Regex expects to incur delay on the first token. Typically, it takes 10 to 30 seconds to prepare the new schema, and may result in timeout errors. Once the schema has been prepared, the subsequent requests will not see such delay. [​](https://docs.perplexity.ai/guides/structured-outputs#examples) Examples ------------------------------------------------------------------------------ ### [​](https://docs.perplexity.ai/guides/structured-outputs#1-financial-analysis-with-json-schema) 1\. Financial Analysis with JSON Schema Python TypeScript cURL Copy Ask AI from perplexity import Perplexity from typing import List, Optional from pydantic import BaseModel class FinancialMetrics(BaseModel): company: str quarter: str revenue: float net_income: float eps: float revenue_growth_yoy: Optional[float] = None key_highlights: Optional[List[str]] = None client = Perplexity() completion = client.chat.completions.create( model="sonar-pro", messages=[\ {\ "role": "user",\ "content": "Analyze the latest quarterly earnings report for Apple Inc. Extract key financial metrics."\ }\ ], response_format={ "type": "json_schema", "json_schema": { "schema": FinancialMetrics.model_json_schema() } } ) metrics = FinancialMetrics.model_validate_json(completion.choices[0].message.content) print(f"Revenue: ${metrics.revenue}B") ### [​](https://docs.perplexity.ai/guides/structured-outputs#2-extract-contact-information-with-regex) 2\. Extract Contact Information with Regex Python TypeScript cURL Copy Ask AI from perplexity import Perplexity client = Perplexity() completion = client.chat.completions.create( model="sonar", messages=[\ {\ "role": "user",\ "content": "Find the direct email address for the investor relations contact at Tesla Inc."\ }\ ], response_format={ "type": "regex", "regex": { "regex": r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}" } } ) email = completion.choices[0].message.content print(f"Investor Relations Email: {email}") [​](https://docs.perplexity.ai/guides/structured-outputs#best-practices) Best Practices ------------------------------------------------------------------------------------------ ### [​](https://docs.perplexity.ai/guides/structured-outputs#generating-responses-in-a-json-format) Generating responses in a JSON Format For Python users, we recommend using the Pydantic library to [generate JSON schema](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_json_schema) . **Unsupported JSON Schemas** Recursive JSON schema is not supported. As a result of that, unconstrained objects are not supported either. Here’s a few example of unsupported schemas: Copy Ask AI # UNSUPPORTED! from typing import Any class UnconstrainedDict(BaseModel): unconstrained: dict[str, Any] class RecursiveJson(BaseModel): value: str child: list["RecursiveJson"] **Links in JSON Responses**: Requesting links as part of a JSON response may not always work reliably and can result in hallucinations or broken links. Models may generate invalid URLs when forced to include links directly in structured outputs.To ensure all links are valid, use the links returned in the `citations` or `search_results` fields from the API response. Never count on the model to return valid links directly as part of the JSON response content. ### [​](https://docs.perplexity.ai/guides/structured-outputs#generating-responses-using-a-regex) Generating responses using a regex **Supported Regex** * Characters: `\d`, `\w`, `\s` , `.` * Character classes: `[0-9A-Fa-f]` , `[^x]` * Quantifiers: `*`, `?` , `+`, `{3}`, `{2,4}` , `{3,}` * Alternation: `|` * Group: `( ... )` * Non-capturing group: `(?: ... )` **Unsupported Regex** * Contents of group: `\1` * Anchors: `^`, `$`, `\b` * Positive lookahead: `(?= ... )` * Negative lookahead: `(?! ... )` * Positive look-behind: `(?<= ... )` * Negative look-behind: `(?` section containing reasoning tokens, immediately followed by the structured output. The `response_format` parameter does not remove these reasoning tokens from the output, so the final response will need to be parsed manually. **Sample Response:** Copy Ask AI I need to provide information about France in a structured JSON format with specific fields: country, capital, population, official_language. For France: - Country: France - Capital: Paris - Population: About 67 million (as of 2023) - Official Language: French Let me format this information as required. {"country":"France","capital":"Paris","population":67750000,"official_language":"French"} For a reusable implementation to extract JSON from reasoning model outputs, see our [example utility on GitHub](https://github.com/ppl-ai/api-discussion/blob/main/utils/extract_json_reasoning_models.py) . Was this page helpful? YesNo [Prompt Guide\ \ Previous](https://docs.perplexity.ai/guides/prompt-guide) [Streaming Responses\ \ Next](https://docs.perplexity.ai/guides/streaming-responses) ⌘I --- # SEC Filings Filter Guide - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/sec-guide#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Search & Filtering SEC Filings Filter Guide Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * [Sonar Domain Filter Guide](https://docs.perplexity.ai/guides/search-domain-filters) * [Sonar Language Filter Guide](https://docs.perplexity.ai/guides/language-filter-guide) * [Academic Filter Guide](https://docs.perplexity.ai/guides/academic-filter-guide) * [Sonar Date and Time Filters](https://docs.perplexity.ai/guides/date-range-filter-guide) * [SEC Filings Filter Guide](https://docs.perplexity.ai/guides/sec-guide) * [User Location Filter Guide](https://docs.perplexity.ai/guides/user-location-filter-guide) * [Sonar Search Context Size](https://docs.perplexity.ai/guides/search-context-size-guide) * [Sonar Web Search Control](https://docs.perplexity.ai/guides/search-control-guide) * [Returning Images with Sonar](https://docs.perplexity.ai/guides/returning-images) * [Returning Videos with Sonar](https://docs.perplexity.ai/guides/returning-videos) * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) The `search_mode: "sec"` parameter allows you to tailor your searches specifically to U.S. Securities and Exchange Commission (SEC) filings, prioritizing official financial documents, disclosures, and regulatory filings from public companies. [​](https://docs.perplexity.ai/guides/sec-guide#overview) Overview --------------------------------------------------------------------- The SEC filter allows users to target their searches specifically to official SEC filings. This is especially useful for investors, analysts, journalists, and professionals who require authoritative financial documents, such as 10-Ks, 10-Qs, 8-Ks, and other regulatory filings, rather than general web content or news articles. When you activate the SEC filter by setting `search_mode: "sec"`, Perplexity limits results to the SEC’s EDGAR database and other reputable sources of regulatory filings, filtering out non-official or general web sources. This ensures that the answers you receive are grounded in official disclosures and regulatory compliance. [​](https://docs.perplexity.ai/guides/sec-guide#key-features-and-functionality) Key Features and Functionality ----------------------------------------------------------------------------------------------------------------- * **Source Filtering**: Prioritizes SEC filings such as 10-K, 10-Q, 8-K, S-1, and more * **Regulatory Focus**: Returns results based on official financial and regulatory documents * **Enhanced Precision**: Provides more accurate and up-to-date information for financial and compliance queries [​](https://docs.perplexity.ai/guides/sec-guide#usage-examples) Usage Examples --------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/guides/sec-guide#basic-sec-filings-search) Basic SEC Filings Search This example shows how to perform a basic search using the SEC filter. cURL Python Node.js Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header "accept: application/json" \ --header "authorization: Bearer $SONAR_API_KEY" \ --header "content-type: application/json" \ --data '{ "model": "sonar-pro", "messages": [{"role": "user", "content": "Prepare me for markets opening."}], "search_mode": "sec" }' | jq ### [​](https://docs.perplexity.ai/guides/sec-guide#combining-sec-mode-with-other-parameters) Combining SEC Mode with Other Parameters You can combine the SEC filter with other parameters for more refined searches: cURL Python TypeScript Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header "accept: application/json" \ --header "authorization: Bearer $SONAR_API_KEY" \ --header "content-type: application/json" \ --data '{ "model": "sonar", "messages": [{"role": "user", "content": "Summarize the latest 10-K filings for Apple Inc."}], "stream": false, "search_mode": "sec", "search_after_date_filter": "1/1/2023" }' | jq [​](https://docs.perplexity.ai/guides/sec-guide#recommended-use-cases) Recommended Use Cases ----------------------------------------------------------------------------------------------- The SEC filter is particularly valuable for: 1. **Financial Analysis**: When you need to review official financial statements and disclosures 2. **Regulatory Compliance**: For questions requiring up-to-date regulatory filings and compliance information 3. **Market Research**: When tracking company events, earnings, and risk factors 4. **Due Diligence**: For investors and analysts evaluating public companies [​](https://docs.perplexity.ai/guides/sec-guide#best-practices) Best Practices --------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/guides/sec-guide#optimizing-sec-filings-searches) Optimizing SEC Filings Searches * **Be Specific**: Reference the type of filing (e.g., 10-K, 8-K) and company name for more precise results * **Use Financial Terminology**: Include terms like “earnings,” “risk factors,” or “management discussion” to target relevant sections * **Combine with Date Filters**: For the most recent filings, combine with `search_after_date_filter` * **Adjust Context Size**: Use higher `search_context_size` values for more comprehensive responses ### [​](https://docs.perplexity.ai/guides/sec-guide#limitations) Limitations * Availability is limited to filings made public through the SEC’s EDGAR system * Some filings may be delayed or amended after initial publication * Only covers U.S. public companies and registered entities ⸻ Was this page helpful? YesNo [Sonar Date and Time Filters\ \ Previous](https://docs.perplexity.ai/guides/date-range-filter-guide) [User Location Filter Guide\ \ Next](https://docs.perplexity.ai/guides/user-location-filter-guide) ⌘I --- # Unknown \# Memory Management > Advanced conversation memory solutions using LlamaIndex for persistent, context-aware applications # Memory Management with LlamaIndex and Perplexity Sonar API ## Overview This article explores advanced solutions for preserving conversational memory in applications powered by large language models (LLMs). The goal is to enable coherent multi-turn conversations by retaining context across interactions, even when constrained by the model's token limit. ## Problem Statement LLMs have a limited context window, making it challenging to maintain long-term conversational memory. Without proper memory management, follow-up questions can lose relevance or hallucinate unrelated answers. ## Approaches Using LlamaIndex, we implemented two distinct strategies for solving this problem: ### 1. \*\*Chat Summary Memory Buffer\*\* \* \*\*Goal\*\*: Summarize older messages to fit within the token limit while retaining key context. \* \*\*Approach\*\*: \* Uses LlamaIndex's \`ChatSummaryMemoryBuffer\` to truncate and summarize conversation history dynamically. \* Ensures that key details from earlier interactions are preserved in a compact form. \* \*\*Use Case\*\*: Ideal for short-term conversations where memory efficiency is critical. \* \*\*Implementation\*\*: \[View the complete guide →\](chat-summary-memory-buffer/) ### 2. \*\*Persistent Memory with LanceDB\*\* \* \*\*Goal\*\*: Enable long-term memory persistence across sessions. \* \*\*Approach\*\*: \* Stores conversation history as vector embeddings in LanceDB. \* Retrieves relevant historical context using semantic search and metadata filters. \* Integrates Perplexity's Sonar API for generating responses based on retrieved context. \* \*\*Use Case\*\*: Suitable for applications requiring long-term memory retention and contextual recall. \* \*\*Implementation\*\*: \[View the complete guide →\](chat-with-persistence/) ## Directory Structure \`\`\` articles/memory-management/ ├── chat-summary-memory-buffer/ # Implementation of summarization-based memory ├── chat-with-persistence/ # Implementation of persistent memory with LanceDB \`\`\` ## Getting Started 1. Clone the repository: \`\`\`bash theme={null} git clone https://github.com/your-repo/api-cookbook.git cd api-cookbook/articles/memory-management \`\`\` 2. Follow the README in each subdirectory for setup instructions and usage examples. ## Key Benefits \* \*\*Context Window Management\*\*: 43% reduction in token usage through summarization \* \*\*Conversation Continuity\*\*: 92% context retention across sessions \* \*\*API Compatibility\*\*: 100% success rate with Perplexity message schema \* \*\*Production Ready\*\*: Scalable architectures for enterprise applications ## Contributions If you have found another way to tackle the same issue using LlamaIndex please feel free to open a PR! Check out our \[CONTRIBUTING.md\](https://github.com/ppl-ai/api-cookbook/blob/main/CONTRIBUTING.md) file for more guidance. \*\*\* --- > To find navigation and other pages in this documentation, fetch the llms.txt file at: https://docs.perplexity.ai/llms.txt --- # Page Not Found [Skip to main content](https://docs.perplexity.ai/models/models/sonar-deep-research#content-area) Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Page Not Found 404 Page Not Found ============== We couldn't find the page. Maybe you were looking for one of these pages below? [Pricing](https://docs.perplexity.ai/getting-started/pricing#sonar-models-chat-completions) [OpenAI Agents Integration](https://docs.perplexity.ai/cookbook/articles/openai-agents-integration/README#different-sonar-models) [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers#tier-5) ⌘I --- # Sonar - Perplexity [Skip to main content](https://docs.perplexity.ai/getting-started/models/models/sonar#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [Models](https://docs.perplexity.ai/getting-started/models) Sonar ===== Fast answers with reliable search results A lightweight, cost-effective search model optimized for quick, grounded answers with real-time web search. Pricing ------- [See the full pricing and search context size guide.](https://docs.perplexity.ai/getting-started/pricing) ### Input Tokens $1 Per 1M Tokens ### Output Tokens $1 Per 1M Tokens ### Price Per 1K Requests $12$8$5 HighMediumLow Features -------- ![Arrow](https://mintlify-assets.b-cdn.net/perplexity/arrow.svg) ### Non-reasoning model ![Search](https://mintlify-assets.b-cdn.net/perplexity/searchicon.svg) ### Ideal for quick searches and straightforward Q&A tasks ![Length](https://mintlify-assets.b-cdn.net/perplexity/lengthicon.svg) ### 128K context length ![Speed](https://mintlify-assets.b-cdn.net/perplexity/speedicon.svg) ### Optimized for speed and cost ![Citation](https://mintlify-assets.b-cdn.net/perplexity/citationicon.svg) ### Real-time web search-based answers with detailed search results ![Lock](https://mintlify-assets.b-cdn.net/perplexity/lockicon.svg) ### No training on customer data Real World Use Cases -------------------- ![Summarizing](https://mintlify-assets.b-cdn.net/perplexity/glasses.svg) ### Summarizing books, TV shows, and movies ![Definitions](https://mintlify-assets.b-cdn.net/perplexity/search.svg) ### Looking up definitions or quick facts ![Browsing](https://mintlify-assets.b-cdn.net/perplexity/eye.svg) ### Browsing news, sports, health, and finance content cURL python Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header "Authorization: Bearer " \ --header "Content-Type: application/json" \ --data '{ "model": "sonar", "messages": [\ {\ "role": "user",\ "content": "What is the latest news in AI research?"\ }\ ] }' | jq **Sample Response Metadata** Success Response Copy Ask AI { "id": "a954f304-9a7a-44f5-9605-152e9f5b1c74", "model": "sonar", "created": 1756485752, "usage": { "prompt_tokens": 9, "completion_tokens": 402, "total_tokens": 411, "search_context_size": "low", "cost": { "input_tokens_cost": 0.0, "output_tokens_cost": 0.0, "request_cost": 0.005, "total_cost": 0.005 } }, "citations": [\ "https://champaignmagazine.com/2025/07/01/ai-by-ai-first-half-of-2025-themes-and-breakthroughs/",\ "https://www.artificialintelligence-news.com",\ "https://www.crescendo.ai/news/latest-ai-news-and-updates",\ "https://www.sciencedaily.com/news/computers_math/artificial_intelligence/",\ "https://explodingtopics.com/blog/future-of-ai"\ ], "search_results": [\ {\ "title": "AI by AI: First Half of 2025 Themes and Breakthroughs",\ "url": "https://champaignmagazine.com/2025/07/01/ai-by-ai-first-half-of-2025-themes-and-breakthroughs/",\ "date": "2025-07-01",\ "last_updated": "2025-08-29",\ "snippet": "Research published on May 13, 2025, by philosopher Frank Martela suggests AI is approaching conditions for free will, sparking ethical debates."\ },\ {\ "title": "AI News | Latest AI News, Analysis & Events",\ "url": "https://www.artificialintelligence-news.com",\ "date": "2025-08-28",\ "last_updated": "2025-08-29",\ "snippet": "Marketing AI boom faces crisis of consumer trust · AI security wars: Can Google Cloud defend against tomorrow's threats? · Agentic AI: Promise, scepticism, and ..."\ },\ {\ "title": "Latest AI Breakthroughs and News: June, July, August 2025",\ "url": "https://www.crescendo.ai/news/latest-ai-news-and-updates",\ "date": "2025-08-29",\ "last_updated": "2025-08-29",\ "snippet": "Wondering what's happening in the AI world? Here are the latest AI breakthroughs and news that are shaping the world around us!"\ },\ {\ "title": "Artificial Intelligence News - ScienceDaily",\ "url": "https://www.sciencedaily.com/news/computers_math/artificial_intelligence/",\ "date": "2025-08-28",\ "last_updated": "2025-08-29",\ "snippet": "Latest Headlines · Harvard's Ultra-Thin Quantum Computing Chip · Google's Deepfake Hunter Is Here · Affordance: The Brain's Hidden Superpower · Half of Today's Jobs ..."\ },\ {\ "title": "Future of AI: 7 Key AI Trends For 2025 & 2026",\ "url": "https://explodingtopics.com/blog/future-of-ai",\ "date": "2025-08-15",\ "last_updated": "2025-08-29",\ "snippet": "A look into the future of AI and the rapidly evolving landscape including potential impacts in healthcare, finance, and sustainability."\ }\ ], "object": "chat.completion", "choices": [\ {\ "index": 0,\ "finish_reason": "stop",\ "message": {\ "role": "assistant",\ "content": "The latest AI research breakthroughs as of mid-2025 include significant advancements across AI models, robotics, quantum computing, and sustainable AI technologies. Key highlights are:\n\n- **GPT-4o**, released in May 2025, integrates real-time speech, vision, text, and memory with near-human expressiveness, enabling a shift from chatbot interfaces to fluid, embodied AI assistants with empathic interaction and full conversational memory[1].\n\n- Google DeepMind's **Gemini 2.5 Pro** and **Gemini Robotics** models demonstrate advanced parallel thinking for complex math and coding, while enhancing robot reasoning, dexterity, and autonomy in physical tasks without external positioning systems[1].\n\n- Researchers have demonstrated **photonic quantum circuits** that enhance machine learning performance, marking practical steps toward incorporating quantum computing in AI tasks[1][4].\n\n- Japanese scientists created a **self-powered artificial synapse** that processes visual data with very low energy, enabling sustainable AI deployment on edge devices such as IoT sensors and autonomous systems[1].\n\nAdditional notable developments:\n\n- Stanford developed a **virtual AI scientist** that can autonomously design and execute biological experiments, accelerating biomedical research in genomics and drug discovery[3].\n\n- China introduced a **low-cost open-source AI model** cheaper than previous leaders, aimed at enterprise use and reflecting strategic AI independence efforts amid global chip sanctions[3].\n\n- AI is also being applied in healthcare to improve precision medicine and cancer treatment, exemplified by platforms like Avenda Health’s system for mapping and treating prostate cancer, which outperforms MRI in detection and has influenced treatment decisions[5].\n\nEmerging themes include the ethical debate on AI approaching free will conditions, integration of AI in physical and cognitive domains, and progress toward agentive AI systems capable of naturalistic interaction and real-world tasks[1][2].\n\nThese developments signal a rapid and multi-dimensional evolution in AI research, spanning foundational AI capabilities, hardware innovations, and application-specific breakthroughs in medicine and robotics."\ },\ "delta": {\ "role": "assistant",\ "content": ""\ }\ }\ ] } See all 76 lines Cost Breakdown for Sample Request **Token Usage** * Prompt Tokens: 9 * Completion Tokens: 402 * Search Context Size: Low 1 Calculate Input Tokens Cost 9 tokens ÷ 1,000,000 × 1\=1 = 1\=0.000009 2 Calculate Output Tokens Cost 411 tokens ÷ 1,000,000 × 1\=1 = 1\=0.000411 3 Calculate Search Context Cost 1 request × 5÷1,000\=5 ÷ 1,000 = 5÷1,000\=0.005 4 Calculate Total Cost 0.000009+0.000009 + 0.000009+0.000411 + 0.005\=0.005 = 0.005\=0.005420 **Total cost for this request: $0.005420** ⌘I --- # Search API - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/perplexity-sdk-search#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Search API Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) On this page * [Quick Start](https://docs.perplexity.ai/guides/perplexity-sdk-search#quick-start) * [Features](https://docs.perplexity.ai/guides/perplexity-sdk-search#features) * [Multi-Query Search](https://docs.perplexity.ai/guides/perplexity-sdk-search#multi-query-search) * [Limiting Search Results](https://docs.perplexity.ai/guides/perplexity-sdk-search#limiting-search-results) * [Location-Based Search](https://docs.perplexity.ai/guides/perplexity-sdk-search#location-based-search) * [Advanced Usage](https://docs.perplexity.ai/guides/perplexity-sdk-search#advanced-usage) * [Complex Search Configuration](https://docs.perplexity.ai/guides/perplexity-sdk-search#complex-search-configuration) * [Error Handling](https://docs.perplexity.ai/guides/perplexity-sdk-search#error-handling) * [Async Usage](https://docs.perplexity.ai/guides/perplexity-sdk-search#async-usage) * [Best Practices](https://docs.perplexity.ai/guides/perplexity-sdk-search#best-practices) * [Resources](https://docs.perplexity.ai/guides/perplexity-sdk-search#resources) This page focuses on the Search API. For shared setup (installation, authentication, configuration, error handling, performance, and type safety), see the [SDK overview](https://docs.perplexity.ai/guides/perplexity-sdk) . [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#quick-start) Quick Start --------------------------------------------------------------------------------------- Get ranked web search results: Python TypeScript/JavaScript Copy Ask AI from perplexity import Perplexity client = Perplexity() search = client.search.create( query="latest AI developments 2024", max_results=5 ) for result in search.results: print(f"{result.title}: {result.url}") Example Output Copy Ask AI The Top Artificial Intelligence Trends - IBM: https://www.ibm.com/think/insights/artificial-intelligence-trends Year in review: Google's biggest AI advancements of 2024: https://blog.google/technology/ai/2024-ai-extraordinary-progress-advancement/ AI Pulse: Top AI Trends from 2024 - A Look Back | Trend Micro (US): https://www.trendmicro.com/en_us/research/25/a/top-ai-trends-from-2024-review.html The State of AI: Global survey - McKinsey: https://www.mckinsey.com/capabilities/quantumblack/our-insights/the-state-of-ai Generative AI Developments & Trends in 2024: A Timeline: https://www.channelinsider.com/managed-services/generative-ai-developments-trends-year-in-review/ [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#features) Features --------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#multi-query-search) Multi-Query Search Run multiple related searches in a single request: Python TypeScript/JavaScript Copy Ask AI search = client.search.create( query=[\ "latest AI developments 2024",\ "solar power innovations",\ "wind energy developments"\ ] ) # Results are combined and ranked for i, result in enumerate(search.results): print(f"{i + 1}. {result.title}") print(f" URL: {result.url}") print(f" Date: {result.date}\n") ### [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#limiting-search-results) Limiting Search Results Control the number of search results returned: Python TypeScript/JavaScript Copy Ask AI search = client.search.create( query="latest AI developments 2024", max_results=5 # Get only top 5 results ) print(f"Found {len(search.results)} results") ### [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#location-based-search) Location-Based Search Get geographically relevant results by country: The `country` parameter only supports ISO 3166-1 alpha-2 country codes (e.g., “US”, “GB”, “DE”). Python TypeScript/JavaScript Copy Ask AI search = client.search.create( query="local restaurants", country="US" # ISO country code ) # Search in different countries uk_search = client.search.create( query="tech events", country="GB" # United Kingdom ) canada_search = client.search.create( query="hockey news", country="CA" # Canada ) Common ISO country codes: US (United States), GB (United Kingdom), CA (Canada), DE (Germany), FR (France), JP (Japan), AU (Australia). See the full list at [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) . [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#advanced-usage) Advanced Usage --------------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#complex-search-configuration) Complex Search Configuration Combine available options for enhanced results: Python TypeScript/JavaScript Copy Ask AI from perplexity.types import SearchCreateParams advanced_search_params = SearchCreateParams( query="renewable energy research", max_results=15, return_images=True, return_snippets=True, country="US" # ISO country code ) search = client.search.create(**advanced_search_params.dict()) # Process results with metadata for result in search.results: print(f"Title: {result.title}") print(f"URL: {result.url}") print(f"Date: {result.date}") print(f"Snippet: {result.snippet}") if result.images and len(result.images) > 0: print(f"Images: {len(result.images)} found") print("---") ### [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#error-handling) Error Handling Handle search-specific errors: Python TypeScript/JavaScript Copy Ask AI import perplexity from perplexity import Perplexity client = Perplexity() try: search = client.search.create( query="", # Empty query will cause error max_results=5 ) except perplexity.BadRequestError as e: print(f"Invalid search parameters: {e}") except perplexity.RateLimitError as e: print("Search rate limit exceeded") except perplexity.APIStatusError as e: print(f"Search API error {e.status_code}: {e}") except Exception as e: print(f"Unexpected error: {e}") [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#async-usage) Async Usage --------------------------------------------------------------------------------------- Python TypeScript/JavaScript Copy Ask AI import asyncio from perplexity import AsyncPerplexity async def main(): client = AsyncPerplexity() # Single search search = await client.search.create( query="What is Perplexity AI?", max_results=5 ) print(search) # Concurrent searches tasks = [\ client.search.create(query=f"query {i}")\ for i in range(3)\ ] results = await asyncio.gather(*tasks) print(f"Completed {len(results)} searches") asyncio.run(main()) [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#best-practices) Best Practices --------------------------------------------------------------------------------------------- 1 Handle rate limits efficiently Implement exponential backoff for rate limit errors. Python TypeScript/JavaScript Copy Ask AI import time import random import perplexity def search_with_retry(client, query, max_retries=3): for attempt in range(max_retries): try: return client.search.create(query=query) except perplexity.RateLimitError: if attempt < max_retries - 1: # Exponential backoff with jitter delay = (2 ** attempt) + random.uniform(0, 1) time.sleep(delay) else: raise 2 Process concurrent searches efficiently Use async for concurrent requests while respecting rate limits. Python TypeScript/JavaScript Copy Ask AI import asyncio from perplexity import AsyncPerplexity async def batch_search(queries, batch_size=3, delay_ms=1000): client = AsyncPerplexity() results = [] for i in range(0, len(queries), batch_size): batch = queries[i:i + batch_size] batch_tasks = [\ client.search.create(query=query, max_results=5)\ for query in batch\ ] batch_results = await asyncio.gather(*batch_tasks) results.extend(batch_results) # Add delay between batches if i + batch_size < len(queries): await asyncio.sleep(delay_ms / 1000) return results # Usage queries = ["AI developments", "climate change", "space exploration"] results = asyncio.run(batch_search(queries)) print(f"Processed {len(results)} searches") [​](https://docs.perplexity.ai/guides/perplexity-sdk-search#resources) Resources ----------------------------------------------------------------------------------- * [SDK Overview](https://docs.perplexity.ai/guides/perplexity-sdk) - Installation and setup * [API Reference - Search](https://docs.perplexity.ai/api-reference/search-post) - Search API Reference Was this page helpful? YesNo ⌘I --- # Sonar pro - Perplexity [Skip to main content](https://docs.perplexity.ai/getting-started/models/models/sonar-pro#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [Models](https://docs.perplexity.ai/getting-started/models) Sonar Pro ========= Advanced search with enhanced search results You can use Pro Search to get enhanced search results with reasoning. [Learn more about Pro Search here](https://docs.perplexity.ai/guides/pro-search-quickstart) . An advanced search model designed for complex queries, delivering deeper content understanding with enhanced search result accuracy and 2x more search results than standard Sonar. Pricing ------- [See the full pricing and search context size guide.](https://docs.perplexity.ai/getting-started/pricing) ### Input Tokens $3 Per 1M Tokens ### Output Tokens $15 Per 1M Tokens ### Price Per 1K Requests $14$10$6 HighMediumLow Features -------- ![Arrow](https://mintlify-assets.b-cdn.net/perplexity/arrow.svg) ### Non-reasoning model ![Search](https://mintlify-assets.b-cdn.net/perplexity/searchicon.svg) ### Optimized for complex, multi-step Q&A tasks ![Length](https://mintlify-assets.b-cdn.net/perplexity/lengthicon.svg) ### 200K context length ![Speed](https://mintlify-assets.b-cdn.net/perplexity/speedicon.svg) ### Advanced information retrieval architecture ![Citation](https://mintlify-assets.b-cdn.net/perplexity/citationicon.svg) ### 2x more search results than standard Sonar ![Lock](https://mintlify-assets.b-cdn.net/perplexity/lockicon.svg) ### No training on customer data Real World Use Cases -------------------- ![Research](https://mintlify-assets.b-cdn.net/perplexity/glasses.svg) ### Complex research questions requiring depth ![Analysis](https://mintlify-assets.b-cdn.net/perplexity/search.svg) ### Comparative analysis across multiple sources ![Synthesis](https://mintlify-assets.b-cdn.net/perplexity/eye.svg) ### Information synthesis and detailed reporting cURL python Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header "Authorization: Bearer " \ --header "Content-Type: application/json" \ --data '{ "model": "sonar-pro", "messages": [\ {\ "role": "user",\ "content": "Analyze the competitive positioning of Perplexity in the AI search market and evaluate how Comet compares to similar offerings from other companies."\ }\ ] }' | jq **Sample Response Metadata** Success Response Copy Ask AI { "id": "12572668-b12a-4ce5-a697-57e22816a2ce", "model": "sonar-pro", "created": 1756486047, "usage": { "prompt_tokens": 26, "completion_tokens": 832, "total_tokens": 858, "search_context_size": "low", "cost": { "input_tokens_cost": 0.0, "output_tokens_cost": 0.012, "request_cost": 0.006, "total_cost": 0.019 } }, "citations": [\ "https://explodingtopics.com/blog/perplexity-ai-stats",\ "https://opentools.ai/news/perplexity-ceo-challenges-googles-ai-strategy-in-the-browser-wars",\ "https://taptwicedigital.com/stats/perplexity",\ "https://www.leanware.co/insights/comet-perplexity-everything-you-need-to-know",\ "https://www.index.dev/blog/perplexity-statistics"\ ], "search_results": [\ {\ "title": "The Latest Perplexity AI Stats (2025)",\ "url": "https://explodingtopics.com/blog/perplexity-ai-stats",\ "date": "2025-06-23",\ "last_updated": "2025-08-29",\ "snippet": "As of 2025, the AI space is valued at approximately $600 billion, with projections to increase by 500% over the next 5 years."\ },\ {\ "title": "Perplexity CEO Challenges Google's AI Strategy in the ...",\ "url": "https://opentools.ai/news/perplexity-ceo-challenges-googles-ai-strategy-in-the-browser-wars",\ "date": "2025-07-17",\ "last_updated": "2025-07-17",\ "snippet": "For example, Perplexity's AI-driven browser, Comet, represents a direct challenge to Google's traditional search engine model by prioritizing ..."\ },\ {\ "title": "7 Perplexity AI Statistics (2025): Revenue, Valuation, ...",\ "url": "https://taptwicedigital.com/stats/perplexity",\ "date": "2025-04-19",\ "last_updated": "2025-08-29",\ "snippet": "Perplexity AI holds a 6.2% market share in the AI search market. Perplexity AI is valued at $18 billion as of March 2025. Perplexity AI has ..."\ },\ {\ "title": "Comet Perplexity: Everything You Need to Know - Leanware",\ "url": "https://www.leanware.co/insights/comet-perplexity-everything-you-need-to-know",\ "date": "2025-07-25",\ "last_updated": "2025-08-28",\ "snippet": "Learn what Perplexity Comet is, how it works, and why it's changing the AI landscape, from real-world uses and tech insights to pricing, ..."\ },\ {\ "title": "50+ Perplexity AI Stats to Know in 2025",\ "url": "https://www.index.dev/blog/perplexity-statistics",\ "date": "2025-08-01",\ "last_updated": null,\ "snippet": "As of May 2025, Perplexity AI processes over 780 million monthly search queries, up from just 230 million in mid-2024. That's more than 30 ..."\ }\ ], "object": "chat.completion", "choices": [\ {\ "index": 0,\ "finish_reason": "stop",\ "message": {\ "role": "assistant",\ "content": "Perplexity occupies a rapidly expanding and influential position in the AI search market, characterized by robust user growth, significant market share, and disruptive innovation through products like the Comet browser[1][3][5]. Comet, Perplexity's AI-driven browser, stands out by favoring a user-centric, agentic browsing experience, in marked contrast to traditional browsers and search tools built around advertising ecosystems[2][4].\n\n**Competitive Positioning of Perplexity:**\n- **Market Share & Growth**: Perplexity has achieved a 6.2% market share in AI search, with an $18 billion valuation as of March 2025[3]. The platform saw visits surge from 52.4 million in March 2024 to 159.7 million in March 2025—a nearly 192% increase in monthly visitors—and now processes over 780 million monthly queries[1][5].\n- **User Base**: With approximately 15 million active monthly users, Perplexity is among the most adopted AI search platforms[1].\n- **Strategic Focus**: Its strategy centers on synthesizing information from multiple sources, rather than relying on a single proprietary index or algorithm[3].\n- **Ecosystem Independence**: By launching its own browser, Perplexity extends beyond plug-ins and integrations, directly challenging the dominance of Google (Chrome/Search), Microsoft (Edge/Bing), and Apple (Safari)[4].\n\n**Comet's Distinct Approach Compared to Competitors:**\n\n| Feature | Comet (Perplexity) | Google Chrome/Search | Microsoft Edge/Bing | Others (e.g., Safari, Firefox) |\n|-------------------------------|------------------------------------------|--------------------------|------------------------|----------------------------------|\n| **Business Model** | Subscription-based, low ad reliance | Ad-driven | Mixed (ads + services) | Mainly traditional browsing |\n| **AI Integration** | Deeply agentic, task automation | Incipient (AI summaries)| Embedded search AI | Limited or add-on only |\n| **User Experience Focus** | Automation, personalization | Traffic/ads optimization| Integration w/ Windows | Privacy, open-source emphasis |\n| **Ecosystem Independence** | Fully standalone browser; own assistant | Chrome Store dependence | Tied to Windows | Add-ons, less AI-focused |\n\n**Key Innovations of Comet vs. Competitors:**\n- **Agentic Browsing**: Comet enables autonomous execution of user intent—tasks beyond search, such as form completion or navigation—leveraging AI agents to streamline workflows[2][4].\n- **Contextual Awareness**: Maintains session and browsing context for more relevant, personalized assistance[4].\n- **Cross-Tab Functionality**: Performs tasks across all tabs and logged-in sites, surpassing limitations of plug-ins or browser extensions[4].\n- **User-Centric Model**: Moves away from ad-driven monetization, focusing on delivering value through direct service and subscription[2].\n\n**Competitive Landscape and Impact:**\n- **Direct Challenge to Market Leaders**: Comet attacks the core of Google's and Microsoft's value proposition, offering a radically different vision centered on user benefit rather than maximizing ad engagement[2][4].\n- **Potential Market Shift**: The shift toward premium, AI-enhanced browsing reflects growing consumer willingness to pay for advanced features, potentially leading to reduced reliance on advertising industry-wide[2].\n- **Risk and Opportunities**: While incumbents possess vast resources, Perplexity's rapid innovation and its Comet ecosystem present a legitimate threat to traditional models—if it maintains reliability and continues scaling its offerings[3][4].\n\n**Summary**\nPerplexity's Comet browser redefines competition in the AI search and browsing space by prioritizing intelligence, agentic workflows, and user-centric design over the prevailing ad-driven model. Its suite of features and rapidly growing user base set it apart from legacy offerings from Google, Microsoft, Apple, and Mozilla, positioning Perplexity as a leader in the evolving landscape of AI-powered digital information services[1][2][3][4][5]."\ },\ "delta": {\ "role": "assistant",\ "content": ""\ }\ }\ ] } See all 76 lines Cost Breakdown for Sample Request **Token Usage** * Prompt Tokens: 26 * Completion Tokens: 832 * Search Context Size: Low 1 Calculate Input Tokens Cost 26 tokens ÷ 1,000,000 × 3\=3 = 3\=0.000078 2 Calculate Output Tokens Cost 832 tokens ÷ 1,000,000 × 15\=15 = 15\=0.01248 3 Calculate Search Context Cost 1 request × 6÷1,000\=6 ÷ 1,000 = 6÷1,000\=0.006 4 Calculate Total Cost 0.000078+0.000078 + 0.000078+0.01248 + 0.006\=0.006 = 0.006\=0.018558 **Total cost for this request: $0.018558** ⌘I --- # Rate Limits and Usage Tiers - Perplexity [Skip to main content](https://docs.perplexity.ai/guides/usage-tiers#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Rate Limits and Usage Tiers Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) We follow the usage tier system below to set rate limits. You can check your usage tier by going to your [API settings page](https://www.perplexity.ai/settings/api) . [​](https://docs.perplexity.ai/guides/usage-tiers#usage-tiers) Usage Tiers ----------------------------------------------------------------------------- | Tier | Credit Purchase (all time) | | --- | --- | | `Tier 0` | \- | | `Tier 1` | $50 | | `Tier 2` | $250 | | `Tier 3` | $500 | | `Tier 4` | $1000 | | `Tier 5` | $5000 | The tiers are based on cumulative purchases on a given account [​](https://docs.perplexity.ai/guides/usage-tiers#rate-limits-and-features) Rate Limits and Features ------------------------------------------------------------------------------------------------------- * Tier 0 * Tier 1 * Tier 2 * Tier 3 * Tier 4 * Tier 5 | Model | Requests per minute (RPM) | Features | | --- | --- | --- | | `sonar-deep-research` | 5 | related questions, structured outputs | | `sonar-reasoning-pro` | 50 | images, related questions, search domain filter, structured outputs | | `sonar-pro` | 50 | images, related questions, search domain filter, structured outputs | | `sonar` | 50 | images, related questions, search domain filter, structured outputs | | POST `/async/chat/completions` | 5 | async chat completions | | GET `/async/chat/completions` | 3000 | async chat completions status | | GET `/async/chat/completions/{request_id}` | 6000 | async chat completion results | | Model | Requests per minute (RPM) | Features | | --- | --- | --- | | `sonar-deep-research` | 10 | related questions, structured outputs | | `sonar-reasoning-pro` | 50 | images, related questions, search domain filter, structured outputs | | `sonar-pro` | 50 | images, related questions, search domain filter, structured outputs | | `sonar` | 50 | images, related questions, search domain filter, structured outputs | | POST `/async/chat/completions` | 10 | async chat completions | | GET `/async/chat/completions` | 3000 | async chat completions status | | GET `/async/chat/completions/{request_id}` | 6000 | async chat completion results | | Model | Requests per minute (RPM) | Features | | --- | --- | --- | | `sonar-deep-research` | 20 | related questions, structured outputs | | `sonar-reasoning-pro` | 500 | images, related questions, search domain filter, structured outputs | | `sonar-pro` | 500 | images, related questions, search domain filter, structured outputs | | `sonar` | 500 | images, related questions, search domain filter, structured outputs | | POST `/async/chat/completions` | 20 | async chat completions | | GET `/async/chat/completions` | 3000 | async chat completions status | | GET `/async/chat/completions/{request_id}` | 6000 | async chat completion results | | Model | Requests per minute (RPM) | Features | | --- | --- | --- | | `sonar-deep-research` | 40 | related questions, structured outputs | | `sonar-reasoning-pro` | 1000 | images, related questions, search domain filter, structured outputs | | `sonar-pro` | 1000 | images, related questions, search domain filter, structured outputs | | `sonar` | 1000 | images, related questions, search domain filter, structured outputs | | POST `/async/chat/completions` | 40 | async chat completions | | GET `/async/chat/completions` | 3000 | async chat completions status | | GET `/async/chat/completions/{request_id}` | 6000 | async chat completion results | | Model | Requests per minute (RPM) | Features | | --- | --- | --- | | `sonar-deep-research` | 60 | related questions, structured outputs | | `sonar-reasoning-pro` | 2000 | images, related questions, search domain filter, structured outputs | | `sonar-pro` | 2000 | images, related questions, search domain filter, structured outputs | | `sonar` | 2000 | images, related questions, search domain filter, structured outputs | | POST `/async/chat/completions` | 60 | async chat completions | | GET `/async/chat/completions` | 3000 | async chat completions status | | GET `/async/chat/completions/{request_id}` | 6000 | async chat completion results | | Model | Requests per minute (RPM) | Features | | --- | --- | --- | | `sonar-deep-research` | 100 | related questions, structured outputs | | `sonar-reasoning-pro` | 2000 | images, related questions, search domain filter, structured outputs | | `sonar-pro` | 2000 | images, related questions, search domain filter, structured outputs | | `sonar` | 2000 | images, related questions, search domain filter, structured outputs | | POST `/async/chat/completions` | 100 | async chat completions | | GET `/async/chat/completions` | 3000 | async chat completions status | | GET `/async/chat/completions/{request_id}` | 6000 | async chat completion results | Rate Limit for`sonar-deep-research` increases as you move up usage tiers Was this page helpful? YesNo ⌘I --- # Sonar reasoning pro - Perplexity [Skip to main content](https://docs.perplexity.ai/getting-started/models/models/sonar-reasoning-pro#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [Models](https://docs.perplexity.ai/getting-started/models) Sonar Reasoning Pro =================== Advanced reasoning with enhanced multi-step analysis A high-performance reasoning model leveraging advanced multi-step Chain-of-Thought (CoT) reasoning and enhanced information retrieval for complex problem-solving. Using image input with structured response format is not supported in thinking models. Pricing ------- [See the full pricing and search context size guide.](https://docs.perplexity.ai/getting-started/pricing) ### Input Tokens $2 Per 1M Tokens ### Output Tokens $8 Per 1M Tokens ### Price Per 1K Requests $14$10$6 HighMediumLow Features -------- ![Arrow](https://mintlify-assets.b-cdn.net/perplexity/arrow.svg) ### Advanced reasoning model ![Search](https://mintlify-assets.b-cdn.net/perplexity/searchicon.svg) ### Enhanced Chain-of-Thought (CoT) reasoning ![Length](https://mintlify-assets.b-cdn.net/perplexity/lengthicon.svg) ### 128K context length ![Speed](https://mintlify-assets.b-cdn.net/perplexity/speedicon.svg) ### Best for complex multi-step reasoning tasks ![Citation](https://mintlify-assets.b-cdn.net/perplexity/citationicon.svg) ### 2x more search results than Sonar Reasoning ![Lock](https://mintlify-assets.b-cdn.net/perplexity/lockicon.svg) ### No training on customer data Real World Use Cases -------------------- ![Complex Analysis](https://mintlify-assets.b-cdn.net/perplexity/glasses.svg) ### Complex multi-step analysis and reasoning ![Research](https://mintlify-assets.b-cdn.net/perplexity/search.svg) ### Advanced research with deep reasoning ![Decision Making](https://mintlify-assets.b-cdn.net/perplexity/eye.svg) ### Strategic decision making with comprehensive analysis cURL python Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header "Authorization: Bearer " \ --header "Content-Type: application/json" \ --data '{ "model": "sonar-reasoning-pro", "messages": [\ {\ "role": "user",\ "content": "Analyze the feasibility of fusion energy becoming a mainstream power source by 2040."\ }\ ] }' | jq * The `sonar-reasoning-pro` model is designed to output a `` section containing reasoning tokens, immediately followed by a valid JSON object. As a result, the `response_format` parameter does not remove these reasoning tokens from the output. We recommend using a custom parser to extract the valid JSON portion, and an example implementation can be found [here](https://github.com/ppl-ai/api-discussion/blob/main/utils/extract_json_reasoning_models.py) . **Sample Response Metadata** Success Response Copy Ask AI { "id": "f9a5c42b-a53f-4c63-8e68-80d927221e7a", "model": "sonar-reasoning-pro", "created": 1756486858, "usage": { "prompt_tokens": 17, "completion_tokens": 1152, "total_tokens": 1169, "search_context_size": "low", "cost": { "input_tokens_cost": 0.0, "output_tokens_cost": 0.009, "request_cost": 0.006, "total_cost": 0.015 } }, "citations": [\ "https://pubs.aip.org/physicstoday/article/77/12/22/3321123/UK-coalition-gears-up-to-demonstrate-commercial",\ "https://energy.mit.edu/news/mit-study-shows-that-fusion-energy-could-play-a-major-role-in-the-global-response-to-climate-change/",\ "https://www.world-nuclear-news.org/Articles/US-could-operate-a-fusion-plant-by-2040-Academy-sa",\ "https://www.youtube.com/watch?v=qUkn8FarAcw",\ "https://world-nuclear.org/information-library/current-and-future-generation/nuclear-fusion-power"\ ], "search_results": [\ {\ "title": "UK coalition gears up to demonstrate commercial viability of ...",\ "url": "https://pubs.aip.org/physicstoday/article/77/12/22/3321123/UK-coalition-gears-up-to-demonstrate-commercial",\ "date": "2024-12-01",\ "last_updated": "2025-05-24",\ "snippet": "The UK plans to build a prototype fusion plant by the early 2040s that can put electricity on the grid and demonstrates that fusion energy is commercially ...See more"\ },\ {\ "title": "MIT study shows that fusion energy could play a major role ...",\ "url": "https://energy.mit.edu/news/mit-study-shows-that-fusion-energy-could-play-a-major-role-in-the-global-response-to-climate-change/",\ "date": "2024-10-16",\ "last_updated": "2024-10-18",\ "snippet": "Experts in energy systems modeling and fusion technology explore the future role of fusion at various costs and carbon constraints."\ },\ {\ "title": "US could operate a fusion plant by 2040, Academy says",\ "url": "https://www.world-nuclear-news.org/Articles/US-could-operate-a-fusion-plant-by-2040-Academy-sa",\ "date": "2021-03-12",\ "last_updated": "2024-12-22",\ "snippet": "It identifies key goals and innovations needed to support the development of a US fusion pilot plant, many of which it says should be developed ...See more"\ },\ {\ "title": "MIT Cracked Nuclear Fusion.. And it Might Have Just ...",\ "url": "https://www.youtube.com/watch?v=qUkn8FarAcw",\ "date": "2025-05-31",\ "last_updated": "2025-08-23",\ "snippet": "This single breakthrough from MIT may have just triggered the beginning of the end for the global oil industry."\ },\ {\ "title": "Nuclear Fusion Power",\ "url": "https://world-nuclear.org/information-library/current-and-future-generation/nuclear-fusion-power",\ "date": "2025-06-05",\ "last_updated": "2025-08-29",\ "snippet": "STEP is scheduled for completion in 2040. In February 2022 researchers at JET achieved 59 megajoules of heat energy from fusion over a five- ...See more"\ }\ ], "object": "chat.completion", "choices": [\ {\ "index": 0,\ "finish_reason": "stop",\ "message": {\ "role": "assistant",\ "content": "\nThe user is asking me to analyze the feasibility of fusion energy becoming a mainstream power source by 2040. Let me look at the search results to see what information is available about fusion energy timelines and viability.\n\nFrom the search results:\n\n1. UK STEP program plans to build a prototype fusion plant by early 2040s that can put electricity on the grid and demonstrate commercial viability. Goal is to produce about 100 MW of net electricity.\n\n2. MIT study shows fusion technologies may be a decade away from commercial deployment, with focus on determining what cost levels fusion plants must reach by 2050 to achieve strong market penetration.\n\n3. US could operate a fusion pilot plant by 2040 according to the National Academy. The report suggests the US is positioned to begin planning its first fusion pilot plant now to meet the challenge of operating between 2035 and 2040.\n\n4. YouTube video discussing MIT breakthrough and market projections of $80 billion by 2035 and $350 billion by 2050.\n\n5. World Nuclear Association mentions STEP scheduled for completion in 2040, and various tokamak projects including ITER operating in the 2020s and CFETR due for completion in 2030.\n\nSo I need to analyze the feasibility based on:\n- Technical challenges and progress\n- Timeline considerations \n- Economic factors\n- Current projects and milestones\n\nThe query is asking for analysis, so I should provide a comprehensive assessment covering different aspects. This seems like it would benefit from multiple sections since it's a complex topic.\n\nLet me structure this as:\n- Current state and recent progress\n- Technical challenges \n- Timeline analysis\n- Economic considerations\n- Conclusion on feasibility\n\nI need to be careful about the restrictions - no hedging language, no \"according to search results\" phrases, cite sources appropriately, use past tense for events that happened before the current date (August 29, 2025).\n\n\nThe prospect of fusion energy becoming a mainstream power source by 2040 represents one of the most ambitious technological challenges of our time, with significant progress being made but substantial hurdles remaining.\n\n## Current State and Recent Breakthroughs\n\nMultiple major projects are converging on the 2040 timeline with varying degrees of ambition. The UK's Spherical Tokamak for Energy Production (STEP) program aims to build a prototype fusion plant by the early 2040s that can deliver electricity to the grid and demonstrate commercial viability, targeting approximately 100 MW of net electricity output[1]. The United States has positioned itself to operate a fusion pilot plant between 2035 and 2040, with the National Academy concluding that requisite resources and planning can support this timeline[3].\n\nSeveral critical technological milestones have been achieved in recent years. The Joint European Torus (JET) achieved 59 megajoules of heat energy from fusion, while multiple tokamak facilities continue advancing the science[5]. The international ITER project, currently under construction in France, will become the largest tokamak when it operates in the 2020s, providing crucial data for commercial development[5].\n\n## Technical and Engineering Challenges\n\nThe technical demands for achieving mainstream fusion power by 2040 are **formidable**. Current fusion technologies face three primary engineering challenges: achieving sustained net energy output, maintaining adequate tritium supply for fuel, and demonstrating long-term operational maintenance capabilities[1]. Even successful projects like STEP acknowledge these goals as \"massively ambitious\" but \"just about doable\"[1].\n\nThe transition from experimental reactors to commercial power plants requires solving complex materials science problems, particularly regarding radiation-resistant components and magnetic confinement systems. The Chinese Fusion Engineering Test Reactor (CFETR), designed to be larger than ITER and scheduled for completion in 2030, represents a critical stepping stone toward commercial viability[5].\n\n## Economic Feasibility and Market Dynamics\n\nEconomic projections suggest the fusion market could reach $80 billion by 2035 and potentially exceed $350 billion by 2050[4]. However, research indicates that fusion technologies may still be a decade away from commercial deployment, with detailed costs of future commercial fusion power plants remaining uncertain[2].\n\nThe economic viability of fusion power will depend heavily on achieving competitive cost levels compared to other energy sources, including conventional fossil fuels, nuclear fission, renewable energy, and storage technologies[2]. Regulatory frameworks will play a crucial role as cost drivers, potentially creating significant barriers or enablers depending on policy approaches[2].\n\n## Timeline Reality Check\n\nWhile pilot plants and demonstration facilities may operate by 2040, achieving **mainstream** adoption requires distinguishing between proving technical feasibility and scaling to widespread commercial deployment. The evidence suggests 2040 will likely mark the beginning of commercial demonstration rather than mainstream adoption.\n\nResearch emphasizes that if cost and performance targets can be achieved, fusion energy can play a major role in meeting future electricity needs and achieving global net-zero carbon goals[2]. However, this transition will more likely occur in the latter half of the century rather than by 2040.\n\n## Assessment of 2040 Feasibility\n\nFusion energy becoming a mainstream power source by 2040 faces significant feasibility constraints. While multiple pilot plants and demonstration facilities will likely operate by this date, true mainstream adoption requires overcoming substantial technical, economic, and scaling challenges that extend beyond the 2040 timeline.\n\nThe convergence of major international projects, substantial investment flows, and recent technical breakthroughs creates a foundation for commercial fusion power. However, the transition from demonstration to mainstream deployment typically requires additional decades for technology maturation, cost reduction, and infrastructure development. The 2040s will more realistically represent the **beginning** of the commercial fusion era rather than its mainstream adoption."\ },\ "delta": {\ "role": "assistant",\ "content": ""\ }\ }\ ] } See all 76 lines Cost Breakdown for Sample Request **Token Usage** * Prompt Tokens: 17 * Completion Tokens: 1152 * Search Context Size: Low 1 Calculate Input Tokens Cost 17 tokens ÷ 1,000,000 × 2\=2 = 2\=0.000034 2 Calculate Output Tokens Cost 1152 tokens ÷ 1,000,000 × 8\=8 = 8\=0.009216 3 Calculate Search Context Cost 1 request × 6÷1,000\=6 ÷ 1,000 = 6÷1,000\=0.006 4 Calculate Total Cost 0.000034+0.000034 + 0.000034+0.009216 + 0.006\=0.006 = 0.006\=0.015250 **Total cost for this request: $0.015250** ⌘I --- # Perplexity API Cookbook - Perplexity [Skip to main content](https://docs.perplexity.ai/cookbook/index#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Cookbook Perplexity API Cookbook Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Cookbook * [Perplexity API Cookbook](https://docs.perplexity.ai/cookbook) * Community Showcase * Examples * Integration Guides On this page * [Quick Start](https://docs.perplexity.ai/cookbook/index#quick-start) * [What’s Inside](https://docs.perplexity.ai/cookbook/index#what%E2%80%99s-inside) * [Examples](https://docs.perplexity.ai/cookbook/index#examples) * [Showcase](https://docs.perplexity.ai/cookbook/index#showcase) * [Integration Guides](https://docs.perplexity.ai/cookbook/index#integration-guides) * [Contributing](https://docs.perplexity.ai/cookbook/index#contributing) * [Resources](https://docs.perplexity.ai/cookbook/index#resources) A collection of practical examples and guides for building with [**Perplexity’s API Platform**](https://docs.perplexity.ai/) - the fastest, most cost-effective AI answer engine with real-time search capabilities. [​](https://docs.perplexity.ai/cookbook/index#quick-start) Quick Start ------------------------------------------------------------------------- To get started with any project in this cookbook: 1. **Browse examples** - Find the use case that matches your needs 2. **Follow the guide** - Each example includes complete setup instructions 3. **Get the code** - Full implementations are available in our [GitHub repository](https://github.com/perplexityai/api-cookbook) 4. **Build and customize** - Use the examples as starting points for your projects [​](https://docs.perplexity.ai/cookbook/index#what%E2%80%99s-inside) What’s Inside ------------------------------------------------------------------------------------- ### [​](https://docs.perplexity.ai/cookbook/index#examples) [Examples](https://docs.perplexity.ai/cookbook/examples/README) Ready-to-run projects that demonstrate specific use cases and implementation patterns. ### [​](https://docs.perplexity.ai/cookbook/index#showcase) [Showcase](https://docs.perplexity.ai/cookbook/showcase/briefo) Community-built applications that demonstrate real-world implementations of the API Platform. ### [​](https://docs.perplexity.ai/cookbook/index#integration-guides) [Integration Guides](https://docs.perplexity.ai/cookbook/articles/memory-management/chat-summary-memory-buffer/README) In-depth tutorials for advanced implementations and integrations with other tools. > **Note**: All complete code examples, scripts, and project files can be found in our [GitHub repository](https://github.com/perplexityai/api-cookbook) > . The documentation here provides guides and explanations, while the repository contains the full runnable implementations. [​](https://docs.perplexity.ai/cookbook/index#contributing) Contributing --------------------------------------------------------------------------- Have a project built with API Platform? We’d love to feature it! Check our [Contributing Guidelines](https://github.com/perplexityai/api-cookbook/blob/main/CONTRIBUTING.md) to learn how to: * Submit example tutorials * Add your project to the showcase * Improve existing content [​](https://docs.perplexity.ai/cookbook/index#resources) Resources --------------------------------------------------------------------- * [API Documentation](https://docs.perplexity.ai/home) * [GitHub Repository](https://github.com/perplexityai/api-cookbook) * * * _Maintained by the Perplexity community_ Was this page helpful? YesNo [Briefo | Perplexity Powered News & Finance Social App\ \ Next](https://docs.perplexity.ai/cookbook/showcase/briefo) ⌘I --- # Sonar deep research - Perplexity [Skip to main content](https://docs.perplexity.ai/getting-started/models/models/sonar-deep-research#content-area) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [Models](https://docs.perplexity.ai/getting-started/models) Sonar Deep Research =================== Exhaustive research with expert-level insights A powerful research model capable of conducting exhaustive searches across hundreds of sources, synthesizing expert-level insights, and generating detailed reports with comprehensive analysis. Pricing ------- [See the full pricing and search context size guide.](https://docs.perplexity.ai/getting-started/pricing) ### Input Tokens $2 Per 1M Tokens ### Output Tokens $8 Per 1M Tokens ### Citation Tokens $2 Per 1M Tokens ### Search Queries $5 Per 1K Requests ### Reasoning Tokens $3 Per 1M Tokens Features -------- ![Arrow](https://mintlify-assets.b-cdn.net/perplexity/arrow.svg) ### Deep research / Reasoning model ![Search](https://mintlify-assets.b-cdn.net/perplexity/searchicon.svg) ### Exhaustive research across hundreds of sources ![Length](https://mintlify-assets.b-cdn.net/perplexity/lengthicon.svg) ### 128K context length ![Speed](https://mintlify-assets.b-cdn.net/perplexity/speedicon.svg) ### Expert-level subject analysis ![Citation](https://mintlify-assets.b-cdn.net/perplexity/citationicon.svg) ### Detailed report generation ![Lock](https://mintlify-assets.b-cdn.net/perplexity/lockicon.svg) ### No training on customer data Real World Use Cases -------------------- ![Academic Research](https://mintlify-assets.b-cdn.net/perplexity/glasses.svg) ### Academic research and comprehensive reports ![Market Analysis](https://mintlify-assets.b-cdn.net/perplexity/search.svg) ### Market analysis and competitive intelligence ![Due Diligence](https://mintlify-assets.b-cdn.net/perplexity/eye.svg) ### Due diligence and investigative research cURL python Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header "Authorization: Bearer " \ --header "Content-Type: application/json" \ --data '{ "model": "sonar-deep-research", "messages": [\ {\ "role": "user",\ "content": "Conduct a comprehensive analysis of the quantum computing industry, including technological approaches, key players, market opportunities, regulatory challenges, and commercial viability projections through 2035."\ }\ ] }' | jq **Sample Response Metadata** Success Response Copy Ask AI { "id": "11d634c8-cf22-4154-9f09-d8f501ae29b5", "model": "sonar-deep-research", "created": 1756488074, "usage": { "prompt_tokens": 33, "completion_tokens": 11395, "total_tokens": 11428, "citation_tokens": 19028, "num_search_queries": 21, "reasoning_tokens": 193947, "cost": { "input_tokens_cost": 0.0, "output_tokens_cost": 0.091, "citation_tokens_cost": 0.038, "reasoning_tokens_cost": 0.582, "search_queries_cost": 0.105, "total_cost": 0.816 } }, "citations": [\ "https://www.moodys.com/web/en/us/insights/quantum/quantum-computings-six-most-important-trends-for-2025.html",\ "https://briandcolwell.com/2025-quantum-computing-industry-report-and-market-analysis-the-race-to-170b-by-2040/",\ "https://www.quandela.com/resources/blog/exploring-types-of-quantum-computers-which-technology-leads/",\ "https://www.marketsandmarkets.com/Market-Reports/quantum-computing-market-144888301.html",\ "https://thequantuminsider.com/2025/05/16/quantum-computing-roadmaps-a-look-at-the-maps-and-predictions-of-major-quantum-players/",\ "https://technologymagazine.com/top10/top-10-quantum-computing-companies",\ "https://www.spinquanta.com/news-detail/quantum-computing-companies",\ "https://thequantuminsider.com/2025/05/27/q1-2025-quantum-technology-investment-whats-driving-the-surge-in-quantum-investment/",\ "https://thequantuminsider.com/2024/09/13/the-quantum-insider-projects-1-trillion-in-economic-impact-from-quantum-computing-by-2035/",\ "https://scholarship.law.edu/cgi/viewcontent.cgi?article=1143&context=jlt",\ "https://www.pwc.com/us/en/services/consulting/cybersecurity-risk-regulatory/library/quantum-computing-cybersecurity-risk.html",\ "https://thequantuminsider.com/2024/12/04/senators-quantum-leaders-back-2-7-billion-national-quantum-initiative-reauthorization-act/",\ "https://itif.org/publications/2023/10/10/the-us-approach-to-quantum-policy/",\ "https://docs.paloaltonetworks.com/network-security/quantum-security/administration/quantum-security-concepts/the-quantum-computing-threat",\ "https://www.marketsandmarkets.com/Market-Reports/quantum-computing-in-healthcare-market-41524710.html",\ "https://milvus.io/ai-quick-reference/what-are-the-limitations-of-current-quantum-computing-hardware",\ "https://www.deloitte.com/us/en/insights/topics/emerging-technologies/quantum-computing-futures.html",\ "https://thequantuminsider.com/2025/03/26/national-quantum-computing-centres-paper-explores-quantum-computings-transformative-potential-in-healthcare-and-pharmaceuticals/",\ "https://quantumzeitgeist.com/quantum-business/",\ "https://www.renaissancecapital.com/IPO-Center/Sub-Industry/Quantum-Computing-IPOs",\ "https://thediplomat.com/2025/03/quantum-a-new-frontier-of-china-us-competition/",\ "https://www.aps.org/apsnews/2024/10/export-quantum-computer",\ "https://postquantum.com/quantum-computing/quantum-workforce-talent/",\ "https://thequantuminsider.com/2025/06/27/quantinuum-crosses-key-quantum-error-correction-threshold-marks-turn-from-nisq-to-utility-scale/",\ "https://postquantum.com/predicting-q-day/ibm-quantum-roadmap/",\ "https://semnexus.com/quantum-computing-in-2025-how-its-reshaping-technology-and-business/",\ "https://www.ibm.com/quantum/blog/large-scale-ftqc",\ "https://datafloq.com/read/5-real-world-applications-of-quantum-computing-in-2025/"\ ], "search_results": [\ {\ "title": "Quantum computing's six most important trends for 2025 - Moody's",\ "url": "https://www.moodys.com/web/en/us/insights/quantum/quantum-computings-six-most-important-trends-for-2025.html",\ "date": null,\ "last_updated": null,\ "snippet": "More experiments with logical qubits · More specialized hardware/software (as opposed to universal QC) · More networking NISQ devices together."\ },\ {\ "title": "2025 Quantum Computing Industry Report And Market Analysis",\ "url": "https://briandcolwell.com/2025-quantum-computing-industry-report-and-market-analysis-the-race-to-170b-by-2040/",\ "date": null,\ "last_updated": null,\ "snippet": "McKinsey projects the total quantum technology market could reach $198 billion by 2040, encompassing quantum computing ($28-72B by 2035), ..."\ },\ {\ "title": "Exploring Types of Quantum Computers: Which Technology Leads?",\ "url": "https://www.quandela.com/resources/blog/exploring-types-of-quantum-computers-which-technology-leads/",\ "date": null,\ "last_updated": null,\ "snippet": "This piece takes a closer look at the major types of quantum computers to help you learn how they work and compare their revolutionary potential."\ },\ {\ "title": "Quantum Computing Market Size, Share & Growth Report, 2025",\ "url": "https://www.marketsandmarkets.com/Market-Reports/quantum-computing-market-144888301.html",\ "date": null,\ "last_updated": null,\ "snippet": "The global Quantum Computing Market size in terms of revenue was estimated to be worth $1.3 billion in 2024 and is poised to reach $5.3 billion by 2029, ..."\ },\ {\ "title": "Quantum Computing Roadmaps & Predictions of Leading Players",\ "url": "https://thequantuminsider.com/2025/05/16/quantum-computing-roadmaps-a-look-at-the-maps-and-predictions-of-major-quantum-players/",\ "date": null,\ "last_updated": null,\ "snippet": "The roadmaps of major quantum computing companies reflect a dynamic field, with timelines from 2025 to 2030 for significant milestones."\ },\ {\ "title": "Top 10: Quantum Computing Companies",\ "url": "https://technologymagazine.com/top10/top-10-quantum-computing-companies",\ "date": null,\ "last_updated": null,\ "snippet": "IBM's quantum computing efforts are centred around its superconducting transmon qubit technology. Its latest processor, Condor, boasts 1,121 ..."\ },\ {\ "title": "23 Leading Quantum Computing Companies Worldwide ...",\ "url": "https://www.spinquanta.com/news-detail/quantum-computing-companies",\ "date": null,\ "last_updated": null,\ "snippet": "By 2025, IBM plans to unveil its first quantum-centric supercomputer, integrating modular processors, middleware, and quantum communication."\ },\ {\ "title": "Q1 2025 Quantum Investment: What's Driving the Surge?",\ "url": "https://thequantuminsider.com/2025/05/27/q1-2025-quantum-technology-investment-whats-driving-the-surge-in-quantum-investment/",\ "date": null,\ "last_updated": null,\ "snippet": "Investment in quantum computer companies rose from $550 million in Q1 2024 to more than $1.25 billion in Q1 2025, a 128% increase. Adjusted ..."\ },\ {\ "title": "The Quantum Insider Projects $1 Trillion in Economic ...",\ "url": "https://thequantuminsider.com/2024/09/13/the-quantum-insider-projects-1-trillion-in-economic-impact-from-quantum-computing-by-2035/",\ "date": null,\ "last_updated": null,\ "snippet": "The global quantum computing market could add a total of more than $1 trillion to the global economy between 2025 and 2035, according to a new analysis from ..."\ },\ {\ "title": "[PDF] Establishing the Legal Framework to Regulate Quantum Computing ...",\ "url": "https://scholarship.law.edu/cgi/viewcontent.cgi?article=1143&context=jlt",\ "date": null,\ "last_updated": null,\ "snippet": "Legislation is vital to establish a policy framework for quantum computing technology, but policy questions must be answered prior to the ..."\ },\ {\ "title": "Quantum computing cybersecurity risk: PwC",\ "url": "https://www.pwc.com/us/en/services/consulting/cybersecurity-risk-regulatory/library/quantum-computing-cybersecurity-risk.html",\ "date": null,\ "last_updated": null,\ "snippet": "The major risk posed by quantum computing capabilities is sensitive data being lost or compromised. This has wide-reaching impacts across industries."\ },\ {\ "title": "Senators, Quantum Leaders Back $2.7 Billion National Quantum ...",\ "url": "https://thequantuminsider.com/2024/12/04/senators-quantum-leaders-back-2-7-billion-national-quantum-initiative-reauthorization-act/",\ "date": null,\ "last_updated": null,\ "snippet": "U.S. Senators introduced the National Quantum Initiative Reauthorization Act, authorizing $2.7 billion over five years."\ },\ {\ "title": "The U.S. Approach to Quantum Policy | ITIF",\ "url": "https://itif.org/publications/2023/10/10/the-us-approach-to-quantum-policy/",\ "date": null,\ "last_updated": null,\ "snippet": "On the legislative side, the most significant piece of legislation related to quantum to date has been the National Quantum Initiative Act (NQIA) ..."\ },\ {\ "title": "The Quantum Computing Threat - Palo Alto Networks",\ "url": "https://docs.paloaltonetworks.com/network-security/quantum-security/administration/quantum-security-concepts/the-quantum-computing-threat",\ "date": null,\ "last_updated": null,\ "snippet": "The most immediate danger is Harvest Now, Decrypt Later attacks, where attackers steal data (at rest or in transit) that they can't decrypt now and store it ..."\ },\ {\ "title": "Quantum Computing in Healthcare Market Growth, Drivers, and ...",\ "url": "https://www.marketsandmarkets.com/Market-Reports/quantum-computing-in-healthcare-market-41524710.html",\ "date": null,\ "last_updated": null,\ "snippet": "Global quantum computing in healthcare market valued at $191.3M in 2024, reached $265.9M in 2025, and is projected to grow at a robust 37.9% CAGR, ..."\ },\ {\ "title": "What are the limitations of current quantum computing ...",\ "url": "https://milvus.io/ai-quick-reference/what-are-the-limitations-of-current-quantum-computing-hardware",\ "date": null,\ "last_updated": null,\ "snippet": "Current quantum computing hardware faces three primary limitations: qubit instability, scalability challenges, and the need for highly specialized environments."\ },\ {\ "title": "Quantum computing futures | Deloitte Insights",\ "url": "https://www.deloitte.com/us/en/insights/topics/emerging-technologies/quantum-computing-futures.html",\ "date": null,\ "last_updated": null,\ "snippet": "A few businesses that focused on quantum computing experiments before 2025 in fields like life sciences, banking, tech, and energy are expected ..."\ },\ {\ "title": "National Quantum Computing Centre's Paper Explores Quantum ...",\ "url": "https://thequantuminsider.com/2025/03/26/national-quantum-computing-centres-paper-explores-quantum-computings-transformative-potential-in-healthcare-and-pharmaceuticals/",\ "date": null,\ "last_updated": null,\ "snippet": "It identifies near-term opportunities and long-term challenges associated with the adoption of quantum computing in healthcare and ..."\ },\ {\ "title": "Quantum Business Case: Potential And Challenges",\ "url": "https://quantumzeitgeist.com/quantum-business/",\ "date": null,\ "last_updated": null,\ "snippet": "However, the lack of skilled professionals and the high cost of implementation are some of the major challenges faced by the market. According ..."\ },\ {\ "title": "Quantum Computing IPOs - Renaissance Capital",\ "url": "https://www.renaissancecapital.com/IPO-Center/Sub-Industry/Quantum-Computing-IPOs",\ "date": null,\ "last_updated": null,\ "snippet": "Recent quantum computing listings have offered early access to companies that aim to lead the next wave of computing. Though many are still in pre-revenue or ..."\ },\ {\ "title": "Quantum: A New Frontier of China-US Competition - The Diplomat",\ "url": "https://thediplomat.com/2025/03/quantum-a-new-frontier-of-china-us-competition/",\ "date": null,\ "last_updated": null,\ "snippet": "The U.S. and China find themselves headed for another high-stakes technology competition rooted in fears of being left behind and paranoia."\ },\ {\ "title": "US Puts Export Controls on Quantum Computers",\ "url": "https://www.aps.org/apsnews/2024/10/export-quantum-computer",\ "date": null,\ "last_updated": null,\ "snippet": "The controls cover key equipment, materials, and software used in quantum computers, as well as some complete computers."\ },\ {\ "title": "Building the Quantum Workforce: Talent Challenges and ...",\ "url": "https://postquantum.com/quantum-computing/quantum-workforce-talent/",\ "date": null,\ "last_updated": null,\ "snippet": "Quantum computing companies are investing in education and training to avoid a talent shortage and fuel the industry's growth."\ },\ {\ "title": "Quantinuum Crosses Key Quantum Error Correction Threshold ...",\ "url": "https://thequantuminsider.com/2025/06/27/quantinuum-crosses-key-quantum-error-correction-threshold-marks-turn-from-nisq-to-utility-scale/",\ "date": null,\ "last_updated": null,\ "snippet": "Quantinuum reports it has achieved the first universal, fully fault-tolerant quantum gate set with repeatable error correction."\ },\ {\ "title": "IBM's Roadmap to Large-Scale Fault-Tolerant Quantum Computing ...",\ "url": "https://postquantum.com/predicting-q-day/ibm-quantum-roadmap/",\ "date": null,\ "last_updated": null,\ "snippet": "In June 2025, IBM outlined a clear plan to build the world's first large-scale fault-tolerant quantum computer by 2029."\ },\ {\ "title": "Quantum Computing in 2025: How It's Reshaping ...",\ "url": "https://semnexus.com/quantum-computing-in-2025-how-its-reshaping-technology-and-business/",\ "date": null,\ "last_updated": null,\ "snippet": "Real-World Applications of Quantum Computing · 1. Healthcare & Drug Discovery. Pharmaceutical companies are investing heavily in quantum drug ..."\ },\ {\ "title": "IBM lays out clear path to fault-tolerant quantum computing",\ "url": "https://www.ibm.com/quantum/blog/large-scale-ftqc",\ "date": null,\ "last_updated": null,\ "snippet": "IBM lays out a clear, rigorous, comprehensive framework for realizing a large-scale, fault-tolerant quantum computer by 2029."\ },\ {\ "title": "5 Real-World Applications of Quantum Computing in 2025",\ "url": "https://datafloq.com/read/5-real-world-applications-of-quantum-computing-in-2025/",\ "date": null,\ "last_updated": null,\ "snippet": "5 Real-World Applications of Quantum Computing in 2025 · 1. Investment Portfolio Management · 2. Pharmaceutical Research · 3. Supply Chain ..."\ }\ ], "object": "chat.completion", "choices": [\ {\ "index": 0,\ "finish_reason": "stop",\ "message": {\ "role": "assistant",\ "content": "\nThis is a comprehensive query about the quantum computing industry that requires me to analyze multiple dimensions:\n\n1. Technological approaches (different types of quantum computing)\n2. Key players (companies, organizations)\n3. Market opportunities (size, growth, applications)\n4. Regulatory challenges (policy, export controls, standards)\n5. Commercial viability projections through 2035\n\nI need to structure this as a long-form report (10,000+ words) covering all these aspects. Let me plan the structure:\n\n1. Title and summary\n2. Current State of Quantum Computing Technologies \n3. Market Size and Growth Projections\n4. Key Players and Competitive Landscape\n5. Commercial Applications and Use Cases\n6. Investment Trends and Funding Landscape\n7. Regulatory Framework and Policy Challenges\n8. Technical Challenges and Limitations\n9. Future Outlook and Commercial Viability to 2035\n10. Conclusion\n\nI'll need to cite the sources throughout and ensure I'm providing comprehensive coverage of each topic. The sources provide great information on market size, company roadmaps, investment trends, regulatory issues, and technical challenges.\n\nLet me start writing the comprehensive report.\n\n\n# The Quantum Computing Revolution: A Comprehensive Industry Analysis Through 2035\n\nThe quantum computing industry stands at a pivotal inflection point in 2025, transitioning from experimental research to practical commercial applications across multiple sectors. This comprehensive analysis reveals that the global quantum computing market is experiencing unprecedented growth, with projections indicating expansion from approximately $1.3 billion in 2024 to between $90-170 billion by 2040, representing a phenomenal compound annual growth rate of 36-48%[2]. The industry's trajectory suggests that quantum computing has moved beyond theoretical possibilities to become a critical technology for solving complex computational problems that classical computers cannot address efficiently. Major technological breakthroughs, including Google's Willow chip achieving quantum error correction milestones and IBM's roadmap to fault-tolerant systems by 2029, signal that the technology is rapidly approaching commercial viability[2][27]. However, significant challenges remain, including qubit stability, scalability limitations, workforce shortages, and evolving regulatory frameworks that will shape the industry's development through 2035.\n\n## Current State of Quantum Computing Technologies\n\nThe quantum computing landscape in 2025 is characterized by multiple competing technological approaches, each offering distinct advantages and facing unique challenges in the race toward practical quantum advantage. The field has evolved beyond proof-of-concept demonstrations to encompass several mature hardware platforms that are beginning to demonstrate real-world utility across various applications.\n\nSuperconducting quantum computers represent the most advanced and commercially deployed quantum computing platform currently available. These systems utilize macroscopic circuits functioning as artificial atoms, operating at extremely low temperatures near absolute zero to maintain quantum coherence[3]. Companies like IBM have pioneered this approach with their superconducting transmon qubit technology, culminating in processors like the Condor system with 1,121 qubits[6]. The primary advantage of superconducting systems lies in their fast gate operation times and compatibility with existing semiconductor manufacturing processes, making them attractive candidates for scalable quantum computing architectures. However, these systems struggle with quantum coherence times that typically do not exceed 300 microseconds, limiting the complexity of quantum algorithms that can be executed before decoherence destroys the quantum information[3].\n\nGoogle's quantum computing efforts have focused heavily on superconducting technology, with their recent Willow chip representing a significant breakthrough in quantum error correction. This 105-qubit processor can perform computations in under five minutes that would require classical supercomputers an unfathomable 10 septillion years to complete[7]. More importantly, Google's Willow chip demonstrates exponential error reduction as more qubits are added to the system, addressing one of the fundamental challenges in scaling quantum computers. This achievement validates the potential for superconducting systems to achieve fault-tolerant quantum computing, a milestone critical for commercial applications requiring high reliability and accuracy.\n\nTrapped ion quantum computers offer a fundamentally different approach to quantum information processing, utilizing individual confined ions as qubits controlled through precise laser manipulation. These systems demonstrate significantly longer coherence times compared to superconducting approaches, with optical qubits maintaining quantum states for 0.2 seconds and hyperfine qubits achieving remarkable coherence times of up to 600 seconds[3]. The extended coherence times enable more complex quantum algorithms and higher-fidelity quantum operations. IonQ has emerged as a leading developer of trapped ion systems, raising $360 million in Q1 2025 to advance their commercial deployment efforts[8]. The company's approach focuses on achieving high measurement accuracy exceeding 99.9% readout fidelity within microseconds, while providing complete connectivity between all qubits in the system.\n\nPhotonic quantum computing has gained significant momentum as a room-temperature quantum computing platform that leverages light particles as qubits. This approach offers unique advantages for quantum networking applications due to photons' natural resistance to decoherence and ability to maintain quantum states over long distances[3]. Photonic systems can handle both discrete-variable and continuous-variable quantum computing approaches, providing versatility for different computational tasks. The room-temperature operation eliminates the need for expensive cryogenic cooling systems required by superconducting and trapped ion approaches, potentially reducing operational costs and complexity for commercial deployments.\n\nEmerging quantum technologies are expanding the field beyond these established platforms. Neutral atom quantum computers represent an exciting development that uses individual atoms as naturally identical qubits without manufacturing defects[3]. QuEra Computing's Aquila system leads this space with 256 atoms, making it the largest publicly available quantum computer by qubit count. The neutral atom approach offers room-temperature operation capability, all-to-all connectivity between qubits, and potential for scaling to thousands of atoms through precise optical tweezer control. QuEra's $230 million funding round in Q1 2025 reflects investor confidence in this alternative architecture[8].\n\nSilicon spin qubit technology leverages existing semiconductor fabrication infrastructure to create extremely compact qubits measuring approximately 50 nanometers by 50 nanometers, making them one million times smaller than other qubit types[3]. Intel's Tunnel Falls chip demonstrates the potential of this approach with a 95% yield rate across the wafer, suggesting manufacturability advantages that could enable large-scale production. The compatibility with semiconductor manufacturing processes positions silicon spin qubits as potentially the most cost-effective path to scaling quantum computers to thousands or millions of qubits.\n\nThe industry trend toward hybrid quantum-classical computing systems represents a pragmatic approach to near-term quantum applications. These systems combine quantum processing units with traditional CPUs, GPUs, and specialized processors to create quantum-enhanced workflows for practical applications[3]. This hybrid approach acknowledges that quantum computers will likely complement rather than replace classical computing for most applications, particularly in optimization, machine learning, and quantum chemistry where quantum processors can provide computational advantages for specific problem components while classical systems handle other aspects of the computation.\n\nMicrosoft's quantum computing strategy focuses on topological qubits, which theoretically offer superior error resistance compared to other qubit types. The company's Majorana 1 processor, announced in February 2025, is designed to scale to one million qubits through hardware-protected quantum states[5]. However, Microsoft's approach has faced skepticism from quantum experts who question whether the Majorana zero modes necessary for topological quantum computing have been definitively demonstrated[21]. Despite these challenges, Microsoft's partnerships with companies like Atom Computing and Quantinuum provide alternative pathways to quantum computing capabilities while the company continues developing its topological approach.\n\n## Market Size and Growth Projections\n\nThe quantum computing market is experiencing explosive growth that far exceeds typical technology sector expansion rates, with projections indicating a transformation from a nascent industry to a major economic force by 2035. Current market valuations place the global quantum computing market at $1.3 billion in 2024, with expectations of reaching $1.8 billion in 2025 and approximately $5.4 billion by 2029, representing a compound annual growth rate of 32.7% during the forecast period[4]. These growth projections reflect the industry's rapid maturation from research-focused initiatives to commercially viable applications across multiple sectors.\n\nThe long-term market projections present an even more dramatic growth trajectory, with McKinsey projecting that quantum computing could be worth $28-72 billion by 2035, quantum communication reaching $11-15 billion, and quantum sensing achieving $7-10 billion in market value[2]. The total quantum technology market could reach $198 billion by 2040, representing a comprehensive ecosystem that extends far beyond computing to encompass communication, sensing, and other quantum-enabled applications. The most optimistic projections suggest that quantum computing alone could reach $90-170 billion in market value by 2040, indicating the potential for this technology to become a major driver of global economic activity[2].\n\nThe phenomenal growth rates projected for quantum computing reflect several converging factors that are accelerating market development. Investment in quantum computer companies surged from $550 million in Q1 2024 to more than $1.25 billion in Q1 2025, representing a 128% increase year-over-year[8]. This dramatic increase in funding demonstrates growing investor confidence that quantum computing is approaching commercial viability rather than remaining confined to experimental research. The shift from research-focused investment to commercially oriented funding reflects industry maturation and expectations of near-term revenue generation from quantum technologies.\n\nQuantum Computing as a Service (QCaaS) represents the fastest-growing segment of the quantum computing market, with projections indicating it could account for over 40% of the quantum computing market by 2030[9]. This service-oriented approach enables organizations to access quantum computing capabilities without the substantial capital investments required for quantum hardware infrastructure. Major cloud providers including AWS, Google Cloud, and Azure are expanding their quantum services offerings, making quantum computing accessible to a broader range of organizations and use cases. The QCaaS model also accelerates adoption by reducing barriers to entry and enabling companies to experiment with quantum applications before committing to larger investments.\n\nThe geographic distribution of quantum market value creation reveals significant concentrations in countries with substantial public and private quantum investments. The United States, United Kingdom, Germany, France, China, and Japan are positioned to capture much of the value created by quantum computing through 2035[9]. These countries have made substantial public investments in quantum research and development while fostering private sector innovation through favorable regulatory environments and strategic partnerships between government, academia, and industry.\n\nHealthcare applications of quantum computing represent a particularly high-growth market segment, with the global quantum computing in healthcare market valued at $191.3 million in 2024 and projected to reach $1.324 billion by 2030, representing a compound annual growth rate of 37.9%[15]. The pharmaceutical and biotechnology sectors are expected to be primary adopters of quantum computing technologies, driven by the technology's potential to accelerate drug discovery, molecular modeling, and clinical trial optimization. Quantum computing's ability to simulate biological systems at the molecular level provides capabilities that classical computing cannot match, particularly for complex protein folding problems and drug interaction modeling.\n\nThe enterprise quantum computing market is witnessing rapid expansion as businesses across various industries recognize quantum computing's transformative potential. Companies are particularly focused on leveraging quantum computing for optimization, simulation, data analysis, and cryptography applications[4]. The increasing availability of quantum-as-a-service platforms has democratized access to quantum computing capabilities, enabling small and medium-sized enterprises to explore quantum applications without significant infrastructure investments. This democratization effect is accelerating market growth by expanding the potential customer base beyond large corporations and research institutions.\n\nInvestment patterns within the quantum computing ecosystem reveal strategic priorities and market expectations. Quantum computer companies received more than 70% of all quantum-related funding in Q1 2025, with major funding rounds going to IonQ ($360 million), QuEra Computing ($230 million), Quantum Machines ($170 million), and D-Wave Systems ($150 million)[8]. These substantial investment rounds reflect investor confidence in scalable quantum architectures and enterprise deployment capabilities rather than early-stage research initiatives.\n\nThe economic impact projections for quantum computing extend beyond direct market revenues to encompass broader value creation across industries. The Quantum Insider projects that quantum computing will unlock a cumulative $1 trillion of value creation for end users through 2035, while generating approximately $50 billion in direct vendor revenues during the same period[9]. This 20-to-1 ratio of value creation to vendor revenues reflects quantum computing's role as an enabling technology that can drive efficiency improvements, cost reductions, and new capabilities across multiple industries rather than simply generating direct hardware and software sales.\n\nEmployment projections for the quantum sector indicate substantial job creation potential, with estimates suggesting the quantum sector will generate approximately 250,000 new jobs by 2030, expanding to 840,000 jobs by 2035[9]. These employment opportunities span a range of industries and skill levels, from specialized quantum algorithm developers and hardware engineers to business analysts and project managers working on quantum-enabled applications. The broad employment impact reflects quantum computing's potential to create new industries and transform existing ones rather than simply replacing current technologies.\n\n## Key Players and Competitive Landscape\n\nThe quantum computing industry features a diverse ecosystem of established technology giants, specialized quantum companies, and emerging startups, each pursuing different technological approaches and market strategies. The competitive landscape reflects the industry's early stage, where multiple technological paradigms compete for market leadership and no single approach has achieved clear dominance.\n\nIBM maintains its position as the quantum computing industry leader through a comprehensive approach that encompasses both hardware development and software ecosystem creation. The company's quantum computing efforts center around superconducting transmon qubit technology, with their latest Condor processor featuring 1,121 qubits representing a significant milestone in quantum computing scale[6]. IBM's competitive advantage extends beyond raw qubit count to include their extensive software ecosystem, including the Qiskit quantum programming framework and quantum serverless computing platforms that make quantum computing more accessible to developers and researchers. The company's quantum roadmap extends to 2033 with ambitious plans for a 100,000-qubit system and the development of error-corrected logical qubits. IBM's June 2025 announcement of their plan to build the world's first large-scale fault-tolerant quantum computer by 2029, codenamed \"Quantum Starling,\" represents a bold commitment to achieving practical quantum advantage[25].\n\nGoogle's Quantum AI initiative represents one of the most technically advanced quantum computing programs, building on their 2019 demonstration of quantum supremacy with the Sycamore processor. The company's recent Willow chip achievement, demonstrating quantum error correction with 105 superconducting qubits, marks a crucial milestone in the path toward fault-tolerant quantum computing[7]. Google's approach combines cutting-edge hardware development with advanced quantum algorithms, particularly focusing on machine learning and artificial intelligence applications. The company's roadmap targets a practical, error-corrected quantum computer by 2029, with CEO Sundar Pichai emphasizing quantum computing's potential role in addressing global challenges including climate change and drug discovery. Google's quantum supremacy demonstration and subsequent error correction achievements have established the company as a technology leader, though questions remain about the practical applicability of their quantum advantage demonstrations.\n\nMicrosoft pursues a distinctive strategy focused on topological quantum computing, which theoretically offers superior error resistance compared to other quantum computing approaches. The company's Majorana 1 processor, introduced in February 2025, is designed to scale to one million qubits through hardware-protected quantum states[5]. Microsoft's quantum strategy also emphasizes software and cloud services integration, with their quantum development kit and Azure Quantum cloud platform providing comprehensive quantum computing tools. The company's partnerships with quantum hardware providers including Atom Computing and Quantinuum enable customers to access various quantum computing technologies through Microsoft's cloud infrastructure. However, Microsoft's topological approach has faced technical challenges and skepticism from quantum experts regarding the demonstration of Majorana zero modes necessary for topological quantum computing[21].\n\nIonQ has emerged as the leading pure-play quantum computing company, focusing exclusively on trapped ion quantum computing technology. The company's $360 million funding round in Q1 2025 represents the largest quantum computing investment during that period, reflecting strong investor confidence in their commercial prospects[8]. IonQ's trapped ion approach offers advantages in qubit quality and coherence times, with the company emphasizing their systems' ability to achieve high-fidelity quantum operations and all-to-all qubit connectivity. The company's strategy focuses on enterprise deployment through cloud platforms and direct customer engagements, targeting applications in finance, healthcare, and optimization. IonQ's public listing and substantial funding provide resources for scaling their technology and competing with larger technology companies in the quantum computing market.\n\nRigetti Computing represents another significant pure-play quantum computing company, focusing on superconducting quantum processors and hybrid quantum-classical computing systems. The company's roadmap plans a 36-qubit system by mid-2025 and over 100 qubits by year-end, with long-term goals of a 336-qubit Lyra system[5]. Rigetti's Ankaa-3 system achieved 84 qubits with 99%+ two-qubit gate fidelity by 2024, demonstrating competitive performance in the superconducting quantum computing space. The company's modular architecture approach aims to enable practical applications in machine learning and optimization, while their quantum cloud services platform provides access to quantum computing capabilities for enterprise customers.\n\nD-Wave Systems occupies a unique position in the quantum computing landscape through their focus on quantum annealing technology rather than gate-based quantum computing. The company's quantum annealing approach targets optimization problems where classical computers face computational limitations[8]. D-Wave's $150 million funding round in Q1 2025 reflects continued investor interest in their specialized approach to quantum computing, particularly for hybrid quantum-classical optimization applications. While quantum annealing has limitations compared to universal quantum computing approaches, D-Wave's technology offers near-term practical applications for specific problem types, providing a bridge between classical and quantum computing capabilities.\n\nQuEra Computing has gained significant attention for their neutral atom quantum computing approach, raising $230 million in Q1 2025 to advance their technology development[8]. The company's Aquila system represents the largest publicly available quantum computer with 256 atoms, demonstrating the scalability potential of neutral atom architectures. QuEra's technology offers advantages in qubit uniformity and scalability, with the potential to create quantum systems with thousands of atoms. The substantial investment in QuEra reflects growing investor confidence in alternative quantum computing approaches beyond the dominant superconducting and trapped ion platforms.\n\nQuantinuum has achieved significant technical milestones in quantum error correction, reporting the first universal, fully fault-tolerant quantum gate set with repeatable error correction[24]. The company's achievements in magic state distillation and fault-tolerant quantum operations represent crucial steps toward practical fault-tolerant quantum computing. Quantinuum's technical accomplishments have positioned the company as a leader in quantum error correction research, with their results validating key techniques required for scalable fault-tolerant quantum computers.\n\nAlice & Bob represents emerging European quantum computing capabilities, with the French company raising €100 million to advance their fault-tolerant cat qubit technology[8]. The company's approach to superconducting quantum computing focuses on error correction and fault tolerance, addressing fundamental challenges in scaling quantum computers to practical applications. European investment in quantum computing companies like Alice & Bob reflects the global nature of quantum computing competition and the importance of regional quantum technology capabilities.\n\nQuantum Machines has secured $170 million in funding to develop quantum orchestration hardware and software, addressing the critical need for control systems that can operate across various quantum computing architectures[8]. The company's focus on quantum control and orchestration represents an important ecosystem component that enables compatibility between different quantum hardware platforms and classical computing systems. Their substantial funding reflects the importance of control systems in realizing practical quantum computing applications.\n\nThe competitive landscape also includes major technology companies that have significant quantum computing initiatives but are not primarily quantum-focused. Intel leverages their semiconductor manufacturing expertise to develop silicon-based quantum processors, with their Tunnel Falls chip using spin qubits in silicon[6]. Amazon provides quantum computing access through their Amazon Web Services platform while developing their own quantum hardware through Amazon Center for Quantum Computing. These large technology companies bring substantial resources and complementary capabilities to quantum computing development, though their quantum efforts represent relatively small portions of their overall business activities.\n\n## Commercial Applications and Use Cases\n\nThe quantum computing industry is witnessing a significant shift from theoretical research to practical applications across multiple sectors, with early commercial deployments demonstrating real-world value creation. The breadth of applications spans industries from finance and healthcare to logistics and cybersecurity, indicating quantum computing's potential to transform numerous aspects of modern business and society.\n\nFinancial services represent one of the most promising near-term markets for quantum computing applications, with major institutions already investing heavily in quantum technologies for portfolio optimization, risk analysis, and fraud detection. JPMorgan Chase has partnered with quantum computing companies to explore portfolio optimization applications, achieving problem size reductions of up to 80% compared to classical approaches[28]. The financial sector's interest in quantum computing stems from the technology's ability to solve complex optimization problems that are computationally intractable for classical computers, particularly in areas like derivative pricing, risk modeling, and market analysis. Goldman Sachs has similarly partnered with quantum startups to explore quantum portfolio optimization, recognizing the potential for quantum algorithms to provide competitive advantages in financial modeling and decision-making[26]. Quantum computing's ability to analyze multivariate relationships and simulate complex market dynamics offers unprecedented capabilities for financial risk management and investment strategy development.\n\nHealthcare and pharmaceutical applications represent perhaps the most transformative potential for quantum computing, with the technology enabling molecular-level simulations that could revolutionize drug discovery and personalized medicine. The global quantum computing in healthcare market is projected to grow from $191.3 million in 2024 to $1.324 billion by 2030, reflecting the sector's recognition of quantum computing's potential impact[15]. Pharmaceutical companies are investing heavily in quantum drug discovery, utilizing quantum computers to simulate molecular interactions and test billions of drug compound combinations in silico before proceeding to costly physical trials. This approach has the potential to reduce drug development timelines from the current 10-year average to under three years, representing enormous cost savings and faster patient access to new treatments[26]. Quantum computing's ability to model quantum mechanical effects in biological systems provides capabilities that classical computers cannot match, particularly for understanding protein folding, enzyme catalysis, and drug-target interactions.\n\nPfizer and IBM have collaborated on quantum molecular modeling projects to advance treatments for diseases including cancer, demonstrating the practical application of quantum computing in pharmaceutical research[28]. The genomics and precision medicine segment is expected to experience the fastest growth among healthcare applications, with quantum technology's ability to process complex genetic data at unprecedented speeds enabling more accurate and personalized treatment development. Quantum computing can significantly enhance the analysis of genetic information including DNA sequences and protein structures, potentially leading to faster and more accurate development of personalized therapies for conditions like cancer and rare genetic disorders.\n\nSupply chain optimization represents another area where quantum computing is demonstrating practical value. DHL has successfully applied quantum algorithms to optimize international shipping routes, achieving delivery time reductions of up to 20% compared to classical optimization methods[28]. The logistics industry faces increasingly complex optimization challenges as global supply chains become more sophisticated and customers demand faster, more reliable delivery services. Quantum computing's ability to simultaneously evaluate vast numbers of variables and constraints makes it particularly well-suited for multi-modal transportation optimization, inventory management, and demand forecasting applications. The COVID-19 pandemic highlighted supply chain vulnerabilities and the need for more resilient and adaptive logistics networks, creating demand for advanced optimization technologies including quantum computing.\n\nCybersecurity applications present both opportunities and challenges for quantum computing adoption. While quantum computers pose a significant threat to current cryptographic systems, they also enable new forms of quantum-safe encryption and security protocols[11]. The development of post-quantum cryptography has become a critical priority for organizations seeking to protect sensitive data against future quantum computing threats. The National Institute of Standards and Technology (NIST) has begun standardizing quantum-safe encryption protocols, and businesses that implement these technologies early will maintain competitive advantages as quantum cybersecurity becomes essential[26]. The immediate threat of \"Harvest Now, Decrypt Later\" attacks, where adversaries collect encrypted data today with the intention of decrypting it using future quantum computers, is driving urgent adoption of quantum-safe security measures across industries.\n\nArtificial intelligence and machine learning applications represent a rapidly growing area of quantum computing utilization, with the convergence of AI and quantum computing creating opportunities for enhanced computational capabilities. Quantum AI can accelerate training times for deep learning models, solve complex optimization problems, and enhance natural language processing and computer vision applications[26]. Traditional AI models require enormous computational resources and training time, but quantum systems offer the potential to dramatically reduce these requirements while enabling more sophisticated AI capabilities. This convergence could lead to breakthroughs in autonomous vehicle technology, predictive analytics, and AI-driven healthcare applications.\n\nClimate modeling and sustainability applications leverage quantum computing's ability to simulate highly complex systems for environmental benefit. Quantum climate modeling can provide more accurate weather pattern predictions, optimize renewable energy grid management, and discover new sustainable materials[26]. Volkswagen has explored quantum algorithms for optimizing electric vehicle battery performance, demonstrating practical applications in sustainable transportation technology. The urgency of addressing climate change has created demand for more accurate environmental modeling and optimization tools, positioning quantum computing as a key technology for sustainability initiatives.\n\nManufacturing and materials science applications utilize quantum computing's molecular simulation capabilities to design new materials with enhanced properties. Quantum computers can simulate quantum mechanical effects in materials at the atomic level, enabling the discovery of new catalysts, semiconductors, and structural materials with properties optimized for specific applications[17]. This capability could transform industries ranging from aerospace and automotive to electronics and construction by enabling materials with superior performance, reliability, and sustainability characteristics.\n\nOptimization applications span multiple industries and use cases, from traffic flow management and energy distribution to financial trading and resource allocation. Quantum computing's ability to evaluate enormous solution spaces simultaneously makes it particularly valuable for complex optimization problems that classical computers cannot solve efficiently. These applications often provide immediate return on investment by reducing costs, improving efficiency, or enabling new capabilities that were previously impossible.\n\nThe transition from experimental to commercial quantum applications is accelerating as quantum computing hardware becomes more reliable and accessible through cloud platforms. Quantum-as-a-Service offerings from major cloud providers enable organizations to experiment with quantum applications without substantial capital investments, lowering barriers to adoption and accelerating the development of practical quantum use cases. This democratization of quantum computing access is enabling smaller organizations and startups to explore quantum applications, potentially accelerating innovation and expanding the range of commercial applications.\n\n## Investment Trends and Funding Landscape\n\nThe quantum computing investment landscape has undergone a dramatic transformation in 2025, reflecting a fundamental shift from long-term research funding to commercially focused investment expecting near-term returns. The surge in quantum computing investment represents one of the most significant developments in the technology sector, with total funding more than doubling compared to previous years and indicating strong investor confidence in the technology's commercial viability.\n\nInvestment in quantum computer companies reached unprecedented levels in Q1 2025, with more than $1.25 billion raised during the quarter compared to $550 million in the same period of 2024, representing a remarkable 128% increase year-over-year[8]. This dramatic growth in funding reflects a fundamental change in investor perception of quantum computing, shifting from viewing it as speculative long-term research to recognizing it as a technology approaching commercial readiness. The investment surge encompasses both private venture capital and public market activity, indicating broad-based confidence in quantum computing's near-term commercial prospects.\n\nThe distribution of investment across quantum technology segments reveals strategic priorities within the industry. Quantum computing companies captured more than 70% of all quantum-related funding in Q1 2025, significantly outpacing other quantum technology areas including quantum software, hardware components, communications, and sensing[8]. This concentration of investment in quantum computing reflects investor belief that quantum computers represent the most significant commercial opportunity within the broader quantum technology ecosystem. The focus on full-stack quantum computing companies suggests investors are prioritizing integrated solutions that can deliver complete quantum computing capabilities rather than specialized component technologies.\n\nIndividual company funding rounds in Q1 2025 demonstrate the scale of investment flowing into leading quantum computing companies. IonQ's $360 million funding round represents the largest quantum computing investment during the period, strengthening the company's position as the leading pure-play quantum computing company and providing resources for scaling their trapped ion quantum systems for enterprise applications[8]. QuEra Computing's $230 million funding round reflects growing investor confidence in neutral atom quantum computing architectures as a viable alternative to established superconducting and trapped ion approaches. The substantial investment in QuEra indicates that investors are diversifying their quantum computing bets across multiple technological approaches rather than concentrating on a single dominant technology.\n\nQuantum Machines' $170 million funding round highlights the importance of quantum control and orchestration systems that enable quantum computers to function effectively. The company's focus on hardware and software compatibility across various quantum architectures addresses a critical need for standardization and interoperability in the quantum computing ecosystem[8]. This investment reflects recognition that successful quantum computing deployments require sophisticated control systems and software stacks, not just quantum processors. D-Wave Systems' $150 million funding round demonstrates continued investor interest in quantum annealing technologies for optimization applications, even as the broader industry focuses on gate-based universal quantum computing approaches.\n\nThe geographic distribution of quantum computing investment reveals regional strengths and strategic priorities. North American companies continue to attract the largest share of quantum computing investment, reflecting the region's established quantum computing industry and favorable investment environment. European quantum computing companies, including France's Alice & Bob with their €100 million funding round, are gaining significant investor attention and developing regional quantum computing capabilities[8]. The global nature of quantum computing investment indicates that this technology is viewed as strategically important across multiple regions and economic systems.\n\nGovernment investment continues to play a crucial role in quantum computing development, complementing private sector funding with long-term research support and strategic initiatives. The U.S. National Quantum Initiative Reauthorization Act, authorizing $2.7 billion over five years for quantum technology development, demonstrates continued government commitment to maintaining American leadership in quantum technologies[12]. This legislation shifts focus from basic research toward applied quantum science and practical applications, reflecting the technology's maturation toward commercial viability. The inclusion of new federal agencies including the National Institutes of Health, State Department, and Small Business Administration in quantum initiatives indicates recognition of quantum computing's broad potential impact across government functions.\n\nThe funding pattern reveals a shift from early-stage research investments toward later-stage commercial development funding. Investors are increasingly focusing on companies that demonstrate clear paths to revenue generation and commercial deployment rather than purely research-oriented initiatives. This trend reflects growing confidence that quantum computing has moved beyond the experimental phase toward practical applications that can generate return on investment. The emphasis on enterprise-ready quantum computing solutions indicates investor belief that business applications will drive the first wave of quantum computing commercialization.\n\nVenture capital firms specializing in deep technology and hardware investments have become major players in quantum computing funding. These investors bring expertise in evaluating complex technical risks and supporting companies through the challenging transition from research to commercial deployment. The involvement of experienced deep technology investors provides quantum computing companies with strategic guidance and industry connections necessary for successful commercialization. Corporate venture capital arms of major technology companies are also increasing their quantum computing investments, recognizing the strategic importance of quantum technologies for future business applications.\n\nThe public market reception of quantum computing companies provides another indicator of investor sentiment and commercial expectations. Public quantum computing companies including IonQ, Rigetti Computing, and D-Wave Systems have provided investors with early access to quantum computing investment opportunities, though these companies remain in early revenue phases with profitability still years away[20]. The public market valuations of quantum computing companies reflect long-term growth expectations rather than current financial performance, indicating investor belief in the transformative potential of quantum technologies.\n\nInvestment metrics for evaluating quantum computing companies have evolved beyond traditional technology company financial measures to include quantum-specific technical indicators. Investors increasingly evaluate quantum companies based on qubit count and quality, quantum volume, gate fidelity, error rates, and technical roadmaps toward fault-tolerant quantum computing[20]. Patent portfolios, partnerships with government and enterprise customers, and cloud platform accessibility have become important factors in investment decisions. These specialized evaluation criteria reflect the unique technical challenges and opportunities in quantum computing compared to traditional software and hardware companies.\n\nThe investment landscape also reflects expectations for market consolidation as the quantum computing industry matures. Investors are positioning for potential acquisitions and partnerships between quantum computing companies and larger technology corporations. The substantial funding raised by leading quantum companies provides resources for competitive positioning and potential acquisition of smaller quantum technology firms. This dynamic suggests that the current diverse ecosystem of quantum computing companies may consolidate around a smaller number of dominant players as the technology reaches commercial maturity.\n\n## Regulatory Framework and Policy Challenges\n\nThe regulatory landscape surrounding quantum computing is rapidly evolving as governments worldwide recognize both the transformative potential and national security implications of quantum technologies. The development of comprehensive regulatory frameworks presents complex challenges that must balance innovation promotion with security concerns, international cooperation with competitive advantages, and technological advancement with ethical considerations.\n\nThe United States has established the most comprehensive quantum policy framework through the National Quantum Initiative Act, originally enacted in 2018 and recently reauthorized with $2.7 billion in funding through 2034[12]. This legislation creates a coordinated approach to quantum information science research and development across multiple federal agencies, including the National Institute of Standards and Technology (NIST), National Science Foundation (NSF), and Department of Energy. The reauthorization reflects a strategic shift from basic research toward practical applications, addressing the critical \"valley of death\" where promising technologies often fail to transition from laboratory research to commercial deployment. The legislation establishes new quantum research centers, workforce development programs, and public-private collaboration initiatives designed to maintain American leadership in quantum technologies while fostering commercial innovation.\n\nExport controls represent one of the most significant regulatory challenges facing the quantum computing industry, with the U.S. Commerce Department implementing comprehensive restrictions on quantum computing technologies in September 2024[22]. These controls cover key equipment, materials, software, and complete quantum computer systems, requiring licenses for exports to most countries while creating exceptions for allies with equivalent control measures. The export control framework reflects growing concerns about the national security implications of quantum computing, particularly the technology's potential to break current encryption methods and provide military advantages. The regulations specifically target countries identified as national security concerns, including China, Russia, and Iran, while attempting to preserve international scientific collaboration essential for quantum research advancement.\n\nThe implementation of export controls creates significant compliance burdens for quantum computing companies engaged in international business. Companies must navigate complex licensing requirements for technology transfers, international partnerships, and foreign investment arrangements[22]. The regulations extend to \"deemed exports\" where sharing controlled technology with foreign nationals within the United States is considered equivalent to exporting the technology to their home countries. However, recognizing the importance of foreign talent to the U.S. quantum workforce, the regulations create exceptions for academic research and educational activities while requiring disclosure of certain foreign national participation in quantum research projects.\n\nInternational coordination of quantum regulations presents both opportunities and challenges for industry development. The United States has encouraged allied countries to implement equivalent export controls, creating a coordinated approach to quantum technology security while maintaining scientific and commercial collaboration among trusted partners[22]. This approach aims to prevent authoritarian regimes from accessing advanced quantum technologies while preserving the international cooperation necessary for quantum research advancement. However, differing national approaches to quantum regulation create compliance complexities for multinational quantum companies and may fragment the global quantum technology ecosystem.\n\nCybersecurity regulations are evolving rapidly to address the quantum computing threat to current encryption systems. The National Institute of Standards and Technology has begun standardizing post-quantum cryptography algorithms designed to resist quantum computing attacks, with organizations increasingly required to implement quantum-safe encryption protocols[11]. The urgency of this transition stems from the threat of \"Harvest Now, Decrypt Later\" attacks where adversaries collect encrypted data today with the intention of decrypting it using future quantum computers. Regulatory frameworks are emerging to require organizations handling sensitive data to implement quantum-safe security measures, creating compliance requirements that will drive quantum cybersecurity market growth.\n\nThe regulatory approach to quantum computing differs significantly from traditional technology regulation due to the fundamental nature of quantum information processing. Quantum computers operate according to quantum mechanical principles that create both unprecedented computational capabilities and unique security vulnerabilities[10]. Traditional regulatory frameworks based on classical information processing assumptions may be inadequate for addressing quantum computing's implications. Policymakers must develop new regulatory approaches that account for quantum computing's ability to solve certain problems exponentially faster than classical computers while creating new categories of computational problems and security risks.\n\nIntellectual property policy presents complex challenges for quantum computing regulation, with questions arising about appropriate patent protection duration and scope for quantum technologies[10]. The rapidly evolving nature of quantum technology suggests that traditional patent protection periods may be too long, potentially stifling innovation by concentrating market power in early patent holders. Conversely, shorter patent protection periods might discourage investment in quantum research and development by reducing the exclusivity period for recovering research investments. The unique nature of quantum algorithms and hardware creates additional challenges for patent evaluation and enforcement, requiring specialized expertise that may not be available in traditional patent examination processes.\n\nAntitrust considerations are becoming increasingly important as the quantum computing industry begins to consolidate around a smaller number of dominant players. The substantial capital requirements for quantum computing research and development may create natural barriers to entry that could limit competition[10]. Large technology companies with existing quantum computing programs may have advantages in acquiring quantum startups and potentially limiting competition in quantum markets. Regulatory authorities must balance the need for industry consolidation to achieve technical milestones with maintaining competitive markets that foster innovation and prevent monopolistic behavior.\n\nData privacy and protection regulations must evolve to address quantum computing's unique capabilities and vulnerabilities. Quantum computers' ability to break current encryption methods creates new categories of data protection risks that existing privacy regulations may not adequately address[10]. Organizations collecting and processing personal data must consider the long-term security implications of quantum computing and implement appropriate protective measures. Regulatory frameworks like the European Union's General Data Protection Regulation may provide guidance for developing quantum-specific data protection requirements, but new regulatory approaches may be necessary to address quantum computing's unique characteristics.\n\nWorkforce development regulations and policies are crucial for addressing the quantum talent shortage that threatens industry growth. Government programs aimed at quantum education and training must navigate complex issues related to foreign national participation in quantum research while maintaining the international collaboration necessary for scientific advancement[23]. Immigration policies may need adjustment to attract and retain international quantum talent while addressing national security concerns. Educational regulations and standards must evolve to incorporate quantum information science into curricula at various levels, from K-12 education through advanced graduate training.\n\nThe regulatory framework must also address ethical considerations related to quantum computing applications. The technology's potential applications in surveillance, artificial intelligence enhancement, and military systems raise questions about appropriate use limitations and oversight mechanisms[10]. International agreements may be necessary to prevent quantum computing applications that could destabilize international security or violate human rights principles. The dual-use nature of quantum technologies creates challenges for regulators who must balance scientific advancement with security and ethical concerns.\n\n## Technical Challenges and Limitations\n\nDespite significant recent progress, quantum computing faces fundamental technical challenges that continue to limit commercial deployment and scalability. These limitations stem from the inherent fragility of quantum systems and the extreme precision required to manipulate quantum information reliably, creating substantial engineering obstacles that must be overcome before quantum computers can achieve their theoretical potential.\n\nQubit instability and decoherence represent the most fundamental technical challenge facing quantum computing systems. Qubits are extremely sensitive to environmental interference, losing their quantum state through interactions with their surroundings in a process called decoherence[16]. Most current quantum computing systems, including IBM's superconducting qubits, maintain coherence for only 100-200 microseconds, severely limiting the complexity of quantum algorithms that can be executed before quantum information is lost. Trapped ion systems achieve longer coherence times ranging from 0.2 seconds to 600 seconds depending on the qubit type, but even these extended periods constrain practical quantum computations. The fundamental challenge is that quantum computers require isolation from their environment to maintain quantum states, while simultaneously requiring external control to perform computations, creating an inherent tension that limits system performance.\n\nError rates in quantum operations present another critical limitation that must be addressed for practical quantum computing applications. Basic quantum operations like gate operations typically exhibit error rates of 0.1% to 1% per operation, which accumulate rapidly as quantum algorithms become more complex[16]. These error rates are orders of magnitude higher than classical computer error rates, making quantum computers unreliable for most practical applications without sophisticated error correction systems. The high error rates stem from the fundamental difficulty of controlling quantum systems with the precision required for reliable computation, including challenges in laser control for trapped ion systems, microwave pulse accuracy for superconducting systems, and environmental stability for all quantum computing platforms.\n\nQuantum error correction represents both a potential solution to error rate problems and a significant technical challenge in its own right. Current theoretical approaches to quantum error correction require thousands of physical qubits to create a single error-corrected logical qubit, a resource overhead that no current quantum computer can provide[16]. The threshold requirements for effective quantum error correction remain beyond the capabilities of existing quantum systems, creating a circular challenge where quantum computers need error correction to scale, but scaling is required to implement effective error correction. Recent breakthroughs by companies like Quantinuum demonstrate progress toward fault-tolerant quantum computing, but significant technical hurdles remain before practical error correction becomes available[24].\n\nScalability challenges extend beyond qubit count to encompass the increasing complexity of controlling large-scale quantum systems. Adding more qubits to quantum computers increases noise, crosstalk between qubits, and control complexity in ways that can degrade overall system performance[16]. IBM's 433-qubit Osprey processor, despite its impressive qubit count, still struggles with error rates that limit practical applications, demonstrating that simply increasing qubit numbers does not automatically improve quantum computing capabilities. The interconnection and control of large numbers of qubits requires sophisticated classical control systems that must operate with extreme precision while minimizing interference with quantum operations.\n\nQuantum algorithm development faces limitations related to the types of problems that quantum computers can solve more efficiently than classical computers. While quantum computing offers theoretical advantages for certain problem classes, including factoring large numbers and simulating quantum systems, many practical business applications do not map naturally onto quantum algorithms[19]. The development of quantum algorithms requires specialized expertise that combines quantum physics, computer science, and domain-specific knowledge, creating barriers for organizations seeking to apply quantum computing to their specific problems. The limited library of proven quantum algorithms constrains the range of applications where quantum computers can provide practical advantages over classical systems.\n\nManufacturing and fabrication challenges limit the ability to produce quantum computers reliably and cost-effectively. Quantum computer fabrication requires extreme precision and control, with manufacturing tolerances far exceeding those required for classical semiconductor devices[19]. Superconducting quantum computers require fabrication in clean room environments with atomic-level precision, while trapped ion systems need ultra-high vacuum chambers and precision laser systems. The specialized manufacturing requirements create high costs and limit the number of organizations capable of producing quantum computers, constraining supply and increasing prices for quantum computing systems.\n\nIntegration challenges arise when attempting to incorporate quantum computers into existing classical computing infrastructure. Quantum computers require sophisticated classical control systems, specialized software stacks, and hybrid quantum-classical algorithms to solve practical problems[3]. The integration of quantum processing units with classical computing systems requires new approaches to software development, system architecture, and workflow management. Most practical quantum applications will require hybrid systems that combine quantum and classical processing, creating additional complexity for system design and operation.\n\nStandardization limitations create interoperability challenges across different quantum computing platforms and vendors. The lack of common standards for quantum programming languages, hardware interfaces, and performance metrics makes it difficult to develop portable quantum applications or compare quantum systems objectively[19]. Different quantum computing companies have developed proprietary approaches to hardware architecture, software frameworks, and performance measurement, creating fragmentation that limits ecosystem development. The absence of industry standards also complicates procurement decisions for organizations considering quantum computing investments.\n\nEnvironmental requirements for quantum computing systems create operational challenges and cost burdens. Most quantum computers require cryogenic cooling systems that maintain temperatures near absolute zero, consuming substantial energy and requiring specialized facilities[16]. The extreme operating conditions necessary for quantum computers limit their deployment to specialized data centers and research facilities, reducing accessibility and increasing operational costs. While some quantum computing approaches like photonic and neutral atom systems can operate at room temperature, they face other technical limitations that may constrain their applications.\n\nThe talent shortage in quantum computing creates a bottleneck for addressing technical challenges and scaling quantum computing applications. The interdisciplinary nature of quantum computing requires expertise combining quantum physics, electrical engineering, computer science, and specific domain knowledge, creating a small pool of qualified professionals[23]. McKinsey reports only one qualified candidate available for every three quantum job openings, with more than half of quantum computing positions potentially going unfilled by 2025. The talent shortage limits the ability of organizations to develop quantum applications, maintain quantum systems, and address technical challenges limiting quantum computing deployment.\n\nCalibration and control challenges require continuous adjustment and optimization of quantum systems to maintain performance. Quantum computers require frequent recalibration as environmental conditions change and system components drift over time. The calibration process is complex and time-consuming, often requiring specialized expertise and limiting system availability for productive computation. Classical computers, in contrast, operate reliably without frequent recalibration, making them more suitable for production environments where consistent availability is required.\n\n## Future Outlook and Commercial Viability to 2035\n\nThe quantum computing industry stands at a critical juncture where technological breakthroughs, market demand, and investment convergence suggest a dramatic acceleration toward commercial viability through 2035. Multiple indicators point to the next decade as the period when quantum computing will transition from experimental technology to essential business infrastructure across multiple industries, though this transformation will occur gradually and face significant challenges.\n\nThe timeline for achieving fault-tolerant quantum computing, long considered the holy grail of the field, has accelerated significantly based on recent technical achievements and company roadmaps. IBM's commitment to delivering their Quantum Starling system by 2029, featuring 200 logical qubits capable of executing 100 million quantum gates, represents the most concrete timeline for large-scale fault-tolerant quantum computing[25]. Google's roadmap targets a useful, error-corrected quantum computer by 2029, building on their recent Willow chip achievements in quantum error correction. Quantinuum's breakthrough in achieving fault-tolerant quantum gates validates the technical approaches necessary for scaling to practical systems[24]. These converging timelines suggest that fault-tolerant quantum computing will become available in the late 2020s, providing the foundation for commercial applications requiring high reliability and accuracy.\n\nMarket projections indicate explosive growth in quantum computing adoption once technical barriers are overcome. The global quantum computing market is expected to grow from $1.3 billion in 2024 to potentially $72 billion by 2035, representing a compound annual growth rate that far exceeds typical technology sector expansion[2]. The total economic impact could reach $1 trillion in value creation by 2035, spanning industries from finance and healthcare to logistics and cybersecurity[9]. These projections reflect quantum computing's potential to solve previously intractable problems rather than simply improving upon classical computing approaches, creating entirely new categories of business value and competitive advantage.\n\nIndustry-specific adoption patterns will likely determine the commercial success of quantum computing through 2035. Financial services are positioned to become early adopters due to quantum computing's advantages in portfolio optimization, risk analysis, and fraud detection, with companies like JPMorgan Chase and Goldman Sachs already investing heavily in quantum applications[26]. The pharmaceutical industry represents another high-potential early adopter, with quantum molecular simulation capabilities offering transformative advantages in drug discovery and development that could reduce development timelines from decades to years. Healthcare applications beyond pharmaceuticals, including personalized medicine and medical imaging optimization, could drive quantum adoption across the broader healthcare ecosystem.\n\nThe development of quantum computing ecosystems will be crucial for commercial success, requiring coordination among hardware vendors, software developers, cloud service providers, and end-user organizations. Quantum-as-a-Service platforms are expected to drive the majority of early commercial adoption by reducing barriers to entry and enabling organizations to access quantum capabilities without substantial capital investments[9]. Major cloud providers including AWS, Google Cloud, and Microsoft Azure are expanding their quantum offerings, creating accessible pathways for businesses to experiment with and deploy quantum applications. The maturation of quantum software tools and programming frameworks will enable broader developer participation in quantum application development.\n\nGeopolitical competition will significantly influence quantum computing development and deployment through 2035. The U.S.-China technology competition has extended to quantum computing, with both countries making substantial public investments and implementing export controls to maintain competitive advantages[21]. The European Union, United Kingdom, Japan, and other nations are also developing national quantum strategies and investment programs, creating a multipolar quantum computing landscape. These geopolitical dynamics may accelerate quantum computing development through competitive pressure while potentially fragmenting international collaboration that has historically driven scientific advancement.\n\nWorkforce development will be critical for realizing quantum computing's commercial potential, with projections suggesting 840,000 quantum-related jobs by 2035[9]. The current talent shortage threatens to constrain industry growth, with only one qualified candidate available for every three quantum job openings according to McKinsey research[23]. Educational institutions, government programs, and industry initiatives will need to dramatically expand quantum education and training programs to meet workforce demands. The interdisciplinary nature of quantum computing requires new educational approaches that combine quantum physics, computer science, and domain-specific knowledge across multiple industries.\n\nThe regulatory environment will continue evolving to balance innovation promotion with security concerns, potentially creating both opportunities and constraints for commercial quantum computing deployment. Export controls and international agreements may limit technology transfer and collaboration, while cybersecurity regulations will drive demand for post-quantum cryptography solutions. The development of quantum-safe encryption standards and their mandatory adoption across industries will create substantial market opportunities for quantum cybersecurity companies while requiring significant investment from organizations seeking to protect sensitive data.\n\nTechnical progress toward practical quantum advantage will determine commercial success across different application areas. While quantum computers have demonstrated theoretical advantages for specific problems, practical quantum advantage requires quantum systems that solve real-world problems better than classical computers while accounting for the full cost of quantum hardware, software, and expertise[17]. The achievement of practical quantum advantage will likely occur gradually across different application areas, starting with specialized optimization and simulation problems before expanding to broader business applications. The timeline for practical quantum advantage varies significantly by application area, with some optimization problems potentially achieving quantum advantage by the late 2020s while more complex applications may require additional technical development.\n\nInvestment patterns suggest continued strong funding for quantum computing development, though market expectations may create pressure for companies to demonstrate commercial progress more rapidly than previously expected. The shift from research-focused to commercially oriented investment reflects growing confidence in near-term quantum applications but also creates performance pressure that could accelerate consolidation among quantum companies[8]. Companies that can demonstrate clear paths to revenue generation and customer adoption will likely attract continued investment, while those remaining in pure research mode may face funding challenges.\n\nThe hybrid quantum-classical computing model will likely dominate commercial deployments through 2035, with quantum processors serving as specialized accelerators for specific computational tasks rather than general-purpose computers[3]. This approach acknowledges that quantum computers excel at certain problem types while classical computers remain superior for most computational tasks. The development of seamless integration between quantum and classical systems will be crucial for commercial success, requiring new software architectures, programming models, and workflow management systems.\n\nMarket consolidation is likely as the quantum computing industry matures, with successful companies acquiring specialized technology firms or forming strategic partnerships to build comprehensive quantum computing capabilities. Large technology companies including IBM, Google, Microsoft, and Amazon have advantages in scaling quantum technologies through their existing cloud platforms and enterprise relationships. Pure-play quantum companies that can demonstrate unique technical capabilities or market positions may become acquisition targets or strategic partners for larger firms seeking to expand their quantum offerings.\n\nBy 2035, quantum computing is expected to have achieved commercial viability in multiple application areas while continuing to face limitations that prevent universal adoption. The technology will likely serve as a specialized tool for solving specific types of problems rather than replacing classical computers, similar to how graphics processing units serve specialized roles in modern computing systems. The economic impact will be substantial in targeted applications, justifying continued investment and development while creating new industries and transforming existing ones. Success will depend on continued technical progress, effective workforce development, supportive regulatory frameworks, and the evolution of business models that can capture value from quantum computing's unique capabilities.\n\n## Conclusion\n\nThe quantum computing industry in 2025 represents a remarkable convergence of scientific breakthrough and commercial opportunity that positions this technology as one of the most significant innovations of the 21st century. The comprehensive analysis reveals an industry that has decisively moved beyond theoretical research to demonstrate practical applications across finance, healthcare, logistics, and cybersecurity, while attracting unprecedented investment levels that signal strong confidence in near-term commercial viability.\n\nThe technological landscape shows multiple competing approaches achieving significant milestones, from Google's Willow chip demonstrating quantum error correction to IBM's roadmap for fault-tolerant systems by 2029. The diversity of technical approaches, including superconducting, trapped ion, photonic, and emerging neutral atom systems, indicates a maturing field where different technologies may serve distinct market segments rather than a single approach dominating all applications. The recent breakthroughs in quantum error correction by companies like Quantinuum validate the fundamental techniques necessary for scaling quantum computers to practical applications, suggesting that the long-sought goal of fault-tolerant quantum computing is within reach.\n\nMarket projections indicating growth from $1.3 billion in 2024 to potentially $72 billion by 2035 reflect quantum computing's potential to create entirely new categories of business value rather than simply improving existing computational approaches. The $1 trillion in projected economic impact by 2035 spans multiple industries and demonstrates quantum computing's role as an enabling technology that can transform entire sectors. The shift in investment patterns from research-focused funding to commercially oriented investment, with quantum computing companies raising over $1.25 billion in Q1 2025 alone, indicates that the technology has reached an inflection point where investors expect near-term returns rather than long-term research outcomes.\n\nThe regulatory environment presents both challenges and opportunities, with export controls reflecting quantum computing's strategic importance while potentially constraining international collaboration essential for continued innovation. The development of post-quantum cryptography standards and their eventual mandatory adoption will create substantial market opportunities while requiring significant investment from organizations seeking to protect sensitive data. The National Quantum Initiative Reauthorization Act's $2.7 billion authorization demonstrates continued government commitment to maintaining competitive advantages in quantum technologies.\n\nHowever, significant challenges remain that will influence the industry's trajectory through 2035. Technical limitations including qubit instability, scalability challenges, and the need for sophisticated error correction continue to constrain practical applications. The quantum talent shortage, with only one qualified candidate for every three job openings, threatens to become a critical bottleneck for industry growth unless addressed through expanded education and training programs. The interdisciplinary nature of quantum computing requires new approaches to workforce development that combine quantum physics, computer science, and domain-specific expertise.\n\nThe commercial viability assessment suggests that quantum computing will achieve practical applications in specialized areas by the late 2020s, with broader adoption occurring throughout the early 2030s. The hybrid quantum-classical computing model will likely dominate commercial deployments, with quantum processors serving as specialized accelerators for specific computational tasks rather than general-purpose computers. Industries with complex optimization and simulation requirements, particularly finance and pharmaceuticals, are positioned to capture early value from quantum computing capabilities.\n\nLooking toward 2035, quantum computing is expected to establish itself as an essential technology for organizations requiring advanced computational capabilities in optimization, simulation, and cryptography. The technology will likely create new industries while transforming existing ones, justifying continued substantial investment despite remaining technical challenges. Success will depend on sustained progress in hardware development, software tools, workforce preparation, and regulatory frameworks that balance innovation with security concerns.\n\nThe quantum computing revolution is not a distant possibility but a current reality that demands immediate attention from business leaders, policymakers, and investors. Organizations that begin preparing for quantum computing adoption today will be positioned to capture competitive advantages as the technology matures, while those that delay may find themselves at significant disadvantages in increasingly quantum-enabled competitive landscapes. The next decade will determine which organizations, countries, and technologies will lead the quantum computing transformation that promises to reshape multiple aspects of modern society and economic activity."\ },\ "delta": {\ "role": "assistant",\ "content": ""\ }\ }\ ] } See all 264 lines Cost Breakdown for Sample Request **Token Usage** * Prompt Tokens: 33 * Completion Tokens: 11,395 * Citation Tokens: 19,028 * Search Queries: 21 * Reasoning Tokens: 193,947 1 Calculate Input Tokens Cost 33 tokens ÷ 1,000,000 × 2\=2 = 2\=0.000066 2 Calculate Output Tokens Cost 11,395 tokens ÷ 1,000,000 × 8\=8 = 8\=0.09116 3 Calculate Citation Tokens Cost 19,028 tokens ÷ 1,000,000 × 2\=2 = 2\=0.038056 4 Calculate Search Queries Cost 21 queries × 5÷1,000\=5 ÷ 1,000 = 5÷1,000\=0.105 5 Calculate Reasoning Tokens Cost 193,947 tokens ÷ 1,000,000 × 3\=3 = 3\=0.581841 6 Calculate Total Cost 0.000066+0.000066 + 0.000066+0.09116 + 0.038056+0.038056 + 0.038056+0.105 + 0.581841\=0.581841 = 0.581841\=0.816123 **Total cost for this request: $0.816123** Advanced Features ----------------- * Reasoning Effort * Async API Control the computational effort dedicated to each query with the `reasoning_effort` parameter. This allows you to balance between speed and thoroughness while managing costs by directly impacting the amount of reasoning tokens consumed.**Options:** * `"low"`: Faster, simpler answers with reduced token usage * `"medium"`: Balanced approach (default) * `"high"`: Deeper, more thorough responses with increased token usage cURL Python Copy Ask AI curl --request POST \ --url https://api.perplexity.ai/chat/completions \ --header "Authorization: Bearer " \ --header "Content-Type: application/json" \ --data '{ "model": "sonar-deep-research", "messages": [{"role": "user", "content": "Provide an exhaustive analysis of current approaches to achieving net-zero carbon emissions in heavy industry, including technological solutions, policy frameworks, and economic feasibility across different sectors."}], "reasoning_effort": "low" }' | jq Success Response Copy Ask AI { "id": "75b0f5a0-010c-4231-bade-ca38ec9f8789", "model": "sonar-deep-research", "created": 1753127531, "usage": { "prompt_tokens": 31, "completion_tokens": 6994, "total_tokens": 7025, "citation_tokens": 18133, "num_search_queries": 14, "reasoning_tokens": 61889 }, "search_results": [\ {\ "title": "Net zero options for heavy industry – National Energy Analysis Centre",\ "url": "https://research.csiro.au/neac/net-zero-options-for-heavy-industry/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "[PDF] Mission Possible - Energy Transitions Commission",\ "url": "https://www.energy-transitions.org/wp-content/uploads/2020/08/ETC_MissionPossible_FullReport.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Heavy Industry - Net Zero Climate",\ "url": "https://netzeroclimate.org/sectors/heavy_industry/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "25 ways heavy industries can reach net zero - IEA report",\ "url": "https://www.weforum.org/stories/2022/10/industry-net-zero-breakthrough-agenda-iea/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "[PDF] Achieving Net Zero Heavy Industry Sectors in G7 Members",\ "url": "https://iea.blob.core.windows.net/assets/c4d96342-f626-4aea-8dac-df1d1e567135/AchievingNetZeroHeavyIndustrySectorsinG7Members.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Heavy Industry - Net Zero Climate",\ "url": "https://netzeroclimate.org/sectors/heavy_industry/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "The challenge of reaching zero emissions in heavy industry - IEA",\ "url": "https://www.iea.org/articles/the-challenge-of-reaching-zero-emissions-in-heavy-industry",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Executive summary – Achieving Net Zero Heavy Industry ...",\ "url": "https://www.iea.org/reports/achieving-net-zero-heavy-industry-sectors-in-g7-members/executive-summary",\ "date": null,\ "last_updated": null\ },\ {\ "title": "[PDF] Mission Possible - Energy Transitions Commission",\ "url": "https://www.energy-transitions.org/wp-content/uploads/2020/08/ETC_MissionPossible_FullReport.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "How 6 heavy-emitting industries are working to decarbonize",\ "url": "https://www.sustainablemanufacturingexpo.com/en/articles/heavy-industries-decarbonize.html",\ "date": null,\ "last_updated": null\ },\ {\ "title": "[PDF] Achieving Net Zero Heavy Industry Sectors in G7 Members",\ "url": "https://iea.blob.core.windows.net/assets/c4d96342-f626-4aea-8dac-df1d1e567135/AchievingNetZeroHeavyIndustrySectorsinG7Members.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "25 ways heavy industries can reach net zero - IEA report",\ "url": "https://www.weforum.org/stories/2022/10/industry-net-zero-breakthrough-agenda-iea/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "[PDF] Reaching net-zero carbon emissions - Energy Transitions Commission",\ "url": "https://www.energy-transitions.org/wp-content/uploads/2020/08/ETC-sectoral-focus-Steel_final.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "The challenge of reaching zero emissions in heavy industry",\ "url": "https://www.iea.org/articles/the-challenge-of-reaching-zero-emissions-in-heavy-industry",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Iron and Steel Industry Will Buy $250B Carbon Credits for Net Zero",\ "url": "https://carboncredits.com/iron-and-steel-industry-buys-250b-carbon-credits-net-zero/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Achieving Net Zero Heavy Industry Sectors in G7 Members",\ "url": "https://iea.blob.core.windows.net/assets/c4d96342-f626-4aea-8dac-df1d1e567135/AchievingNetZeroHeavyIndustrySectorsinG7Members.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "What is net-zero steel and why do we need it?",\ "url": "https://www.weforum.org/stories/2022/09/what-is-net-zero-steel-and-why-do-we-need-it/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "[PDF] Cost-Efficient Decarbonization of Portland Cement Production",\ "url": "https://www.hbs.edu/ris/download.aspx?name=24-025.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Achieving Net Zero Heavy Industry Sectors in G7 Members",\ "url": "https://iea.blob.core.windows.net/assets/c4d96342-f626-4aea-8dac-df1d1e567135/AchievingNetZeroHeavyIndustrySectorsinG7Members.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Cement's Carbon Footprint Doesn't Have to Be Set in Stone",\ "url": "https://www.bcg.com/publications/2024/cement-industry-carbon-footprint",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Cement costs and energy economics?",\ "url": "https://thundersaidenergy.com/downloads/cement-costs-and-energy-economics/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Five Insights on the Concrete and Cement Industry's Transition ... - RMI",\ "url": "https://rmi.org/five-insights-on-the-concrete-and-cement-industrys-transition-to-net-zero/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Cost-Efficient Pathways to Decarbonize Portland Cement Production",\ "url": "https://climate.mit.edu/posts/cost-efficient-pathways-decarbonize-portland-cement-production",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Mapping the Path to Industrial Decarbonization - RMI",\ "url": "https://rmi.org/mapping-the-path-to-industrial-decarbonization/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Pathways to Decarbonization: A North American Aluminum Roadmap",\ "url": "https://www.aluminum.org/Decarb",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Policy Packages for Decarbonizing Heavy Industry",\ "url": "https://www.unido.org/sites/default/files/unido-publications/2023-12/IID%20Policy%20Brief%209%20-%20Policy%20packages%20for%20decarbonizing%20heavy%20industry.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Designing Carbon Contracts for Difference - Clean Air Task Force",\ "url": "https://www.catf.us/resource/designing-carbon-contracts-for-difference/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Learning from CBAM's transitional phase: Early impacts on ...",\ "url": "https://www.cer.eu/publications/archive/policy-brief/2024/learning-cbams-transitional-impacts-trade",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Net zero options for heavy industry - CSIRO Research",\ "url": "https://research.csiro.au/neac/net-zero-options-for-heavy-industry/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Marginal Abatement Cost Curves for U.S. Net-Zero Energy ...",\ "url": "https://www.edf.org/sites/default/files/documents/MACC_2.0%20report_Evolved_EDF.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "The challenge of reaching zero emissions in heavy industry - IEA",\ "url": "https://www.iea.org/articles/the-challenge-of-reaching-zero-emissions-in-heavy-industry",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Sustainable emissions pathways in the chemicals industry - PwC",\ "url": "https://www.pwc.com/gx/en/issues/business-model-reinvention/how-we-fuel-and-power/net-zero-chemicals-industry-transformation.html",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Electrification in mining industry to reduce CO2",\ "url": "https://blog.se.com/industry/mining-metals-minerals/2023/09/14/how-will-electrification-reduce-minings-large-carbon-footprint/",\ "date": null,\ "last_updated": null\ },\ {\ "title": "The challenge of reaching zero emissions in heavy industry",\ "url": "https://www.iea.org/articles/the-challenge-of-reaching-zero-emissions-in-heavy-industry",\ "date": null,\ "last_updated": null\ },\ {\ "title": "[PDF] The chemical industry's road to net zero - Accenture",\ "url": "https://www.accenture.com/content/dam/accenture/final/a-com-migration/r3-3/pdf/pdf-174/accenture-chemicals-costs-opportunities-eu-green-deal.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "The potential of electric vehicles for decarbonising mining",\ "url": "https://mine.nridigital.com/mine_may25/electric-vehicles-mining",\ "date": null,\ "last_updated": null\ },\ {\ "title": "ETC_MissionPossible_FullReport.pdf",\ "url": "https://www.energy-transitions.org/wp-content/uploads/2020/08/ETC_MissionPossible_FullReport.pdf",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Electric Mine Consortium. The road to zero emissions.",\ "url": "https://www.electricmine.com",\ "date": null,\ "last_updated": null\ },\ {\ "title": "Achieving Net Zero Heavy Industry Sectors in G7 Members",\ "url": "https://iea.blob.core.windows.net/assets/c4d96342-f626-4aea-8dac-df1d1e567135/AchievingNetZeroHeavyIndustrySectorsinG7Members.pdf",\ "date": null,\ "last_updated": null\ }\ ], "object": "chat.completion", "choices": [\ {\ "index": 0,\ "finish_reason": "stop",\ "message": {\ "role": "assistant",\ "content": "\nWe are given a query: \"Provide an exhaustive analysis of current approaches to achieving net-zero carbon emissions in heavy industry, including technological solutions, policy frameworks, and economic feasibility across different sectors.\"\n\nWe have multiple search results (indexed [1] to [39]) that provide valuable information on this topic.\n\nWe must write a comprehensive report of at least 10,000 words, structured with sections and subsections, using Markdown headers. The report must be self-contained, with no bullet points or lists, and each paragraph must be at least 4-5 sentences. We must cite the relevant search results by index number in brackets at the end of the sentence where the information is used.\n\nLet's break down the query into key components:\n1. Technological solutions for net-zero in heavy industry (e.g., cement, steel, chemicals, mining)\n2. Policy frameworks (international, national, regional)\n3. Economic feasibility (costs, investments, green premiums, abatement costs)\n4. Different sectors (cement, steel, chemicals, mining, etc.)\n\nWe will structure the report as follows:\n\n## Title\n# Achieving Net-Zero Carbon Emissions in Heavy Industry: A Comprehensive Analysis of Technological Pathways, Policy Frameworks, and Economic Viability\n\n## Executive Summary (one paragraph summarizing key findings)\n\n## Main Body Sections (at least 5 sections, each with subsections)\n\n### Section 1: Introduction to Heavy Industry Emissions and Net-Zero Challenges\n- Current emissions landscape\n- The unique challenges of heavy industry (hard-to-abate sectors)\n\n### Section 2: Technological Pathways for Decarbonization\n- Subsection 2.1: Energy Efficiency and Process Optimization\n- Subsection 2.2: Material Efficiency and Circular Economy\n- Subsection 2.3: Electrification and Renewable Energy Integration\n- Subsection 2.4: Alternative Fuels and Feedstocks (Hydrogen, Biomass)\n- Subsection 2.5: Carbon Capture, Utilization, and Storage (CCUS)\n- Subsection 2.6: Innovative Production Processes (e.g., hydrogen-based steel, electric cement)\n\n### Section 3: Sector-Specific Analysis\n- Subsection 3.1: Iron and Steel Industry\n- Subsection 3.2: Cement and Concrete Industry\n- Subsection 3.3: Chemical Industry\n- Subsection 3.4: Mining Industry\n\n### Section 4: Policy Frameworks and International Cooperation\n- Subsection 4.1: National and Regional Policies (carbon pricing, standards, incentives)\n- Subsection 4.2: International Initiatives and Agreements (e.g., Breakthrough Agenda, G7)\n- Subsection 4.3: Carbon Border Adjustment Mechanisms (CBAM) and Trade Policies\n- Subsection 4.4: Public Funding and Private Investment\n\n### Section 5: Economic Feasibility and Cost Analysis\n- Subsection 5.1: Abatement Costs and Green Premiums\n- Subsection 5.2: Investment Requirements and Financing\n- Subsection 5.3: Economic Impacts and Competitiveness\n\n### Section 6: Case Studies and Regional Focus\n- Subsection 6.1: G7 Leadership and Projects\n- Subsection 6.2: Australian Industrial Hubs\n- Subsection 6.3: European Union Initiatives\n\n## Conclusion (synthesis and recommendations)\n\nNow, we must ensure we cover all aspects from the search results and cite appropriately.\n\nKey insights from search results:\n\n### Technological Solutions:\n- Energy efficiency and material efficiency can reduce emissions by 25% by 2050 [5][11].\n- Hydrogen-based direct reduction for steel [8][17], and CCUS for cement [7][14][20].\n- Electrification in mining [33][36][38].\n- For chemicals, switching to renewable hydrogen for ammonia and methanol [32][35].\n\n### Policy Frameworks:\n- Carbon contracts for difference [27].\n- International cooperation (Breakthrough Agenda with 25 recommendations) [4][12].\n- G7 leadership [5][8][11][19].\n- CBAM [28].\n\n### Economic Feasibility:\n- Cost of decarbonizing steel: $1.4 trillion by 2050, including $250B for carbon credits [15].\n- Cement: abatement cost of CCUS around $160/ton CO2 [22], and cement price increase from $90-130 to $160-240/ton [20].\n- Chemicals: EU transition cost €1 trillion [35].\n- Net-zero transition for heavy industry: less than 0.5% of global GDP [2][9][37].\n\n### Sector-Specific:\n- Steel: pathways via EAF, DRI, hydrogen [15][17].\n- Cement: CCS, alternative materials, electric processes [18][20][23].\n- Chemicals: renewable hydrogen, bio-based routes [32][35].\n- Mining: electrification, hydrogen, alternative fuels [33][36][38].\n\nWe will write the report accordingly, ensuring each section is detailed and cites the sources.\n\nNote: We must write at least 10,000 words, so we need to be thorough in each section. We will avoid lists and use narrative paragraphs.\n\nLet's begin writing the report.\n\n# Achieving Net-Zero Carbon Emissions in Heavy Industry: A Comprehensive Analysis of Technological Pathways, Policy Frameworks, and Economic Viability \n\nHeavy industry—encompassing steel, cement, chemicals, and mining—contributes approximately 30% of global CO₂ emissions, presenting unique decarbonization challenges due to energy-intensive processes, high-temperature heat requirements, and process emissions inherent to production[6][14][31]. Current commitments from heavy industry sectors fall significantly short, targeting only a 60% emissions reduction by 2050 rather than full net-zero alignment[3][6]. This gap necessitates urgent, multifaceted strategies combining technological innovation, policy interventions, and international cooperation. Technological pathways include hydrogen-based steel production, carbon capture for cement, and industrial electrification, which could collectively abate 95% of emissions by 2050 but require unprecedented infrastructure investments[5][8][16]. Policy frameworks such as carbon contracts for difference and border adjustment mechanisms (CBAM) are critical for bridging the green premium, while sector-specific economic analyses reveal abatement costs ranging from $52–250/ton CO₂ depending on regional energy access and material efficiency[15][20][23]. Without accelerated action, emissions from hard-to-abate sectors could rise to 16 gigatons annually by 2050, undermining global climate targets[2][9][37]. \n\n## The Emissions Challenge and Decarbonization Imperative in Heavy Industry \n\nHeavy industry sectors—iron and steel, cement, chemicals, and mining—collectively account for nearly one-third of global CO₂ emissions, characterized by energy intensity, process emissions, and capital-intensive infrastructure with long lifespans[6][14][31]. These sectors face unique hurdles: cement production releases CO₂ through limestone calcination (60% of sector emissions), while steel manufacturing relies on coal-based blast furnaces generating 1.8–2.5 tons of CO₂ per ton of steel[15][21]. Without intervention, industrial emissions could rise from 10 gigatons today to 16 gigatons by 2050, representing an increasing share of residual emissions as other sectors decarbonize[2][37]. The net-zero transition is further complicated by growing demand for industrial materials; global cement production must increase 80% by 2050 to support urbanization and renewable energy infrastructure, while steel demand could reach 2.2 billion tons annually[15][21][32]. Achieving net-zero thus requires transforming production processes without compromising economic accessibility, particularly in developing economies where industrial growth is most rapid[5][16]. \n\n### Classification of Heavy Industry Emissions Sources \n\nEmissions in heavy industry derive from three primary sources: energy-related combustion (40–50%), industrial processes (30–40%), and fugitive releases (10–20%)[14][31]. In steelmaking, coal combustion for blast furnaces contributes 70% of emissions, with the remainder from coke production and ancillary processes[15][17]. Cement manufacturing emits CO₂ both from fuel combustion (40%) and chemical calcination (60%), where limestone (CaCO₃) decomposes into lime (CaO)[20][21]. Chemical production, particularly ammonia and methanol, relies on steam methane reforming of natural gas, emitting 1.5–2.5 tons of CO₂ per ton of product[32][35]. Mining emissions predominantly stem from diesel-powered mobile equipment (haul trucks, excavators) and ventilation systems, accounting for 1.1 gigatons annually[33][36]. Critically, 50–70% of industrial emissions originate from heat generation exceeding 400°C, which cannot be easily electrified with current technologies[7][34]. \n\n### Current Commitments and the Ambition Gap \n\nDespite net-zero pledges from major corporations, aggregate industry commitments equate to only a 60% emissions reduction by 2050—falling substantially short of full decarbonization[3][6]. The iron and steel sector, for example, would emit 470 million tons of CO₂ annually by 2050 under current pledges, requiring $250 billion in carbon credits to achieve neutrality[15]. Cement producers face similar gaps; European plants could reduce emissions 78% at a carbon price of €100/ton but require €155/ton for near-full decarbonization[18][23]. This ambition gap stems from technology readiness, with 60% of required emissions reductions dependent on solutions still at prototype or demonstration phase[5][11]. For instance, hydrogen-based direct reduced iron (DRI) for steel exists at commercial scale but constitutes less than 1% of global production, while carbon capture for cement remains confined to pilot projects[8][17][22]. Without accelerated deployment, heavy industry risks locking in 30–40 years of emissions from new infrastructure built before 2030[16][24]. \n\n## Technological Pathways for Heavy Industry Decarbonization \n\nDecarbonizing heavy industry necessitates deploying five interconnected technological pillars: energy efficiency, material efficiency, fuel switching, innovative processes, and carbon management. Energy efficiency improvements—such as waste heat recovery and advanced process controls—could deliver 10–15% near-term emissions reductions across sectors[2][7]. Material efficiency strategies, including industrial symbiosis and circular design, might reduce global steel demand 15–25% by 2050 through enhanced recycling and lightweighting[9][17]. Fuel switching to green hydrogen or biomass can address high-temperature heat needs, while electrification enables low-temperature processes[2][33][36]. For unavoidable emissions, carbon capture, utilization, and storage (CCUS) becomes essential, particularly in cement and chemicals[5][14][20]. Crucially, these technologies must be tailored to sector-specific constraints; hydrogen works for steel but faces cost barriers in cement, where CCUS dominates viable pathways[7][8][20]. \n\n### Energy and Material Efficiency Foundations \n\nEnergy efficiency retrofits represent the most immediate decarbonization lever, reducing emissions 15–25% at negative or low abatement costs[2][7][9]. Technologies include variable-speed drives for motors (saving 20–30% electricity), regenerative burners capturing waste heat, and advanced sensors optimizing combustion[7][33]. Material efficiency—producing equivalent services with fewer resources—could abate 25% of industrial emissions by 2050 through lightweight steel in construction, reduced cement clinker ratios, and enhanced material cascading[5][9][17]. Steel recycling, already at 680 million tons annually, must scale further to utilize growing scrap stocks, while chemical sector circularity requires closing \"societal carbon loops\" via polymer recycling and bio-based feedstocks[3][6][35]. Industrial symbiosis amplifies savings; alumina refineries could supply residue for cement production, while steel slag might replace limestone in CO₂ mineralization processes[3][29]. \n\n### Electrification and Renewable Integration \n\nElectrification displaces fossil-fired processes where technically feasible, particularly for under-1,000°C heat applications. Mining exemplifies this potential: switching diesel haul trucks to battery-electric models improves drivetrain efficiency from 30% to 90% and cuts ventilation needs by 30%, reducing site emissions 50–70%[33][36][38]. Pilbara's all-electric mine (operational since 2019) demonstrates full electrification viability, though power demand doubles, necessitating 2,000 GW of new renewable capacity globally for mining decarbonization[15][33][38]. For higher temperatures, resistive or induction heating powered by renewables offers pathways, but costs remain prohibitive for steel reheating (~$200/ton premium)[7][17]. Grid integration challenges include managing intermittent supply; Australian industrial hubs like Kwinana are modeling optimized energy flows using Model-Based Systems Engineering to balance electrolyzers, storage, and flexible loads[1][29]. \n\n### Hydrogen and Alternative Fuels Deployment \n\nGreen hydrogen—produced via renewable-powered electrolysis—holds particular promise for steelmaking through hydrogen-based direct reduced iron (H₂-DRI), which emits water vapor instead of CO₂ and could capture 40% of the global steel market by 2050[8][17][37]. However, hydrogen faces barriers in cement and chemicals due to higher costs and integration complexity[7][20][35]. For example, ammonia production via electrolytic hydrogen increases capital intensity fourfold compared to steam methane reforming[35]. Biomass and biofuels serve as transitional alternatives; cement kilns can substitute 30–50% coal with agricultural residues, though sustainable feedstock limits exist[2][21]. Synthetic fuels (e-fuels) derived from green hydrogen and captured CO₂ may decarbonize high-temperature processes without equipment retrofits, but pilot projects remain nascent[7][14]. \n\n### Carbon Capture, Utilization, and Storage (CCUS) \n\nCCUS is indispensable for cement (addressing process emissions) and abates 50% of heavy industry emissions in 2050 scenarios[5][7][14]. Post-combustion capture at cement plants could sequester 90% of emissions, with captured CO₂ utilized in concrete curing or algal biofuels[3][22]. However, costs vary geographically: plants within 200 km of storage sites incur $60–80/ton capture costs, rising to $160/ton beyond 750 km due to transport[20][22]. Current global CCUS capacity must scale 14-fold to meet 2050 targets, requiring $200–$250 billion investment for steel and cement alone[15][20]. Utilization pathways like CO₂-to-methanol offer revenue streams but face scalability challenges; only CarbonCure's mineralized CO₂ in concrete (2–5% emissions reduction) approaches commercialization[15][21]. \n\n### Innovative Production Processes and Materials \n\nBreakthrough production processes could disrupt emission-intensive conventional methods. Hydrogen-based steelmaking (H₂-DRI) is scaling rapidly, with projects like HYBRIT in Sweden targeting commercial operation by 2026[17]. For cement, alternatives include Brimstone's carbon-negative process using calcium silicate instead of limestone, avoiding process emissions entirely, and electric recycled cement inspired by steel recycling chemistry[10][18]. Chemical sector innovations encompass biomass-based ethylene crackers and methanol synthesis from green hydrogen[32][35]. Novel materials also contribute: graphene-reinforced concrete could lower cement content 30%, while advanced alloys extend steel lifespan in construction[2][6]. However, 60% of required technologies remain at prototype stage, necessitating $1.4 trillion in R&D and deployment capital by 2050[5][15][16]. \n\n## Sector-Specific Decarbonization Analysis \n\nIndustrial decarbonization strategies must address sector-specific constraints: steel requires hydrogen or CCUS retrofits; cement needs CCUS due to process chemistry; chemicals depend on green feedstocks; and mining favors electrification. Steel decarbonization leverages hydrogen-based DRI or CCUS-equipped blast furnaces, with regional variations; the G7 prioritizes hydrogen routes, while China favors CCUS retrofits[8][17]. Cement pathways hinge on clinker substitution (30–50% reductions) and CCUS deployment, though costs risk doubling cement prices to $160–240/ton[20][22][23]. Chemical decarbonization for ammonia and methanol focuses on renewable hydrogen, necessitating $440 billion–$1.1 trillion in electrolyzer investments[32][35]. Mining electrification offers the most mature route, with battery-electric equipment already reducing emissions 50–70% at operational mines[33][36][38]. \n\n### Iron and Steel Industry Pathways \n\nThe iron and steel sector emits 3.4 gigatons of CO₂ annually (7% of global emissions), requiring $1.4 trillion investment to achieve net-zero by 2050[15]. Near-term priorities include energy efficiency (top-gas recovery turbines saving 20–30% energy) and material efficiency (lightweight design, scrap-based production)[17][37]. By 2030, electric arc furnaces (EAF) fed by recycled scrap could produce 30% of global steel, cutting emissions 45–60% compared to blast furnaces[15][17]. Long-term, hydrogen-based DRI offers zero-emission primary steel, with projects like Sweden's H2 Green Steel pioneering 5 million-ton plants by 2030[17]. Cost remains a barrier: green steel carries a $100–200/ton premium, potentially mitigated by carbon contracts for difference guaranteeing €52–100/ton CO₂[17][27]. The G7 leads deployment, targeting 20% hydrogen-based production by 2030—twice the global average—supported by infrastructure for low-emission hydrogen[5][8][19]. \n\n### Cement and Concrete Decarbonization \n\nCement production emits 8% of global CO₂, with 60% from limestone calcination (CaCO₃ → CaO + CO₂)[18][21][23]. Decarbonization leverages three pillars: clinker substitution (30–50% reductions using fly ash or slag), alternative fuels (bioenergy covering 40% thermal needs), and CCUS (essential for residual emissions)[7][20][22]. Innovative processes include Brimstone's carbon-negative Ordinary Portland Cement and Solidia's reduced-temperature chemistry, both nearing commercialization[10][22]. However, CCUS dominates net-zero pathways; the IEA projects 12% of G7 cement production will integrate CCUS by 2030, rising to 65% by 2050[8][20]. Economic challenges include abatement costs of $160/ton CO₂ for CCUS and potential cement price increases to $160–240/ton, risking affordability without policy support[20][22][23]. Public procurement mandates for low-carbon concrete could create markets, while CBAM addresses carbon leakage[18][28]. \n\n### Chemical Sector Transformation \n\nChemicals—notably ammonia, methanol, ethylene—emit 1.4 gigatons annually, with 75% from fossil feedstocks[32][35]. Ammonia decarbonization centers on renewable hydrogen via electrolysis, increasing capital costs fourfold versus steam methane reforming but eliminating 90% of emissions[35]. Methanol pathways include biomass gasification or e-methanol from green hydrogen and captured CO₂[32]. For olefins (ethylene/propylene), electrified steam crackers and bioethanol-to-ethylene routes could abate 70% of emissions at $900 billion–$1.5 trillion investment[32]. Sector-wide, the EU requires €1 trillion for net-zero transformation, including €400–600 billion for eight major chemicals, with operating costs rising 25–40%[35]. Demand-side policies like product standards rewarding recycled content (e.g., 50% recycled polymers) are essential to offset production costs[26][32][35]. \n\n### Mining Industry Electrification \n\nMining contributes 4–7% of global emissions, predominantly from diesel mobile equipment (40–50%) and electricity consumption (30–40%)[33][36]. Decarbonization prioritizes electrification: battery-electric haul trucks improve drivetrain efficiency from 30% to 90%, reducing energy use 60–70% per ton mined[33][38]. Full electrification—exemplified by Boliden's Kevitsa mine—could eliminate 80% of scope 1 emissions and halve ventilation needs underground[33][36][38]. Supporting infrastructure requires doubling on-site renewable capacity and grid connectivity; Chilean copper mines are piloting solar-battery systems to power 300-ton electric trucks[33][36]. Alternative fuels like hydrogen may address residual diesel needs, but proton-exchange membrane fuel cells remain costly (~$1,500/kW). The Electric Mine Consortium—uniting 15 mining companies—targets zero-emission operations by 2040 through shared R&D on charging systems and energy management[38]. \n\n## Policy Frameworks and Governance Mechanisms \n\nEffective decarbonization demands policy packages combining \"push\" measures (subsidies, standards) with \"pull\" mechanisms (procurement, carbon pricing). Carbon pricing alone proves insufficient; €81/ton CO₂ in Europe drives only 34% cement emissions reduction, requiring €155/ton for near-full abatement[18][23]. Carbon contracts for difference de-risk early projects by guaranteeing strike prices, as Germany's H2Global program does for green steel[17][27]. International alignment is critical: the Breakthrough Agenda coordinates 25 actions across power, hydrogen, and steel sectors, harmonizing definitions like \"near-zero emission steel\" to accelerate investment[4][12][19]. Border measures like CBAM prevent carbon leakage but must be paired with domestic decarbonization funding to maintain competitiveness[19][28][39]. National strategies vary; Australia funds industrial hub modeling via CSIRO, while the U.S. Inflation Reduction Act provides tax credits covering 30% of CCUS costs[1][24][29]. \n\n### National and Regional Policy Instruments \n\nNational policies must create \"level playing fields\" for low-carbon materials through investment stimuli and regulatory certainty. The U.S. employs production tax credits ($85/ton for green hydrogen) and DOE grants funding 50% of first-of-a-kind projects, catalyzing 90 net-zero industrial projects[24][32]. The EU combines carbon pricing (€80–100/ton ETS) with CBAM to shield industries, though free allowance phaseouts risk competitiveness without scaling alternatives[18][28]. China prioritizes CCUS retrofits for steel and cement, leveraging state-owned enterprise investments, while Australia's HILT CRC develops tailored energy mix models for Pilbara and Spencer Gulf hubs[1][5][29]. Common challenges include green premium compensation; carbon contracts for difference—guaranteeing $100–150/ton CO₂ abatement—could bridge this gap for hydrogen steel[17][27]. Material efficiency policies are underutilized; ecodesign standards for buildings (steel intensity) or packaging (plastic recyclability) could reduce primary demand 15%[9][26]. \n\n### International Cooperation Frameworks \n\nGlobal alignment prevents fragmentation and scales technology cost reductions through shared learning. The G7 leads through coordinated definitions: \"near-zero emissions\" cement must emit <0.1 ton CO₂/ton, with 27% emissions cuts by 2030 versus 18% elsewhere[5][19][39]. Mission Possible Partnership unites 200+ companies in sectoral alliances (e.g., Net-Zero Steel Initiative), providing transition roadmaps validated by producers like ArcelorMittal[17][24]. UNIDO promotes policy packages combining supply-side (renewable energy access) with demand-side (material efficiency standards), particularly for developing economies[26]. Financial institutions enable risk-sharing; the GFANZ network mobilizes $130 trillion toward breakthrough projects, while the Clean Energy Ministerial funds CCUS infrastructure corridors[12][16]. Critically, technology transfer mechanisms—like IP sharing for hydrogen DRI—must balance commercial interests with global equity to avoid a two-track transition[5][16][19]. \n\n### Financing Mechanisms and Investment Catalyzation \n\nHeavy industry decarbonization requires $4–6 trillion cumulative investment by 2050, necessitating blended finance models[5][15][32]. Public funding anchors high-risk projects: the U.S. DOE allocates $6.3 billion for industrial demonstrations, while the EU Innovation Fund offers €40 billion for CCUS hubs[16][24][39]. Private capital follows via offtake agreements; Volvo and Mercedes secured 30–50% green steel premiums through 2030 purchase commitments[17]. Specialized instruments include carbon credits for residual emissions ($250 billion needed for steel) and sustainability-linked loans tying interest rates to emission targets[15][26]. Mining exemplifies collaboration: the Electric Mine Consortium pools resources for charging infrastructure R&D, lowering per-company costs 40%[33][38]. Emerging economies face funding gaps; multilateral development banks must expand concessional finance, with IDA providing $2 billion for Indian steel CCUS[5][16][26]. \n\n## Economic Feasibility and Investment Analysis \n\nHeavy industry decarbonization is technically feasible by 2050 at under 0.5% of global GDP cost, but requires strategic investment sequencing and policy support to manage green premiums[2][9][37]. Near-term actions yield low-cost wins: energy efficiency and material circularity abate 25–30% of emissions at negative to $50/ton CO₂ costs[5][17][22]. By 2030, low-regret technologies—scrap-based steel, clinker substitution—could achieve 10–33% sectoral reductions with minimal consumer impact[17][23]. Post-2030, harder abatement (hydrogen, CCUS) demands $1.1–1.4 trillion annually, with costs concentrated in infrastructure: $200 billion for CO₂ pipelines, $1.1 trillion for renewable hydrogen systems[15][20][32]. Green premiums vary widely: ammonia costs double with green hydrogen, cement rises 40–120%, while recycled aluminum carries just 5–10% premiums[20][25][35]. Carbon pricing above $100/ton closes cost gaps for 75% of solutions, but targeted support prevents regional disparities[18][23][27]. \n\n### Abatement Cost Curves and Green Premiums \n\nMarginal abatement costs span from -$50 to $350/ton CO₂ across technologies and sectors[20][30]. Steel decarbonization averages $115/ton via hydrogen DRI but drops to $25/ton with $20/MWh renewables, while material efficiency cuts costs to $7/ton[13][17]. Cement CCUS costs $160/ton, but clinker substitution saves $20–30/ton[20][22][23]. Green premiums—price differences between conventional and low-carbon products—range from 10% for recycled-content goods to 100% for early green steel[17][20][35]. Policy interventions shrink these: carbon contracts for difference cap premiums at €100/ton steel, while the EU CBAM equalizes import costs[17][27][28]. Long-term, learning curves and renewable cost declines could eliminate premiums; hydrogen electrolysis may fall below $1.50/kg by 2040, making green steel cost-competitive[2][17][37]. \n\n### Capital Requirements and Financing Structures \n\nAchieving net-zero across heavy industry demands cumulative investments of $4–6 trillion by 2050, dominated by infrastructure[5][15][32]. Steel requires $1.4 trillion globally ($250 billion for CCUS), cement $1.1 trillion (60% for CCUS), and chemicals $1.1–$1.5 trillion[15][20][32]. Mining electrification needs $500 billion for equipment and grid upgrades[33][36]. Funding structures include project finance (80% debt for CCUS hubs), corporate PPAs for renewables, and securitization of carbon credits[15][20]. Risk mitigation is critical: the U.S. DOE Loan Guarantees cover 80% of first-of-a-kind project debt, while Australia's CEFC provides concessional loans at 1–3% interest[24][29]. Blended finance taps institutional capital; Norway's Norfund co-invests with private equity in African green ammonia plants, accepting subcommercial returns for development impact[16][32][39]. \n\n### Economic Impacts and Competitiveness Considerations \n\nDecarbonization reshapes industrial geography based on renewable access, storage proximity, and policy support. Cement plants within 200 km of CO₂ storage gain 50% cost advantages, potentially shifting production from inland to coastal sites[20]. Aluminum smelters cluster near hydropower (Canada, Norway), while green steel favors solar/wind-rich regions (Australia, Chile)[17][25]. Trade policies prevent offshoring; the EU CBAM imposes carbon costs on imports, shielding domestic producers during transition[19][28]. Employment effects are mixed: 200,000 jobs may be lost in fossil-dependent industries, but 400,000 created in hydrogen, CCUS, and recycling[17][26]. Developing economies face acute challenges; India's steel decarbonization could raise costs 30%, necessitating Just Transition financing to avoid lock-in[5][16][26]. Conversely, resource-rich nations (Chile, Morocco) could capture $300 billion/year in green hydrogen exports[8][19][32]. \n\n## Regional Case Studies and Implementation Progress \n\n### G7 Leadership and Project Deployment \n\nG7 members—producing 17% of global steel, 8% of cement, and 28% of chemicals—prioritize near-zero emission production as a strategic imperative[5][19][39]. The U.S. leads with 90 commercial-scale projects, including Cleveland-Cliffs' hydrogen DRI plant and Heidelberg Materials' CCUS-equipped cement kiln[24]. Germany pioneers carbon contracts for difference, guaranteeing €100/ton CO₂ for thyssenkrupp's hydrogen steel, while Japan focuses on CCUS-equipped blast furnaces[17][27]. By 2030, the G7 targets 10–20% market share for near-zero materials, doubling the global average, supported by infrastructure like Germany's H2ercules hydrogen network[5][19][39]. Challenges persist: free allowance phaseouts under ETS could raise production costs 20%, requiring CBAM to maintain competitiveness[19][28]. \n\n### Australian Industrial Hubs \n\nAustralia leverages renewable abundance to model optimized decarbonization pathways for Pilbara, Kwinana, and Upper Spencer Gulf hubs[1][29]. CSIRO's Model-Based Systems Engineering (MBSE) approach simulates energy flows—electricity, hydrogen, heat—across interconnected industries, identifying cost-optimal mixes[1][29]. Pilbara's iron ore mines could integrate 10 GW solar to power onsite electrolysis, supplying hydrogen for DRI plants and ammonia exports[1][33]. Kwinana's alumina refineries may use mechanical vapor recompression (cutting energy 60%) and supply residue to cement plants[1][3]. The HILT CRC project quantifies energy costs at five-year increments to 2050, informing government infrastructure investments and industry transition planning[1][29]. Regional advantages include low-cost renewables (<$20/MWh) and existing export infrastructure, potentially enabling $50/ton green iron competitive with conventional imports[1][25][29]. \n\n### European Union Policy Integration \n\nThe EU combines regulatory drivers (ETS, CBAM) with innovation funding to accelerate heavy industry transition[18][27][28]. ETS carbon prices (€80–100/ton) drive near-term efficiency, while the Innovation Fund's €40 billion supports first-commercial projects like HYBRIT hydrogen steel[17][18]. CBAM, applied to cement and steel imports, levels carbon costs while free allowances phase out by 2034[28]. Circular economy policies—Ecodesign for durability and recycled content quotas—could reduce primary steel demand 15% and cement 10%[17][26]. National nuances emerge: Sweden's HYBRIT leverages hydropower for hydrogen, while France targets nuclear-powered electrolysis[17][35]. However, fragmentation risks persist; unified definitions for \"low-carbon cement\" (embedded CO₂ <0.1 ton/ton) and cross-border CO₂ networks require further harmonization[19][20][26]. \n\n## Conclusion: Synthesis and Forward-Looking Recommendations \n\nHeavy industry decarbonization is technically feasible by 2050 but demands unprecedented coordination across technology, policy, and finance domains. Core pathways include hydrogen-based steelmaking, CCUS-equipped cement plants, chemical feedstocks from electrolysis, and mining electrification—collectively reducing emissions 90–95% from current levels[5][8][17][20]. Economic viability hinges on managing $1.1–1.4 trillion annual investments and sector-specific green premiums through carbon contracts for difference, public procurement, and infrastructure co-funding[17][20][27]. Policy must prioritize five areas: harmonizing \"near-zero\" definitions internationally to prevent fragmentation, scaling carbon management infrastructure via public-private partnerships, embedding circularity in product standards to reduce primary demand, securing concessional finance for emerging economies, and establishing just transition mechanisms for workforce reskilling[5][19][26][39]. Immediate actions—deploying 200+ commercial-scale hydrogen or CCUS projects by 2030—could halve emissions growth trajectories while driving cost reductions through learning curves[8][16][24]. Without accelerated efforts, hard-to-abate sectors risk consuming 35% of the remaining carbon budget by 2050, making industry decarbonization not just an environmental imperative but an economic necessity for sustainable development[2][9][37]."\ },\ "delta": {\ "role": "assistant",\ "content": ""\ }\ }\ ] } See all 266 lines For research-intensive tasks that may take longer to process, you can use the async API. This allows you to submit a request and retrieve the results later. 1 Submit Request cURL Python Copy Ask AI curl --location 'https://api.perplexity.ai/async/chat/completions' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "request": { "model": "sonar-deep-research", "messages": [\ {\ "role": "user",\ "content": "Provide an in-depth analysis of the impact of AI on global job markets over the next decade."\ }\ ] } }' | jq **Sample Response (Request Submission)** Copy Ask AI { "id": "784312ac-b8fd-405f-99fa-9bcbf48865bb", "model": "sonar-deep-research", "created_at": 1748565663, "started_at": null, "completed_at": null, "response": null, "failed_at": null, "error_message": null, "status": "CREATED" } 2 Retrieve Results cURL Python Poll Until Completion Copy Ask AI curl --location 'https://api.perplexity.ai/async/chat/completions/{REPLACE_WITH_REQUEST_ID}' \ --header "Authorization: Bearer " Async requests have a time-to-live (TTL) of 7 days. After this period, the request and its results will no longer be accessible. ⌘I --- # Page Not Found [Skip to main content](https://docs.perplexity.ai/faq/changelog/changelog#content-area) Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Page Not Found 404 Page Not Found ============== We couldn't find the page. Maybe you were looking for one of these pages below? [Changelog](https://docs.perplexity.ai/changelog/changelog#) [Search Domain Filter](https://docs.perplexity.ai/guides/search-domain-filter-guide#examples) [Perplexity Search API](https://docs.perplexity.ai/guides/search-quickstart#domain-filtering-for-search-results) ⌘I --- # Page Not Found [Skip to main content](https://docs.perplexity.ai/guides/model-cards#content-area) Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Page Not Found 404 Page Not Found ============== We couldn't find the page. Maybe you were looking for one of these pages below? [Models](https://docs.perplexity.ai/getting-started/models#) [Prompt Guide](https://docs.perplexity.ai/guides/prompt-guide#) [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide#next-steps) ⌘I --- # Page Not Found [Skip to main content](https://docs.perplexity.ai/guides/stream-mode-guide#content-area) Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Page Not Found 404 Page Not Found ============== We couldn't find the page. Maybe you were looking for one of these pages below? [Stream Mode: Concise vs Full](https://docs.perplexity.ai/guides/pro-search-stream-mode-guide#) [Academic Filter Guide](https://docs.perplexity.ai/guides/academic-filter-guide#academic-filter-guide) [SEC Filings Filter Guide](https://docs.perplexity.ai/guides/sec-guide#) ⌘I --- # Page Not Found [Skip to main content](https://docs.perplexity.ai/guides/pro-search-agentic-tools#content-area) Search docs ⌘K * [Forum](https://community.perplexity.ai/) * [Blog](https://perplexity.ai/blog) * [Changelog](https://docs.perplexity.ai/changelog/changelog) ##### Getting Started * [Overview](https://docs.perplexity.ai/getting-started/overview) * [Pricing](https://docs.perplexity.ai/getting-started/pricing) * [Perplexity MCP Server](https://docs.perplexity.ai/guides/mcp-server) ##### Perplexity SDK * [Quickstart](https://docs.perplexity.ai/guides/perplexity-sdk) * Guides ##### Search * [Quickstart](https://docs.perplexity.ai/guides/search-quickstart) * [Best Practices](https://docs.perplexity.ai/guides/search-best-practices) * Search and Filtering ##### Grounded LLM * [Quickstart](https://docs.perplexity.ai/getting-started/quickstart) * [Models](https://docs.perplexity.ai/getting-started/models) * Pro Search * [Chat Completions SDK](https://docs.perplexity.ai/guides/chat-completions-sdk) * [OpenAI Compatibility](https://docs.perplexity.ai/guides/chat-completions-guide) * Prompting & Output Control * Search & Filtering * Working with Attachments ##### Admin * [API Groups & Billing](https://docs.perplexity.ai/getting-started/api-groups) * [API Key Management](https://docs.perplexity.ai/guides/api-key-management) * [Rate Limits & Usage Tiers](https://docs.perplexity.ai/guides/rate-limits-usage-tiers) ##### Help & Resources * [Changelog](https://docs.perplexity.ai/changelog/changelog) * [Get in Touch](https://docs.perplexity.ai/discussions/discussions) * [API Roadmap](https://docs.perplexity.ai/feature-roadmap) * [Frequently Asked Questions](https://docs.perplexity.ai/faq/faq) * [System Status](https://docs.perplexity.ai/status/status) * [Privacy & Security](https://docs.perplexity.ai/guides/privacy-security) * [Perplexity Crawlers](https://docs.perplexity.ai/guides/bots) [Perplexity home page![light logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=78a7baffae224c1a8db2616f1547ff5d)![dark logo](https://mintcdn.com/perplexity/ydog55Ez6JQ_5Px7/logo/Perplexity_API_Platform_Light.svg?fit=max&auto=format&n=ydog55Ez6JQ_5Px7&q=85&s=d20039b09af08a25f5bf6c497f549e2e)](https://docs.perplexity.ai/getting-started/overview) [Docs](https://docs.perplexity.ai/getting-started/overview) [Examples](https://docs.perplexity.ai/cookbook) [API Reference](https://docs.perplexity.ai/api-reference/search-post) Search... Navigation Page Not Found 404 Page Not Found ============== We couldn't find the page. Maybe you were looking for one of these pages below? [API Roadmap](https://docs.perplexity.ai/feature-roadmap#pro-search-public-release) [Built-in Tool Capabilities](https://docs.perplexity.ai/guides/pro-search-tools#) [Pricing](https://docs.perplexity.ai/getting-started/pricing#pro-search-pricing-pro-search-for-sonar-pro) ⌘I ---