Skip to content

DocsAPI referenceJobs

Cancel a job

A queued or running job becomes cancelled. A job that already ended is answered as it is.

POST /v1/jobs/{id}/cancel

Needs an API key: Authorization: Bearer $VIDEXO_API_KEY.

Parameters

Parameters
NameInTypeDescription
id requiredpathstring, up to 64 charactersThe job id.

Request

bash
curl -X POST "$VIDEXO_API_URL/v1/jobs/job_3k9x0c2mfq8w1n7r5t4b6v2z/cancel" \
  -H "Authorization: Bearer $VIDEXO_API_KEY"

Response

200 JSON
{
  "id": "job_3k9x0c2mfq8w1n7r5t4b6v2z",
  "state": "cancelled",
  "kind": "operations",
  "operation": "transcode",
  "spec": {
    "inputs": {
      "source": {
        "url": "https://videxo.io/samples/talk.mp4"
      }
    },
    "outputs": [
      {
        "name": "video",
        "type": "video",
        "preset": "web-720p",
        "input": "source",
        "filename": "talk-720p.mp4",
        "format": "mp4",
        "resize": {
          "width": 1280,
          "height": 720,
          "fit": "contain",
          "enlarge": false
        },
        "video": {
          "codec": "h264",
          "crf": 23,
          "encoder_preset": "veryfast",
          "pixel_format": "yuv420p",
          "faststart": true
        },
        "audio": {
          "codec": "aac",
          "bitrate": "128k"
        }
      }
    ]
  },
  "command": "-i {{in_source}} -map 0:v:0 -vf \"scale='min(iw,1280)':'min(ih,720)':force_original_aspect_ratio=decrease:force_divisible_by=2\" -c:v libx264 -preset veryfast -crf 23 -pix_fmt yuv420p -map 0:a:0? -c:a aac -b:a 128k -movflags +faststart {{out_video}}",
  "input_files": {
    "in_source": "https://videxo.io/samples/talk.mp4"
  },
  "output_files": {
    "out_video": "talk-720p.mp4"
  },
  "ffmpeg_command": "ffmpeg -i https://videxo.io/samples/talk.mp4 -map 0:v:0 -vf 'scale='\\''min(iw,1280)'\\'':'\\''min(ih,720)'\\'':force_original_aspect_ratio=decrease:force_divisible_by=2' -c:v libx264 -preset veryfast -crf 23 -pix_fmt yuv420p -map '0:a:0?' -c:a aac -b:a 128k -movflags +faststart talk-720p.mp4",
  "steps": [
    {
      "tool": "ffmpeg",
      "inputs": [
        "source"
      ],
      "outputs": [
        "video"
      ],
      "command": "ffmpeg -i https://videxo.io/samples/talk.mp4 -map 0:v:0 -vf 'scale='\\''min(iw,1280)'\\'':'\\''min(ih,720)'\\'':force_original_aspect_ratio=decrease:force_divisible_by=2' -c:v libx264 -preset veryfast -crf 23 -pix_fmt yuv420p -map '0:a:0?' -c:a aac -b:a 128k -movflags +faststart talk-720p.mp4"
    }
  ],
  "webhook_url": null,
  "metadata": {
    "order": "1234"
  },
  "progress": null,
  "error": null,
  "outputs": [],
  "usage": null,
  "created_at": "2026-11-04T12:00:00.000Z",
  "started_at": null,
  "finished_at": "2026-11-04T12:00:02.000Z"
}

Responses

Responses
StatusBodyWhen
200JobThe job, cancelled or as it ended.
401Problemauthentication_failed (missing_api_key, invalid_api_key, api_key_revoked, api_key_expired)
403Problempermission_denied (token_scope): a client token cannot call this route
404Problemnot_found (job)
429Problemrate_limited, with Retry-After in seconds
503Problemservice_unavailable (cancel_unconfirmed): cancellation could not be confirmed; read the job before trying again