Overview
Exa provides OpenAI-compatible endpoints that work seamlessly with the OpenAI SDK:Endpoint | OpenAI Interface | Models Available | Use Case |
---|---|---|---|
/chat/completions | Chat Completions API | exa , exa-research , exa-research-pro | Traditional chat interface |
/responses | Responses API | exa-research , exa-research-pro | Modern, simplified interface |
Exa will parse through your messages and send only the last message to
/answer
or /research
.Answer
To use Exa’s/answer
endpoint via the chat completions interface:
- Replace base URL with
https://api.exa.ai
- Replace API key with your Exa API key
- Replace model name with
exa
.
See the full
/answer
endpoint reference here.Research
To use Exa’s research models via the chat completions interface:- Replace base URL with
https://api.exa.ai
- Replace API key with your Exa API key
- Replace model name with
exa-research
orexa-research-pro
See the full
/research
endpoint reference here.Research via Responses API
You can also access Exa’s research models using OpenAI’s newer Responses API format:The Responses API provides a simpler interface for single-turn research tasks.
For more details on using Exa with OpenAI’s Responses API, including web
search tool integration, see the OpenAI Responses API
guide.
Chat Wrapper
Exa provides a Python wrapper that automatically enhances any OpenAI chat completion with RAG capabilities. With one line of code, you can turn any OpenAI chat completion into an Exa-powered RAG system that handles search, chunking, and prompting automatically.exa.search()
function.