# 获取针对问题的直接、带引用回答。

**API:** Data API

**Endpoint:** `POST /v1/beta/exa/answer`

**Tags:** Exa

提出问题并获得带引用的书面回答。`query` 为必填；`text` 包含源文本，`outputSchema` 用于塑造结构化回复。返回 `requestId`、散文形式的 `answer`、包含 `id`、`title` 和 `url` 的 `citations[]`，以及 `costDollars`。

### 计费参考

- 计量方式：按上报的响应成本计量。
- 参考请求估算：0.005 美元。
- 参考客户倍率：1.0。不得对已结算的客户金额再次应用。

仅供参考的元数据，不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **yes**

### application/json

Schema:

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "要回答的问题。",
      "example": "Which manufacturers had the top three global EV sales in 2025?"
    },
    "text": {
      "type": "boolean",
      "description": "包含每条引用的完整页面文本。"
    },
    "type": {
      "type": "string",
      "enum": [
        "auto",
        "fast",
        "instant",
        "deep-lite",
        "deep",
        "deep-reasoning"
      ],
      "description": "回答前用于收集来源的检索模式。"
    },
    "outputSchema": {
      "type": "object",
      "description": "用于结构化回答输出的 JSON Schema。"
    },
    "stream": {
      "default": false,
      "enum": [
        false
      ],
      "type": "boolean"
    }
  },
  "required": [
    "query"
  ]
}
```

## Responses

### 200 — 回答生成成功。

Headers:
- `X-Request-Id` (string) — 联系 Felo 支持时需提供的请求标识符。

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "requestId": {
      "type": "string"
    },
    "answer": {
      "description": "生成的回答。为字符串；提供 outputSchema 时为结构化对象。"
    },
    "citations": {
      "type": "array",
      "description": "支持回答的来源。",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "publishedDate": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        }
      }
    },
    "costDollars": {
      "description": "资源使用的提供方成本明细。仅供参考；不是 Felo 客户扣费或 Felo 账单凭证。"
    }
  }
}
```

### 400 — 无法处理该请求。请检查请求参数。

### 401 — 需要有效的 Felo API 密钥。

### 402 — 由于未满足计费要求，请求无法继续。

### 403 — 该账户无权执行此操作。

### 429 — 已达到请求或支出限额。

### 502 — 服务无法完成该请求。

### 503 — API 或计费服务暂时不可用。

### 504 — 服务在处理请求时超时。

### default — 错误响应；上游透传响应可能采用提供方格式

**application/json**

Schema:

```json
{}
```
