查询任务状态
curl --request GET \
--url https://ai.xbrod.com/v1/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://ai.xbrod.com/v1/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ai.xbrod.com/v1/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}视频系列
任务查询
使用视频任务 ID 查询异步生成状态。
GET
/
v1
/
tasks
/
{task_id}
查询任务状态
curl --request GET \
--url https://ai.xbrod.com/v1/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://ai.xbrod.com/v1/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ai.xbrod.com/v1/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}视频提交响应中的
完成后按任务返回的素材地址与访问规则获取视频;若结果需要鉴权,请不要公开带有授权信息的下载链接。
id 是异步任务 ID。使用同一用户的本项目 API 密钥查询原任务;不要因尚未生成结果而重复付费提交。
curl -sS 'https://ai.xbrod.com/v1/tasks/<任务 ID>' \
-H 'Authorization: Bearer <本项目 API 密钥>'