Job Management

Cancel a job

Stops a PENDING or PROCESSING job. Items not yet handed to a provider or a worker are cancelled and never charged; items already running finish, and are charged for what they complete — nothing is taken at submit, so there is nothing to refund. The answer is the job: CANCELLED when nothing was in flight, else CANCELLING until the running items settle, and then CANCELLED. A chain item lets the segment in flight finish and starts no further one.

The job settles as CANCELLED and a job.failed event goes out. What it did make is kept; a resume retries the cancelled items.

USE THIS WHEN:

  • Stopping a running or queued job you no longer want

DO NOT USE WHEN:

  • The job is already terminal (COMPLETED, FAILED, CANCELLED) or CANCELLING → 400 invalid_state
post/api/v1/jobs/{id}/cancel

Request

  • Base URL: https://api.imagestep.dev
  • URL: https://api.imagestep.dev/api/v1/jobs/{id}/cancel
  • Auth: API key in header Authorization

Path parameters

idstring required

The job's id, job_…

Headers

Idempotency-Keystring

Optional. A client-generated unique key (typically a UUID). Same key + the same request (method, path, query string and body) replays the first response verbatim with Idempotency-Replayed: true, without executing again. Same key + a different one returns 409 idempotency_key_reuse. A repeat that arrives while the first is still running returns 409 request_in_progress, which is retryable. Keys are retained 24 hours. At most 255 characters; a longer one is a 400 invalid_param with param: "Idempotency-Key".

Response

The job — CANCELLING or CANCELLED

Changes

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