RAG Quick Start Guide
OpenAI Chat Completions
Use Exa’s /chat/completions endpoint as a drop-in replacement for your OpenAI chat completions code.
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.