# 取得針對問題的直接、附引用回答。

**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
{}
```
