Can you cancel an image generation on Sume? Only before it starts

Cancelling a Sume image job works only before generation work starts. After that the API returns 409 job_generation_already_started and the job runs and bills.

4 min readSume
All posts

Yes, but only while the job is still waiting. POST /v1/jobs/{id}/cancel succeeds before generation work starts; once the model has started, the API returns 409 job_generation_already_started with details.cancelable: false, and the job runs to completion and is billed.

So a cancel button in your product is a queue control, not a stop button for a running render. Design it that way.

What each state allows

The Jobs and results page defines the statuses as queued, processing, completed, failed and canceled. What a cancel does depends on where the job is when the request arrives.

Cancelling an image job by state (Jobs and results and Errors docs, read 2026-10-10)
Job stateCancel resultBilling
queued, not yet startedAccepted; the job becomes canceledNot billed
generation already started409 job_generation_already_started, cancelable falseRuns to completion; billed in full if it completes
already canceledIdempotent; returns the same canceled jobNot billed
completed or failed409 job_not_cancelableUnchanged

Where cancel is useful

Image calls are short, and many finish inside the 30-second sync wait, in which case there is no job left to cancel. Cancel matters on the 202 path: a 4K render, a large n, or an async batch that sits in the queue behind other work. Sume accepts valid jobs as queued while the workspace has queue capacity, and the Errors and rate limits page says a queue_full rejection can be cleared by waiting for jobs to finish or cancelling queued ones.

That makes cancel the right tool when a user changes their mind about a batch they just submitted: cancel the jobs that are still queued, and let the ones that are already processing finish.

A safe cancel routine

Treat the 409 as normal information, not as a failure. If the response says the generation already started, stop trying to cancel, keep polling, and show the result when it arrives. If your client disconnects instead, note what the Image API docs say: a request that ends early because the client went away is treated as a failed generation and is not charged, but a job in async or webhook mode is independent of your connection and continues.

Remember that cancelling is idempotent for a job that is already canceled, so a double-click on the button is harmless.

  • Store the job id from the 202 as soon as you receive it.
  • Call cancel for jobs the user abandoned, and read the status after.
  • On 409 job_generation_already_started, switch the interface to waiting for the result.
  • Never resubmit the paid request to replace a job you could not cancel.

What it means for cost control

Because a started job cannot be stopped, the cost of a batch is decided at submission, not at the cancel button. If you need a hard ceiling, cap the batch size and the model price in your own code before you submit. A twenty-image batch on a 0.0375 USD model is at most 0.75 USD at the base price, and cancelling the queued part of it can only reduce that.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume