List Tasks
Endpoint: GET /v1/tasks
Returns the current account’s tasks, ordered by created descending.
Headers
| Header | Value | Required | Notes |
|---|---|---|---|
Authorization | Bearer YOUR_API_KEY | yes | Account API key. Required on every request. |
Only tasks belonging to the API key’s account are returned — full header rules in the Unified Async API Introduction.
Query parameters
Request example — GET https://api.hiapi.ai/v1/tasks?page=1&size=20
{}
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | int | no | 1 | Page number, >= 1. |
size | int | no | 10 | Items per page, 1 ≤ size ≤ 100. |
Out-of-range page / size are normalized to defaults server-side.
Usage notes
- The list endpoint suits dashboards, reconciliation, and batch backfills; to track a single task in real time use Get Task Detail, and prefer a callback for terminal notifications.
- To walk the full history:
totalis the overall count — incrementpageuntilpage * size >= total. - The list is ordered by
createddescending, so new tasks always land on page one; if tasks are created while you paginate, later pages may repeat items — deduplicate bytaskId.
Response
{
"code": 200,
"message": "success",
"data": {
"page": 1,
"size": 10,
"total": 42,
"tasks": [
{
"taskId": "tk-hiapi-...",
"model": "happyhorse-1.0",
"status": "success",
"created": 1777282033,
"completed": 1777282099,
"output": [
{
"url": "https://cdn.hiapi.ai/tasks/.../result.mp4",
"type": "video",
"expireAt": 1777886899
}
]
},
{
"taskId": "tk-hiapi-...",
"model": "happyhorse-1.0",
"status": "archiving",
"created": 1777282010,
"completed": 0
}
]
}
}
Per-item fields match task detail
Each item in
tasks[]has the same fields as thedataof Get Task Detail: non-terminal items omitoutput;failitems includeerror.