List stored tasks / 获取已存任务
curl --request GET \
--url https://apistable.com/v1/tasks \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apistable.com/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/v1/tasks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"task_id": "<string>",
"model": "<string>",
"modality": "<string>",
"status": "<string>",
"output_count": 2,
"fallback": true,
"created_at": "2023-11-07T05:31:56Z",
"duration_ms": 1,
"counts": {
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"pending": 1
},
"billing": {
"initial_reserved_credits": 1,
"charged_credits": 1,
"released_credits": 1,
"remaining_reserved_credits": 1
},
"items": [
{
"item_id": "<string>",
"index": 1,
"status": "<string>",
"final_channel_type": "<string>",
"charged_credits": 1,
"attempts": [
{
"attempt_id": "<string>",
"channel_type": "<string>",
"status": "<string>",
"duration_ms": 1
}
],
"outputs": [
{
"output_id": "<string>",
"type": "<string>",
"status": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"assets": [
{
"role": "<string>",
"url": "<string>"
}
],
"metadata": {},
"title": "<string>"
}
]
}
]
}
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}接口参考
查询任务列表
读取当前账户已存储的任务。
GET
/
v1
/
tasks
List stored tasks / 获取已存任务
curl --request GET \
--url https://apistable.com/v1/tasks \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apistable.com/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/v1/tasks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"task_id": "<string>",
"model": "<string>",
"modality": "<string>",
"status": "<string>",
"output_count": 2,
"fallback": true,
"created_at": "2023-11-07T05:31:56Z",
"duration_ms": 1,
"counts": {
"succeeded": 1,
"failed": 1,
"cancelled": 1,
"pending": 1
},
"billing": {
"initial_reserved_credits": 1,
"charged_credits": 1,
"released_credits": 1,
"remaining_reserved_credits": 1
},
"items": [
{
"item_id": "<string>",
"index": 1,
"status": "<string>",
"final_channel_type": "<string>",
"charged_credits": 1,
"attempts": [
{
"attempt_id": "<string>",
"channel_type": "<string>",
"status": "<string>",
"duration_ms": 1
}
],
"outputs": [
{
"output_id": "<string>",
"type": "<string>",
"status": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"assets": [
{
"role": "<string>",
"url": "<string>"
}
],
"metadata": {},
"title": "<string>"
}
]
}
]
}
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}当前为 API 预览。生成接口尚未接入供应商,成功认证后仍可能返回 503;不会创建任务或扣积分。