# Exa Question Answering API

> Returns direct answers and cited web sources for a given query. Supports custom retrieval modes, optional full page text, and structured schema definitions.

Source: https://www.sandbase.ai/apis/exa/answer
API reference: https://www.sandbase.ai/apis/exa/answer/docs

## Facts

- Provider: Exa
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/exa/answer`
- Price: $0.0075 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: web search, question answering
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/exa/answer` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string | yes |  |
| `type` | string | no | auto, fast, instant, deep-lite, deep, deep-reasoning |
| `text` | boolean | no |  |
| `outputSchema` | object | no |  |

## FAQ

### How do I use the Exa Question Answering API?

Send a POST request to https://api.sandbase.ai/v1/api/exa/answer with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Exa Question Answering API cost?

$0.0075 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Exa Question Answering API accept?

Required: query (string). Optional: type (one of auto, fast, instant, deep-lite, deep, deep-reasoning), text (boolean) and outputSchema (object). The Parameters table and the Playground on this page list every field.

### What does the Exa Question Answering API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a Exa developer account or API key?

No. Exa Question Answering runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Exa API access separately.

## README

### Exa Question Answering API

Provides answers accompanied by cited web sources based on a submitted `query`. It supports tuning the retrieval mode via `type` and structuring the output with `outputSchema`.

#### Use cases

- Retrieve cited answers to factual questions.
- Extract full-text web references alongside synthesized answers.
- Format answers into structured JSON schemas for automated workflows.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/exa/answer" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "OpenAI"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `query` | string | Yes | The question to answer. |
| `text` | boolean | No | Include the full page text of each citation. |
| `type` | string | No | Retrieval mode used to gather sources before answering. |
| `outputSchema` | object | No | JSON Schema for a structured answer output. |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "citations": [
    {
      "id": "https://en.wikipedia.org/wiki/_OpenAI",
      "title": "OpenAI",
      "url": "https://en.wikipedia.org/wiki/_OpenAI"
    }
  ]
}
```

#### Notes

- The `type` parameter configures retrieval behavior across modes such as auto, fast, instant, deep-lite, deep, or deep-reasoning.
- Set `text` to true to include the complete page text for each returned citation.
- Supply `outputSchema` with a JSON schema to receive structured answer outputs.
