Skip to main content
POST
Cancel a batch
Spotted the typo right after you hit send? It happens to the best of us. Cancel the batch, and you only pay for items that complete successfully.
  • Already finished: Billed. These results are done and waiting for you.
  • Still in the queue: Never run, never billed. This is where the savings live.
  • Running right now: You only pay for successful items, as usual.
Credits already spent are not refunded, but the rest of your batch stops costing you anything.
After you cancel: The batch can still show in_progress until the running items finish or time out. Check progress with Batch Info. Cancel is safe to call again on the same batch.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Path Parameters

batch_id
string
required

The ID of the batch to cancel.

Response

Cancel summary for the whole batch.

total_count
integer
required

Total items in the batch.

done_count
integer
required

Items already finished or canceled before this call.

in_flight_count
integer
required

Items already running. They are not canceled.

canceled_count
integer
required

Queued items canceled by this call.