Skip to content
API reference

Delete a video task

Reference for DELETE /v2/video_generation/{task_id}, which cancels a queued video task or deletes a finished one.

This page is the reference for cancelling or deleting a video generation task. It is intended for developers who manage their video tasks and stored files.

Endpoint

DELETE https://api.engy.ai/v2/video_generation/{task_id}

Authentication

Send your API key in the Authorization header as a bearer token. For details, see Inference API overview.

Parameters

Path parameters

ParameterTypeRequiredDescription
task_idStringYesThe task ID.

The result depends on the status of the task:

Task statusResult
queuedThe task is cancelled. The reserved credit is released, and you are not charged.
succeeded or failedThe task and its video file are deleted.
runningThe request fails. Wait for the task to finish.

Response

Response fields

FieldTypeDescription
task_idStringThe task ID.
actionStringcancelled or deleted.
statusStringThe status of the task: cancelled, succeeded, or failed.
base_respObjectThe status object. status_code is 0 on success.

Errors

StatusCause
400The task is running and cannot be cancelled or deleted.
401The API key is missing or invalid.
404The task does not exist or belongs to another account.

Example

curl -X DELETE https://api.engy.ai/v2/video_generation/$TASK_ID \
  -H "Authorization: Bearer $ENGY_API_KEY"

Response:

{
  "task_id": "9f1c2b7e4d6a4f0b8e3c5a7d9b1f2e4c",
  "action": "cancelled",
  "status": "cancelled",
  "base_resp": {"status_code": 0, "status_msg": "success"}
}