检查达人受众真实性
curl --request POST \
--url https://api.aisa.one/v1/tasks/creators.check_audience_authenticity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"input": {
"profile_url": "<string>"
}
}
'import requests
url = "https://api.aisa.one/v1/tasks/creators.check_audience_authenticity"
payload = { "input": { "profile_url": "<string>" } }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({input: {profile_url: '<string>'}})
};
fetch('https://api.aisa.one/v1/tasks/creators.check_audience_authenticity', 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/v1/tasks/creators.check_audience_authenticity",
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([
'input' => [
'profile_url' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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/v1/tasks/creators.check_audience_authenticity"
payload := strings.NewReader("{\n \"input\": {\n \"profile_url\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/v1/tasks/creators.check_audience_authenticity")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"profile_url\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/v1/tasks/creators.check_audience_authenticity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": {\n \"profile_url\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"completedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"customerDeadlineAt": "2023-11-07T05:31:56Z",
"endpoint": "/v1/tasks/creators.check_audience_authenticity",
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"retry_hint": "never",
"retryable": true,
"param": "<string>",
"problems": [
"<string>"
],
"similar_tasks": [
"<string>"
],
"task_id": "<string>"
},
"id": "<string>",
"object": "task_job",
"output": {
"meta": {
"approximate_fields": [
"estimates"
],
"missing_fields": {},
"delivered": true
},
"result": {
"analyzed_at": "2023-11-07T05:31:56Z",
"creator": {
"avatar_url": "<string>",
"display_name": "<string>",
"follower_count": 1,
"identity": {
"native_id": "<string>",
"handle": "<string>",
"id_namespace": "<string>",
"platform": "instagram",
"profile_url": "<string>"
}
},
"estimates": [
{
"basis": "classified_sample",
"metric": "suspected_fake_share",
"population": "engaged_accounts",
"sample_size": 2,
"value": 0.5
}
]
},
"status": "found",
"task": "creators.check_audience_authenticity",
"version": 1
},
"pricing": {
"authorizedMicrosUSD": 1,
"billingMode": "fixed_success",
"currency": "USD",
"finalMicrosUSD": 1
},
"status": "queued",
"outputExpired": true
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"retry_hint": "never",
"retryable": true,
"param": "<string>",
"problems": [
"<string>"
],
"similar_tasks": [
"<string>"
],
"task_id": "<string>"
}
}达人
检查达人受众真实性
分析 Instagram 互动账号样本或 YouTube 评论账号样本,返回风险比例及该估计的采样人群与分母口径。有效报告中的零风险比例也计为成功交付。
POST
https://api.aisa.one
/
v1
/
tasks
/
creators.check_audience_authenticity
检查达人受众真实性
curl --request POST \
--url https://api.aisa.one/v1/tasks/creators.check_audience_authenticity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"input": {
"profile_url": "<string>"
}
}
'import requests
url = "https://api.aisa.one/v1/tasks/creators.check_audience_authenticity"
payload = { "input": { "profile_url": "<string>" } }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({input: {profile_url: '<string>'}})
};
fetch('https://api.aisa.one/v1/tasks/creators.check_audience_authenticity', 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/v1/tasks/creators.check_audience_authenticity",
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([
'input' => [
'profile_url' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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/v1/tasks/creators.check_audience_authenticity"
payload := strings.NewReader("{\n \"input\": {\n \"profile_url\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/v1/tasks/creators.check_audience_authenticity")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"profile_url\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/v1/tasks/creators.check_audience_authenticity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": {\n \"profile_url\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"completedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"customerDeadlineAt": "2023-11-07T05:31:56Z",
"endpoint": "/v1/tasks/creators.check_audience_authenticity",
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"retry_hint": "never",
"retryable": true,
"param": "<string>",
"problems": [
"<string>"
],
"similar_tasks": [
"<string>"
],
"task_id": "<string>"
},
"id": "<string>",
"object": "task_job",
"output": {
"meta": {
"approximate_fields": [
"estimates"
],
"missing_fields": {},
"delivered": true
},
"result": {
"analyzed_at": "2023-11-07T05:31:56Z",
"creator": {
"avatar_url": "<string>",
"display_name": "<string>",
"follower_count": 1,
"identity": {
"native_id": "<string>",
"handle": "<string>",
"id_namespace": "<string>",
"platform": "instagram",
"profile_url": "<string>"
}
},
"estimates": [
{
"basis": "classified_sample",
"metric": "suspected_fake_share",
"population": "engaged_accounts",
"sample_size": 2,
"value": 0.5
}
]
},
"status": "found",
"task": "creators.check_audience_authenticity",
"version": 1
},
"pricing": {
"authorizedMicrosUSD": 1,
"billingMode": "fixed_success",
"currency": "USD",
"finalMicrosUSD": 1
},
"status": "queued",
"outputExpired": true
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>",
"retry_hint": "never",
"retryable": true,
"param": "<string>",
"problems": [
"<string>"
],
"similar_tasks": [
"<string>"
],
"task_id": "<string>"
}
}异步提交与结果查询
- 发送
POST /v1/tasks/creators.check_audience_authenticity,并提供唯一的Idempotency-Key。重发同一笔请求时复用原键和请求体。返回 HTTP202表示已受理,请保存任务id和Location中的相对地址。 - 按
Retry-After返回的秒数等待,再用同一个 API key 请求GET /v1/tasks/creators.check_audience_authenticity/jobs/{job_id},将{job_id}替换为返回的id。也可以将Location直接拼到 API 域名后查询。status为queued、running或settling时继续轮询。 status为completed、failed或cancelled时停止。completed时读取output,其中output.status为not_found表示正常查空。failed时查看error.code、error.retryable和error.retry_hint。
curl -H "Authorization: Bearer $AISA_API_KEY" "${AISA_API_BASE}/v1/tasks/creators.check_audience_authenticity/jobs/${JOB_ID}"
计费
| 输入 | 计价单位 | 价格 (USD) |
|---|---|---|
| 所有有效输入 | 每次成功请求 | 1.18 |
X-AISA-Cost-Mode: quote,获取与输入对应的报价;报价不执行任务,也不预扣资金。实际执行时预扣预计请求费用,按上述规则结算。用 X-AISA-Max-Price-USD 设置价格上限。
执行任务时使用 Idempotency-Key。错误时查看 error.code、error.request_id、error.retryable 和 error.retry_hint。提示先核对结算时,应先查询原请求再决定是否重试;不能把待结算当作已退款。授权
响应
任务已受理