Perplexity AI
Perplexity AI is an AI-powered search engine and conversational AI platform that provides accurate, real-time answers by searching the web and synthesizing information. The Perplexity AI connector enables you to generate responses using Perplexity's Chat Completions API, allowing you to leverage Perplexity's advanced search and reasoning capabilities for building AI-powered applications. This connector is particularly useful for applications that need to integrate real-time web search, build question-answering systems, create AI assistants with up-to-date information, or leverage Perplexity's advanced reasoning for complex queries.
Power end-to-end data operations for your Perplexity AI API with Nexla. Our bi-directional Perplexity AI connector is purpose-built for Perplexity AI, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Perplexity AI or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Perplexity AI workflows fast, secure, and fully governed.
Features
Type: API
- Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
- Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
- API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
- Request optimization with intelligent batching, retry, and caching to minimize API calls and costs
Prerequisites
Before creating a Perplexity AI credential, you'll need to obtain an API key from your Perplexity AI account. Perplexity provides API keys for programmatic access to their Chat Completions API through the Perplexity API platform.
To obtain a Perplexity AI API key:
-
Log in to your Perplexity AI account at
https://www.perplexity.aior navigate to the Perplexity API dashboard. -
Navigate to your account settings or API dashboard. This is typically accessible from the user menu or dashboard navigation.
-
In the API settings or API Keys section, locate the option to create or manage API keys.
-
Click Create API Key or Generate New Key to create a new API key for your application. You may need to provide a name or description for the API key.
-
Copy the API key immediately after generation, as it may only be displayed once for security purposes. Store it securely, as you'll need it to authenticate API requests.
Perplexity AI API keys are used as Bearer tokens in the Authorization header for all API requests. The API key is sensitive information and should be kept secure. If you've lost your API key, you'll need to generate a new one in your Perplexity AI account settings.
For detailed information about Perplexity AI API authentication and API key management, refer to the Perplexity AI API Documentation.
Authenticate
Credentials required
| Field | Required | Secret | Description |
|---|---|---|---|
| API Key | Yes | Yes | Perplexity-provided secret API key |
| Base URL | Yes | No | The base URL for the Perplexity API. |
| API Version | Yes | No | Chat completions payload to test a connection |
Create a credential in Nexla
- After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
New Credential Overlay – Perplexity AI

-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
-
Enter the API key that you obtained from your Perplexity AI account in Prerequisites in the API Key field. This is the secret API key used to authenticate requests to the Perplexity AI API.
-
Enter the base URL for the Perplexity AI API in the Base URL field. The default value is
https://api.perplexity.ai, which is the standard base URL for Perplexity AI API services. You can specify a different base URL if your organization uses a custom endpoint. -
In the API Version field (labeled as "Chat completions payload to test a connection"), enter a sample JSON payload to test the connection. A default payload is provided:
{
"model": "sonar",
"messages": [
{
"role": "system",
"content": "Be precise and concise."
},
{
"role": "user",
"content": "How many stars are there in our galaxy?"
}
]
}The API key is sensitive information and should be kept secure. If you've lost your API key, you'll need to generate a new one in your Perplexity AI account settings. API keys are used as Bearer tokens in the Authorization header for all API requests.
-
Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.
Use as a data source
To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Perplexity AI connector tile, then select the credential that will be used to connect to the Perplexity AI API, and click Next; or, create a new Perplexity AI credential for use in this flow.
Endpoint templates
Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Perplexity AI API endpoints. Each template is designed specifically for the corresponding Perplexity AI API endpoint, making data source setup easy and efficient. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.
Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.
Manual configuration
Perplexity AI data sources can also be manually configured to ingest data from any valid Perplexity AI API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.
Perplexity AI API endpoints typically follow the pattern {base_url}/chat/completions, where {base_url} is typically https://api.perplexity.ai, and most endpoints use the POST method. For the Path to Data, common paths include $.choices[*].message for arrays of completion messages or $ for the entire response. The request body must be valid JSON matching the Perplexity AI API's expected format — typically a model field (e.g., "sonar"), a messages array with system and user messages, and optionally temperature, top_p, and max_tokens. The Authorization header with your Bearer token is automatically included from your credential. Refer to the Perplexity AI API Documentation for the complete list of supported parameters.
Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Perplexity AI data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.