> ## 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 작업 조회 API

> Digital Human API guide - Ace Data Cloud

`POST /digital-human/tasks`를 사용하여 자신의 비디오 또는 음성 작업을 조회합니다. 먼저 [비디오 생성 가이드](https://platform.acedata.cloud/documents/digitalhuman-videos-integration)를 통해 작업을 생성한 다음, 반환된 `task_id`를 저장합니다.

## 최종 결과 조회

```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"}'
```

### 처리 중 응답 JSON

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

### 완료 응답 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
}
```

`action`을 생략하면 평면 구조의 작업 결과가 반환됩니다. `state`와 `progress`를 읽고, `state=succeed`가 된 후 비디오의 `video_url` 또는 음성의 `voice_id`를 읽습니다. `state=failed`는 실행 실패를 의미하므로, `error`를 읽고 폴링을 종료합니다. 작업 조회의 `success`는 조회의 성공 여부를 나타내며, 생성 완료 여부는 작업 상태에 따라 결정됩니다.

## 상세 기록 및 이력

상세 기록을 조회할 때는 `{"action":"retrieve","id":"YOUR_TASK_ID"}`를 제출하며, 원본 요청은 `request`에, 출력은 `response`에 있습니다. `id` 대신 `task_id` 필드를 사용할 수도 있습니다.

최근 이력을 읽을 때는 `{"action":"retrieve_batch","limit":20}`을 제출하며, `type`, `created_at_min`, `created_at_max`로 필터링할 수 있습니다. 결과에는 `count`와 `items`가 포함됩니다. 여기서 `retrieve_batch`는 최근 작업 이력을 반환하며, 여러 작업 ID를 지정할 때는 각각 조회하면 됩니다.

삭제 작업에는 `action=delete`와 단일 ID를 사용하며, 실행 전에 해당 작업 기록을 실제로 삭제해야 하는지 확인합니다. 전체 매개변수와 응답 필드는 [작업 API 참조](https://platform.acedata.cloud/documents/digitalhuman-tasks)를 참조하세요.


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