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

# Retry Task

> Retry a failed task. Creates a new task with the same parameters and charges your balance again.

## Path Parameters

<ParamField path="id" type="string" required>
  The ID of the failed task to retry.
</ParamField>

## Notes

* Tasks with status `failed` or `expired` can be retried.
* A new task is created with the same provider, model, and input parameters.
* Your balance will be charged again for the new task.
* The original task remains unchanged.

<ResponseExample>
  ```json 201 theme={null}
  {
    "success": true,
    "data": {
      "id": "task_new789",
      "original_task_id": "task_abc123",
      "status": "pending",
      "type": "video",
      "provider": "vidu",
      "model": "viduq3-turbo",
      "created_at": "2026-01-15T12:00:00Z"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "TASK_NOT_RETRYABLE",
      "message": "Only failed or expired tasks can be retried"
    }
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": {
      "code": "TASK_NOT_FOUND",
      "message": "Task not found"
    }
  }
  ```
</ResponseExample>
