获得针对某个问题的带引用直接答案。
curl --request POST \
--url https://api.aisa.one/apis/v1/exa/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "Which manufacturers had the top three global EV sales in 2025?",
"text": true,
"outputSchema": {}
}
'import requests
url = "https://api.aisa.one/apis/v1/exa/answer"
payload = {
"query": "Which manufacturers had the top three global EV sales in 2025?",
"text": True,
"outputSchema": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'Which manufacturers had the top three global EV sales in 2025?',
text: true,
outputSchema: {}
})
};
fetch('https://api.aisa.one/apis/v1/exa/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/exa/answer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'Which manufacturers had the top three global EV sales in 2025?',
'text' => true,
'outputSchema' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/exa/answer"
payload := strings.NewReader("{\n \"query\": \"Which manufacturers had the top three global EV sales in 2025?\",\n \"text\": true,\n \"outputSchema\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/exa/answer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"Which manufacturers had the top three global EV sales in 2025?\",\n \"text\": true,\n \"outputSchema\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/exa/answer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"Which manufacturers had the top three global EV sales in 2025?\",\n \"text\": true,\n \"outputSchema\": {}\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"answer": "<unknown>",
"citations": [
{
"id": "<string>",
"url": "<string>",
"title": "<string>",
"author": "<string>",
"publishedDate": "<string>",
"text": "<string>"
}
],
"costDollars": "<unknown>"
}搜索 API
Exa Answer
提一个问题,拿回一段带引用的答案。
POST
https://api.aisa.one/apis/v1
/
exa
/
answer
获得针对某个问题的带引用直接答案。
curl --request POST \
--url https://api.aisa.one/apis/v1/exa/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "Which manufacturers had the top three global EV sales in 2025?",
"text": true,
"outputSchema": {}
}
'import requests
url = "https://api.aisa.one/apis/v1/exa/answer"
payload = {
"query": "Which manufacturers had the top three global EV sales in 2025?",
"text": True,
"outputSchema": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'Which manufacturers had the top three global EV sales in 2025?',
text: true,
outputSchema: {}
})
};
fetch('https://api.aisa.one/apis/v1/exa/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/exa/answer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'Which manufacturers had the top three global EV sales in 2025?',
'text' => true,
'outputSchema' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/exa/answer"
payload := strings.NewReader("{\n \"query\": \"Which manufacturers had the top three global EV sales in 2025?\",\n \"text\": true,\n \"outputSchema\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/exa/answer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"Which manufacturers had the top three global EV sales in 2025?\",\n \"text\": true,\n \"outputSchema\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/exa/answer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"Which manufacturers had the top three global EV sales in 2025?\",\n \"text\": true,\n \"outputSchema\": {}\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"answer": "<unknown>",
"citations": [
{
"id": "<string>",
"url": "<string>",
"title": "<string>",
"author": "<string>",
"publishedDate": "<string>",
"text": "<string>"
}
],
"costDollars": "<unknown>"
}提一个问题,拿回一段带引用的答案。
query 必填;text 会带上来源正文,outputSchema 可以约束结构化输出。返回 requestId、成段的 answer、citations[](含 id、title、url)和 costDollars。实测 2.1 秒、8 条引用。按次固定计费 $0.08。它介于搜索和研究之间:比 post_exa_agent_runs 更快更便宜,又比自己去读 post_exa_search 的结果更直接。post_perplexity_sonar 回答同一类问题只要 $0.012 —— 当检索本身需要语义匹配时才选 Exa。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json