Retrieve Task

Poll the state of an async task.

01Overview

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 version v1Authentication Bearer YOUR_API_TOKEN

02Parameters

NameTypeDescription
task_id*stringTask identifier returned at creation, in the path.

04Notes

  • Status values: submitting, running, unknown, succeeded, failed. Result and error are null until the task finishes.

Example

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
}