> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Digital Human Task Query API

> Digital Human integration guide - Ace Data Cloud

Use `POST /digital-human/tasks` to query your own video or voice tasks. First, create a task using the [Video Generation Guide](https://platform.acedata.cloud/documents/digitalhuman-videos-integration), then save the returned `task_id`.

## Query the Final Result

```bash theme={null}
curl --request POST 'https://api.acedata.cloud/digital-human/tasks' \
  --header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"task_id":"YOUR_TASK_ID"}'
```

### Processing Response JSON

```json theme={null}
{
  "success": true,
  "task_id": "YOUR_TASK_ID",
  "trace_id": "YOUR_TRACE_ID",
  "state": "pending",
  "progress": 0
}
```

### Completed Response JSON

```json theme={null}
{
  "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](https://platform.acedata.cloud/documents/digitalhuman-tasks) for the complete parameters and response fields.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.