Cancel a video task
Requires service.use permission and Idempotency-Key.
- Put your API key after
Authorization: Bearer; send no request body. - Send an
Idempotency-Key; the same key replays the original response. - Before generation starts, cancellation takes effect at once: the task becomes
cancelledand the whole reservation is released. - After generation starts, the answer is
not_effective; the task continues and is settled as usual.
Headers
Bearer, a space and your API key. A missing or invalid key returns 401 authentication_failed.
Your own request identifier. An invalid or repeated value is replaced; the value used comes back in the X-Request-ID response header.
Generate a new value for every new request and save it; it starts with a letter or digit. When the outcome is unknown, retry with the same key and the original body to get the original response; the same key with a different body returns 409 idempotency_conflict. Keys belong to your team, not to one API key.
Path parameters
ID of the video task to retrieve
Returns
A permanent snapshot of the cancellation operation. effective means Cancelled; not_effective means Not cancelled. Continue checking the task and its billing.
Video Task ID belonging to your team.
Stable Cancellation ID. New idempotency keys for the same task refer to this same ID.
Cancellation status. Reports Cancelled or Not cancelled immediately.
requestedRequestedeffectiveCancellednot_effectiveNot cancelledfailedFailedTask status saved when this idempotency key first receives a response. Replays keep this saved status.
queuedQueuedprocessingProcessingsucceededSucceededfailedFailedcancelledCancelledNull when cancellation takes effect; generation_already_started when generation has already started and the task is not cancelled.
Response headers
Status codes
Each error.code and what to do about it is on Error codes.
| Status | Meaning and error.code |
|---|---|
| 202 | A permanent snapshot of the cancellation operation. Response headers Location |
| 400 | The submitted request is not valid. |
| 401 | The API key is missing or invalid. Response headers WWW-Authenticate |
| 404 | No task with this ID is visible to your team. |
| 409 | The idempotency key belongs to a different request, or the finished task has no cancellation operation to refer to. |
| 429 | The request rate limit blocks this read operation. Response headers Retry-After |
| 500 | Internal error. |
| 503 | The service is temporarily unavailable. |