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
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

cancelbatch
POST/batches/{batch_id}/cancel

Parameters

required

The ID of the batch to cancel.

Enter a gateway URL above to enable sending.

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

TypeScript

import openai from '@utdk/openai';

await openai.cancelbatch()