Perplexity API OpenAI Compatibility: What Is Supported

Developers building AI-powered applications often ask whether the Perplexity API works with tools and libraries built for OpenAI. The Perplexity API is designed to be compatible with the OpenAI client libraries and API format, making migration or integration simpler. This article explains exactly which OpenAI features are supported by the Perplexity API and which are … Read more

How to Switch Perplexity API Model in a Single Request

Perplexity offers several AI models through its API, including llama-3.1-sonar-small-128k-online, llama-3.1-sonar-large-128k-online, and llama-3.1-sonar-huge-128k-online. Each model has different capabilities in terms of speed, cost, and answer quality. You may need to switch between these models for different tasks such as quick lookups versus deep research. This article explains how to specify the model parameter in a … Read more

How to Use Perplexity API With Node.js Client

You want to integrate Perplexity’s search and AI capabilities into your Node.js application. The Perplexity API provides programmatic access to the same large language models that power the Perplexity web app, enabling you to build custom search tools, chatbots, and automation workflows. This article explains how to set up a Node.js client, authenticate your requests, … Read more