轮询研究型 Agent 任务。
curl --request GET \
--url https://api.aisa.one/apis/v1/exa/agent/runs/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}', 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/agent/runs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "iaj_01HZY8Q2M4K7N9V3T6W1X0B2C3",
"object": "integration_async_job",
"endpoint": "/apis/v1/exa/agent/runs",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"pricing": {
"currency": "USD",
"authorizedMicrosUSD": 123,
"finalMicrosUSD": 123,
"billingMode": "flat_per_call"
},
"output": "<unknown>",
"outputExpired": true,
"error": {
"code": "<string>",
"message": "<string>"
}
}搜索 API
轮询 Agent 运行
按 jobId 取回 post_exa_agent_runs 提交的 Agent 运行。
GET
https://api.aisa.one/apis/v1
/
exa
/
agent
/
runs
/
{jobId}
轮询研究型 Agent 任务。
curl --request GET \
--url https://api.aisa.one/apis/v1/exa/agent/runs/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}', 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/agent/runs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/exa/agent/runs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "iaj_01HZY8Q2M4K7N9V3T6W1X0B2C3",
"object": "integration_async_job",
"endpoint": "/apis/v1/exa/agent/runs",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"pricing": {
"currency": "USD",
"authorizedMicrosUSD": 123,
"finalMicrosUSD": 123,
"billingMode": "flat_per_call"
},
"output": "<unknown>",
"outputExpired": true,
"error": {
"code": "<string>",
"message": "<string>"
}
}按
jobId 取回 post_exa_agent_runs 提交的 Agent 运行。返回同一个信封 —— id、status、createdAt、completedAt、pricing、output、error。反复轮询直到 status 为 completed、failed 或 cancelled;成功时 output 含 text、structured 和 grounding。只读取运行,不能发起运行。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路径参数
提交调用返回的任务 id。
响应
200 - application/json
该研究任务的当前状态。
一个异步集成任务。由提交调用(HTTP 202)以及轮询/详情调用返回。请按 id 轮询该任务,直到 status 进入终态(completed、failed 或 cancelled)。
唯一的 AIsa 任务标识符。可用它轮询、列出或取消该任务。
示例:
"iaj_01HZY8Q2M4K7N9V3T6W1X0B2C3"
始终为 "integration_async_job"。
示例:
"integration_async_job"
该任务所属的提交 endpoint。
示例:
"/apis/v1/exa/agent/runs"
面向用户的生命周期状态。queued 和 running 为非终态;completed、failed 和 cancelled 为终态。
可用选项:
queued, running, completed, failed, cancelled 任务被受理的时间。
任务进入终态的时间。任务仍处于排队或运行中时为 null。
Show child attributes
Show child attributes
任务结果载荷。仅在 status 为 completed 后出现。对 Agent Runs 而言是结构化的研究结果。
当结果已超过留存窗口、不再可获取时为 true。
当 status 为 failed 时出现,否则为 null。
Show child attributes
Show child attributes