In a previous video, WesGPT explored Perplexity AI’s chat interface, but this video dives into its API features. He demonstrates how to connect Perplexity’s API to a Bubble app to scrape web pages and access the latest news. Starting with adding a payment method in Perplexity AI, he generates API keys and discusses the supported models, including Llama 3. The pricing is highlighted as economical, especially for online models that search the web.
He sets up the API with a chat completions endpoint, using a Bubble app’s API connector plugin. After configuring headers for authorization and content type, he initializes a call to test the setup. The API successfully returns live data, such as recent NBA game results, showcasing its ability to fetch current information.
WesGPT further tests the API’s ability to read URLs and summarize web pages. By creating a Bubble page with input fields for system messages and URLs, he demonstrates how the API can summarize an ESPN article about the NBA Finals. The API accurately extracts specific details from the article, proving its capability to read and summarize web content effectively.
He suggests potential applications for Perplexity API, like enhancing SEO by fetching and rewriting content from RSS feeds. The video concludes with an invitation to explore more videos and courses on building custom AI apps and integrating Perplexity API into workflows.