Setting Up Exa as a Custom Provider
To use Exa models in PromptLayer:- Navigate to Settings → Custom Providers and Models in your PromptLayer dashboard
- Click Create Custom Provider
- Configure the provider with the following details:
- Name: Exa (or your preferred name)
- Client: OpenAI
- Base URL:
https://api.exa.ai - API Key: Your Exa API key (get one at exa.ai)
Exa uses OpenAI-compatible endpoints, which is why we select OpenAI as the client type.
Creating Custom Models (Recommended)
For easier model selection in the Playground and Prompt Registry, you can create custom models:- In Settings → Custom Providers and Models, find your Exa provider in the list
- Click on the Exa row to expand it
- Click Create Custom Model
- Configure each model:
- Provider: Select the Exa provider you created
- Model Name: Enter the Exa model identifier (e.g.,
exa,exa-research) - Display Name: A friendly name like “Exa Answer” or “Exa Research”
- Model Type: Chat
- Repeat for each model you want to use
Available Models
Exa regularly updates their model offerings. Example models include:exa: Fast answer generation with web searchexa-research: In-depth research with comprehensive citationsexa-research-pro: Advanced research capabilities
Using Exa in PromptLayer
In the Playground
After setup, you can use Exa models in the PromptLayer Playground:- Open the Playground
- Select your Exa provider from the provider dropdown
- Choose your desired Exa model
- Start querying with your prompts
In the Prompt Registry
Exa models work seamlessly with PromptLayer’s Prompt Registry:- Select Exa models when creating or editing prompt templates
- Use templates with Exa models in evaluations
- Track and analyze Exa API usage alongside other providers
Key Features
Exa models in PromptLayer support:- Citations: Exa responses include source citations for research and fact-checking
- Research Capabilities: Deep web search for comprehensive answers
- Web Search Integration: Real-time access to current web information
SDK Usage
Once you’ve set up your Exa custom provider and created a prompt template in the dashboard, you can run it programmatically with the PromptLayer SDK:Using
promptlayer.run() ensures your requests are properly logged to PromptLayer and leverages your prompt templates from the Prompt Registry. This is the recommended approach for production use.
