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.

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.
| Job state | Cancel result | Billing |
|---|---|---|
| queued, not yet started | Accepted; the job becomes canceled | Not billed |
| generation already started | 409 job_generation_already_started, cancelable false | Runs to completion; billed in full if it completes |
| already canceled | Idempotent; returns the same canceled job | Not billed |
| completed or failed | 409 job_not_cancelable | Unchanged |
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
202as 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
- Know the day Sume lists a new video model: a catalog check script
Vendors launch video models weekly. A short Python script reads GET /v1/videos/models and flags when an id or name appears, with exit codes for cron or CI.
- A circuit breaker for paid video API calls: cap, poll, cancel
Guard paid video generation with three layers: a per-run spend cap, a loop breaker in your code, and cancel. Sume charges for work done before a cancel.
- Claude Code 2.1.296: headless runs skip a switched-off MCP server
Claude Code 2.1.296 fixed claude -p starting a .mcp.json or plugin MCP server that was switched off. What that means for Sume's paid tools in CI.
- Claude Code 2.1.296 raises the MCP instructions cap to 4,096
Claude Code 2.1.296 doubled the default MCP instructions cap to 4,096 characters. Sume's server instructions are about 10,900, so the cap still applies.
Written by Sume