Digital Human Task Query API

Use POST /digital-human/tasks to query your own video or voice tasks. First, create a task using the Video Generation Guide, then save the returned task_id.

Query the Final Result

curl --request POST 'https://api.yxai-tech.top/digital-human/tasks' \
  --header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"task_id":"YOUR_TASK_ID"}'

Processing Response JSON

{
  "success": true,
  "task_id": "YOUR_TASK_ID",
  "trace_id": "YOUR_TRACE_ID",
  "state": "pending",
  "progress": 0
}

Completed Response JSON

{
  "success": true,
  "task_id": "task_...",
  "trace_id": "...",
  "state": "succeed",
  "progress": 100,
  "video_url": "https://cdn.acedata.cloud/634d760216.mp4",
  "duration": 17.2,
  "width": 1280,
  "height": 720
}

When action is omitted, the task result is returned in a flat format. Read state and progress, and after state=succeed, read the video's video_url or the voice's voice_id. state=failed indicates that execution failed; read error and stop polling. The success field in a task query indicates whether the query succeeded; whether generation is complete is determined by the task state.

Detailed Records and History

When querying a detailed record, submit {"action":"retrieve","id":"YOUR_TASK_ID"}; the original request is in request, and the output is in response. You can also use the task_id field instead of id.

When reading recent history, submit {"action":"retrieve_batch","limit":20}; you can filter by type, created_at_min, and created_at_max. The result includes count and items. Here, retrieve_batch returns recent task history; when specifying multiple task IDs, query them one at a time.

The delete operation uses action=delete and a single ID; before executing it, confirm that you really need to delete the task record. See the Task API Reference for the complete parameters and response fields.