curl --request POST \
--url https://api.aisa.one/v1/tasks/seo.get_ai_answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"assistant": "chatgpt",
"prompt": "What are the best CRM tools for small businesses?"
}
}
'{
"meta": {
"approximate_fields": [
"<string>"
],
"delivered": true,
"missing_fields": {}
},
"result": {
"answer": "<string>",
"assistant": "chatgpt",
"country": "<string>",
"model": "<string>",
"prompt": "<string>",
"search_queries": [
"<string>"
],
"sources": [
{
"cited": true,
"domain": "<string>",
"position": 123,
"snippet": "<string>",
"title": "<string>",
"url": "<string>"
}
]
},
"status": "found",
"task": "seo.get_ai_answer",
"version": 1
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"retry_hint": "never",
"retryable": true,
"param": "<string>",
"problems": [
"<string>"
],
"similar_tasks": [
"<string>"
],
"task_id": "<string>"
}
}Seo
获取 AI 助手对问题的回答与引用
需要知道 AI 助手(ChatGPT、Claude、Gemini、Perplexity)或 Google 的 AI 搜索(AI Mode、AI 概览)对某个问题怎么回答、引用了哪些网页时使用,例如查看某个品牌是否被推荐、回答依据了哪些网站。返回回答正文、引用来源(url、标题、域名、位置),以及助手返回时的模型版本和它所做的网页搜索。ChatGPT、Claude、Gemini、Perplexity 的回答来自厂商 API 模型并开启网页搜索(所用模型见 model 字段),因此可能与应用内看到的不同;API 回答失败时,ChatGPT 和 Gemini 改为读取其消费端应用的回答,此时 model 为空;Google AI Mode 和 AI 概览的回答读取自 Google 页面。每次调用向一个助手提一个问题;只有返回回答时才计费。
POST
https://api.aisa.one
/
v1
/
tasks
/
seo.get_ai_answer
curl --request POST \
--url https://api.aisa.one/v1/tasks/seo.get_ai_answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"assistant": "chatgpt",
"prompt": "What are the best CRM tools for small businesses?"
}
}
'{
"meta": {
"approximate_fields": [
"<string>"
],
"delivered": true,
"missing_fields": {}
},
"result": {
"answer": "<string>",
"assistant": "chatgpt",
"country": "<string>",
"model": "<string>",
"prompt": "<string>",
"search_queries": [
"<string>"
],
"sources": [
{
"cited": true,
"domain": "<string>",
"position": 123,
"snippet": "<string>",
"title": "<string>",
"url": "<string>"
}
]
},
"status": "found",
"task": "seo.get_ai_answer",
"version": 1
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"retry_hint": "never",
"retryable": true,
"param": "<string>",
"problems": [
"<string>"
],
"similar_tasks": [
"<string>"
],
"task_id": "<string>"
}
}上方请求和响应面板使用此 API 发布的 Schema。条件必填和参数组合限制属于请求契约;组合筛选条件或账号身份前,请查看完整 Schema。
Google AI Mode 在英国的回答
仅表内参数值有价格;未列出的值不会回退到基础价格。
成功交付才收费;正常查空不收费。
发送相同请求并带上
示例
以下请求可直接运行;请求面板中也可选择同样的示例。 ChatGPT 推荐的小企业 CRM{
"input": {
"assistant": "chatgpt",
"prompt": "What are the best CRM tools for small businesses?"
}
}
{
"input": {
"assistant": "google_ai_mode",
"prompt": "best running shoes for flat feet",
"country": "GB"
}
}
计费
| 输入 | 计价单位 | 价格 (USD) |
|---|---|---|
| /input/assistant = chatgpt | 每次成功请求 | 0.063 |
| /input/assistant = claude | 每次成功请求 | 0.0254 |
| /input/assistant = gemini | 每次成功请求 | 0.0636 |
| /input/assistant = google_ai_mode | 每次成功请求 | 0.0048 |
| /input/assistant = google_ai_overview | 每次成功请求 | 0.0003 |
| /input/assistant = perplexity | 每次成功请求 | 0.0124 |
X-AISA-Cost-Mode: quote,获取与输入对应的报价;报价不执行任务,也不预扣资金。实际执行时预扣预计请求费用,按上述规则结算。用 X-AISA-Max-Price-USD 设置价格上限。
执行任务时使用 Idempotency-Key。错误时查看 error.code、error.request_id、error.retryable 和 error.retry_hint。提示先核对结算时,应先查询原请求再决定是否重试;不能把待结算当作已退款。