provider Batch POST /batches/{batch_id}/cancel
@utdk/openai /batches/{batch_id}/cancel
Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file.
batch_id path required
The ID of the batch to cancel.
string

Try it

Authentication
Configure credentials for OpenAI API
cancelbatch
POST/batches/{batch_id}/cancel

Parameters

required

The ID of the batch to cancel.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import openai from '@utdk/openai';

await openai.cancelbatch()