Retrieve Task
Poll the state of an async task.
01概述
Poll the video task created by POST /api/v1/videos. This deployment does not currently send task callbacks.
GET
/api/v1/tasks/{task_id}Base URL https://capi.minapp.xinAPI 版本 v1认证方式 Bearer YOUR_API_TOKEN
02参数
| 名称 | 类型 | 说明 |
|---|---|---|
| task_id* | string | Task identifier returned at creation, in the path. |
04说明
- Status values: submitting, running, unknown, succeeded, failed. Result and error are null until the task finishes.
示例
Retrieve Task
cURL
curl https://capi.minapp.xin/api/v1/tasks/tsk_8f21c4ba \
-H "Authorization: Bearer YOUR_API_TOKEN"HTTP 200· OK
{
"id": "video_42_demo-video-001",
"object": "video.task",
"status": "succeeded",
"model": "YOUR_VIDEO_MODEL",
"result": {
"url": "https://capi.example/api/v1/files/file_.../content?token=...",
"file_id": "file_...",
"archived": true
},
"error": null,
"created_at": 1770000000,
"updated_at": 1770000120
}