---
title: "Cancel AI job"
method: POST
path: "/v1/ai/jobs/{jobId}/cancel"
tags: ["AI"]
---

# Cancel AI job

`POST /v1/ai/jobs/{jobId}/cancel`

## Request

- Base URL: `https://blobsrus.omniapp.co/api`
- URL: `https://blobsrus.omniapp.co/api/v1/ai/jobs/{jobId}/cancel`
- Auth: HTTP bearer

Request cancellation of an AI job. This endpoint is idempotent — calling it on an already-cancelled or completed job returns success with the current state. 

- For `QUEUED` jobs, cancellation is immediate
- For `EXECUTING` jobs, the worker will stop after completing its current iteration
- Jobs in a `DELIVERING` state cannot be cancelled as they are already finalizing results. **Only the job owner or organization admins can cancel jobs.**

## Path parameters

- `jobId` string, uuid, required

## Response `200`

Cancellation request processed. The `state` field indicates the job's state after the attempt — `CANCELLED` if successful, or the current terminal state if the job had already completed.

- object
  - `jobId` string, uuid: The unique identifier for the cancelled job
  - `state` 'CANCELLED' | 'COMPLETE' | 'DELIVERING' | 'EXECUTING' | 'FAILED' | 'QUEUED': The job's state after the cancellation attempt. `CANCELLED` if the cancellation succeeded. If the job was already in a terminal state (`COMPLETE`, `FAILED`, `CANCELLED`), the current state is returned unchanged.

## Other responses

- `400`: Bad Request Possible error messages: - `Job is not in a cancellable state`
- `401`: Unauthorized Possible error messages: - `Missing or invalid API key`
- `403`: Forbidden Possible error messages: - `Permission denied. Only the job owner or organization admins can cancel jobs.`
- `404`: Job not found. The job may not exist or may belong to a different organization.
- `409`: Concurrent modification conflict. The job's state changed between Omni reading it and recording the cancellation. Retry the request.
- `429`: Too Many Requests - Rate limit exceeded (60 requests/minute)
- `500`: Internal Server Error
- `503`: Omni could not record the cancellation, so the job was left in its current state. Retryable.

## Changes

- **2026-11-03** `43290040f88f`: 13 warning, 10 info
  - removed the optional property `error` from the response with the `400` status
  - removed the optional property `error` from the response with the `401` status
  - removed the optional property `error` from the response with the `403` status
  - removed the optional property `error` from the response with the `404` status
  - …19 more

[Operation history](https://skmtc.dev/omni/apis/omni-api/changes/v1/ai/jobs/:jobId/cancel/post.md)

---

[API](https://skmtc.dev/omni/apis/omni-api.md) - [All operations](https://skmtc.dev/omni/apis/omni-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omni/apis/omni-api/revisions/43290040f88f?raw)
