New to Exa? Try the Coding Agent Quickstart
to get started in under a minute.
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 | Traditional chat interface |
/responses | Responses API | exa-agent | Agent API (async research, enrichment, list-building) |
/chat/completions routes to /answer. /responses routes to the Agent API — see Agent via Responses API below.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.Need custom behavior when routing through
/answer? Contact us at hello@exa.ai and we can help tailor the integration.Agent via Responses API
Exa’s/responses endpoint provides OpenAI Responses API compatibility for the Agent API. Runs are asynchronous — set background: true and poll GET /responses/{id} for the result.
The
/responses surface maps directly to the Agent API. For the full Agent API reference and examples, see the Agent 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.