OpenRouter batch DELETE 409 vs Sume cancel 409 after start

OpenRouter returns 409 when you DELETE an in-flight batch. Sume returns 409 job_generation_already_started on cancel once generation starts. Handle both.

4 min readSume
All posts

Both APIs answer 409 when you ask to remove work that is already running, but the requests differ. OpenRouter's DELETE /api/v1/batches/:id is a purge that only works on a terminal batch. Sume's POST /v1/jobs/:id/cancel is a real cancel that only works before generation starts, and then returns 409 job_generation_already_started.

Facts are from OpenRouter's Batch API quickstart and Sume's Generation admission page, read 2026-10-01.

What does OpenRouter do on DELETE?

The quickstart says a batch can be deleted once it is terminal (completed, failed, expired or cancelled). Deletion purges the batch's request and result artifacts. It states that deletion is not cancellation: an in-flight batch returns 409.

What does Sume do on cancel?

The docs say to cancel queued jobs you no longer need before they start processing. Once generation has started, cancel returns 409 job_generation_already_started with details.cancelable: false, and the job completes or fails normally. Cancelling a job that is already canceled is idempotent, so a retried cancel is safe.

Conflict behavior, read 2026-10-01: https://docs.sume.com/workflows/generation-admission
QuestionOpenRouter Batch APISume jobs
RequestDELETE /api/v1/batches/:idPOST /v1/jobs/:id/cancel
Allowed whenBatch is terminalBefore generation starts
Conflict response409 for an in-flight batch409 job_generation_already_started
Machine-readable flagNot stated in the quickstartdetails.cancelable: false
Repeat callLater GET or DELETE returns 404 after a 200Idempotent on an already canceled job

How should a client treat the Sume 409?

Read it as a state, not a failure. Check details.cancelable; when it is false, stop trying to cancel and keep polling the job until it is terminal. The job still ends as completed or failed. See cancel AI video jobs and runs for the full flow.

Does cancelling refund the reservation?

Sume's core workflow page says provider-backed generation can reserve estimated USD usage, capture actual cost on success, and refund on failure or cancellation before capture. A job that has already started cannot be cancelled, so plan for it to be captured or refunded by its own outcome.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume