Skip to main content
POST
获得针对某个问题的带引用直接答案。
提出一个自然语言 query,返回一个基于检索来源的直接 answer,并同时给出支撑它的 citations。用 type 控制收集来源时使用的检索模式,用 text 让每条引用附带完整页面正文。 提供 outputSchema 可以得到结构化的答案对象,而不是纯字符串。每次成功请求固定计费 $0.08;上游 4xx 响应不计费。如果需要原始搜索结果而不是合成答案,请使用 post_exa-search;如需深度多步研究,请使用 post_exa-agent-runs

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
query
string
必填

要回答的问题。

示例:

"Which manufacturers had the top three global EV sales in 2025?"

text
boolean

包含每条引用的完整页面文本。

type
enum<string>

作答前用于收集来源的检索模式。

可用选项:
auto,
fast,
instant,
deep-lite,
deep,
deep-reasoning
outputSchema
object

用于结构化答案输出的 JSON Schema。

响应

200 - application/json

答案生成成功。

requestId
string
answer
any | null

生成的答案。为字符串;当提供了 outputSchema 时为结构化对象。

citations
object[]

支撑该答案的来源。

costDollars
any | null

上游 Exa 的成本明细。仅供参考;客户计费为固定 $0.08。