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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string, up to 64 characters | The job id. |
Request
bash
curl -X POST "$VIDEXO_API_URL/v1/jobs/job_3k9x0c2mfq8w1n7r5t4b6v2z/cancel" \
-H "Authorization: Bearer $VIDEXO_API_KEY"Copy failed. The text is selected; copy it with your keyboard.
JavaScript
const response = await fetch(`${process.env.VIDEXO_API_URL}/v1/jobs/job_3k9x0c2mfq8w1n7r5t4b6v2z/cancel`, {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.VIDEXO_API_KEY}` },
});
const job = await response.json();Copy failed. The text is selected; copy it with your keyboard.
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"
}Copy failed. The text is selected; copy it with your keyboard.
Responses
| Status | Body | When |
|---|---|---|
| 200 | Job | The job, cancelled or as it ended. |
| 401 | Problem | authentication_failed (missing_api_key, invalid_api_key, api_key_revoked, api_key_expired) |
| 403 | Problem | permission_denied (token_scope): a client token cannot call this route |
| 404 | Problem | not_found (job) |
| 429 | Problem | rate_limited, with Retry-After in seconds |
| 503 | Problem | service_unavailable (cancel_unconfirmed): cancellation could not be confirmed; read the job before trying again |