Cancel video
Cancel an in-progress video generation task. A task can be cancelled only while it is still running — once it reaches a terminal state (completed, failed, cancelled, expired), it can no longer be cancelled.
DELETE https://api.ofox.io/v1/videos/{id}Cancellation depends on the upstream provider. Ofox accepts a cancel request only when the upstream provider genuinely supports interruption — it never reports a fake success by marking the task cancelled locally while the upstream keeps generating. Providers that cannot interrupt a running job return 400 cancel_not_supported.
Request
curl -X DELETE https://api.ofox.io/v1/videos/9bcf3c60-7db2-4e1a-a1b2-c3d4e5f60718 \
-H "Authorization: Bearer $OFOX_API_KEY"Response
A successful cancel returns 204 No Content with an empty body.
HTTP/1.1 204 No ContentAfter a successful cancel the task’s status becomes cancelled. Polling GET /v1/videos/{id} then returns the cancelled terminal state, and if you registered a callback_url you also receive a video.generation.cancelled webhook.
Cancellation behavior
Whether a cancel is accepted depends on the task’s current state and on whether the upstream provider supports interruption:
A task that does not exist and a task owned by a different API key return the same 404 not_found, so the response never reveals whether a given task id exists.
Errors
Errors use the shared error object:
{
"error": {
"code": "cancel_not_supported",
"message": "The upstream provider for this task does not support cancellation."
}
}See the full error reference for every code. DELETE is not subject to the polling rate limit that applies to GET — see Get video status for details.