List account tasks
curl --request GET \
--url https://apistable.com/api/v1/tasks \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apistable.com/api/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/api/v1/tasks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"tasks": [
{
"task_id": "<string>",
"model": "<string>",
"status": "processing",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"duration": 1,
"charged_credits": 1
}
],
"next_cursor": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}接口参考
任务列表
按游标分页查询本账户任务摘要。
GET
/
api
/
v1
/
tasks
List account tasks
curl --request GET \
--url https://apistable.com/api/v1/tasks \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apistable.com/api/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/api/v1/tasks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"code": 200,
"msg": "success",
"data": {
"tasks": [
{
"task_id": "<string>",
"model": "<string>",
"status": "processing",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"duration": 1,
"charged_credits": 1
}
],
"next_cursor": "<string>"
}
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}{
"code": 123,
"msg": "<string>",
"data": null
}能力按服务端配置逐项启用。未启用操作返回 503 且不创建任务;音乐积分扣除当前未启用。
筛选与游标
查询参数为 limit(1–100,默认 20)、after、status、model。data.tasks 包含 task_id、model、status、created_at、completed_at、duration、charged_credits;最后一页 next_cursor 为 null。按创建时间倒序,不包含其他账户数据或 完整 input/result 内容。授权
Every valid key can submit and query its own account. Revoked keys are rejected.
查询参数
必填范围:
1 <= x <= 100可用选项:
processing, succeeded, failed