Videos

Cancel a video generation

Requests cancellation and returns the job. A pending or running job moves to cancelled shortly after and its reserved credits are returned. A job already storing or finished is returned unchanged (the provider has already produced, and charged for, the video).

post/api/v1/video-generations/{id}/cancel

Request

  • Base URL: https://your-deployment.example.com
  • URL: https://your-deployment.example.com/api/v1/video-generations/{id}/cancel
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Path parameters

idstring required

Response

The job after the cancel request.

idstring required
object'video_generation' required
state'pending' | 'running' | 'storing' | 'succeeded' | 'failed' | 'blocked' | 'cancelled' required
modelstring required
mode'text_to_video' | 'image_to_video' required
promptstring required
duration_secondsnumber required
aspect_ratio'16:9' | '9:16' | '1:1' | '4:3' | '3:4' | '3:2' | '2:3' | '21:9' required
resolution'360p' | '480p' | '720p' | '1080p' | '4k' required
source'api' | 'studio' | 'agent' required
progressnumber nullable required
created_atstring required
updated_atstring required

Example response

{
  "id": "664f1c2b9a1e4d0012ab34cd",
  "object": "video_generation",
  "state": "pending",
  "model": "grok-imagine-video-1.5",
  "mode": "text_to_video",
  "prompt": "A slow dolly shot of a red lighthouse at dusk",
  "duration_seconds": 6,
  "aspect_ratio": "16:9",
  "resolution": "480p",
  "source": "api",
  "progress": null,
  "error": null,
  "output": null,
  "credits": {
    "reserved": 960,
    "settled": null
  },
  "created_at": "2026-10-06T00:00:00.000Z",
  "updated_at": "2026-10-06T00:00:00.000Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.