Cancel Generation
POST/generate/{generation_id}/cancel
Stop a generation that is queued or still rendering. A video can sit in a provider queue for a long time, and until now the only way out was to leave the page and let it run: the screen never resolved and the points stayed spent either way. Cancelling is best effort at the provider — a render already in flight may still complete and be billed. The generation is marked cancelled regardless, because the request is "stop waiting for this", and a job the user has abandoned must not keep a progress bar alive forever.
Authentication
Authorization: Bearer vm_sk_… with the media.write permission (or all.write). See Authentication. SDK: client.jobs.cancel (Python), client.jobs.cancel (Node).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
generation_id* | path | string |
Response
200 application/json
object
Errors
401 | Missing, wrong, revoked or expired key. |
403 | The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client. |
402 | Not enough credits, or the key reached its spending cap. |
404 | Not found for this account. |
422 | The request failed validation; `detail` lists the fields. |
429 | Over a rate limit; retry after `Retry-After` seconds. |
All statuses: Errors.
Example
curl -X POST "https://api.voicemint.io/api/v1/generate/GENERATION_ID/cancel" \
-H "Authorization: Bearer $VOICEMINT_API_KEY"