APIByteDanceSeedance series
Cancel task
Cancel a queued task or hide a terminal task.
Request
DELETE /ai/api/v3/contents/generations/tasks/{id}
Authorization: Bearer <TUIWO_API_TOKEN>{id} can be either id or task_id.
Behavior
- Terminal task: hidden from the customer-visible list; billing and audit records remain.
- Queued task: subject to the platform switch and service support.
- Running task: returns
409 TaskNotCancellable. - Unsupported service or cancellation disabled: returns
501 NotImplemented. - Refunds after cancellation are asynchronous.
Errors
| HTTP | code | Description |
|---|---|---|
| 404 | NotFound | Task missing or outside the current user/group |
| 409 | TaskNotCancellable | Task is running or cannot be cancelled |
| 409 | CancelUnconfirmed | Service did not confirm cancellation |
| 409 | RefundPending | Task failed and refund is still pending |
| 501 | NotImplemented | Cancellation is not supported by this configuration |
| 502 | TaskServiceUnavailable | Service cancellation failed |