Cancel batch
POST
/v1/batches/{batch_id}/cancelRequest cancellation of an in-flight batch. The batch moves to cancelling, then cancelled.
- Platform execution: Token360 stops remaining fan-out work locally. Successful lines already written may still be billed (
usage_billing). - Provider execution: Token360 also calls the upstream cancel API when possible.
Already terminal batches (completed, failed, expired, cancelled) return the current object unchanged.
Authentication
Authorization Bearer
Path Parameters
batch_idstringrequiredBatch ID to cancel.
Response
idstringBatch ID.
objectstringbatch
endpointstring/v1/chat/completions
statusenum<string>Usually cancelling or cancelled.
input_file_idstringInput file ID.
output_file_idstringOutput JSONL file when already completed.
error_file_idstringError JSONL file when present.
completion_windowstring24h
executionstringResolved path: provider | platform.
usage_billingobjectAggregated usage billing when lines have been settled.
request_countsobjecttotal, completed, failed counts when available.
request_counts.totalintegerTotal number of requests in the batch.
request_counts.completedintegerNumber of completed requests.
request_counts.failedintegerNumber of failed requests.
created_atintegerUnix timestamp.
cancelled_atintegerUnix timestamp when cancellation is complete.
expires_atintegerUnix timestamp deadline.
metadataobjectStored metadata.
¿Ha sido de ayuda?