Wan API task deletion endpoint
Delete one finished task and its stored video files with DELETE /v1/tasks/{task_id}. It works for every model.
This endpoint works for every model. Send your key as Authorization: Bearer YOUR_API_KEY to https://api.wanapi.app. It can only delete tasks of the account that owns the key.
Delete one finished task with DELETE /v1/tasks/{task_id} and a key of the same account. Only completed or failed tasks can be deleted. The task record and its stored video and last-frame files are removed permanently; billing records and charges stay unchanged. A deleted task can no longer be queried or downloaded. Each request deletes one task.
curl -X DELETE "https://api.wanapi.app/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $WAN_API_KEY"{
"id": "task_EXAMPLE",
"object": "task.deleted",
"deleted": true
}Errors
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | The task does not exist or belongs to another account. |
| 409 | task_not_finished | The task is still running; delete it after it completes or fails. |
| 409 | artifact_unverified | Its stored files could not be verified, so nothing was deleted. Contact support. |
| 503 | delete_unavailable | Try again later. Repeating the request is safe. |