Notice: MAI Image 2.7 launch limited-time 20% off, covering the full text-to-image and image editing lineup, try it now
Notice: Black Friday 2026 × Cyber Monday: Get up to 30% extra on top-ups, DeepSeek free to use · View the promotion
Open navigation

List Tasks

Endpoint: GET /v1/tasks

Returns the current account’s tasks, ordered by created descending.

Headers

HeaderValueRequiredNotes
AuthorizationBearer YOUR_API_KEYyesAccount 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

{}
ParameterTypeRequiredDefaultDescription
pageintno1Page number, >= 1.
sizeintno10Items 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: total is the overall count — increment page until page * size >= total.
  • The list is ordered by created descending, so new tasks always land on page one; if tasks are created while you paginate, later pages may repeat items — deduplicate by taskId.

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 the data of Get Task Detail: non-terminal items omit output; fail items include error.