Skip to main content
POST
Cancel a batch job that is currently in progress. Cancellation is not immediate - the batch status will transition from cancelling to cancelled once the operation completes.
Important: Cancellation cannot be undone. Completed requests in the batch will still be billed, and you won’t get results for incomplete requests.
Customer credentials required: This endpoint requires your own OpenAI API key configured in Keywords AI dashboard (Settings → Providers).

Keywords AI parameters

You can pass Keywords AI tracking parameters via the X-Data-Keywordsai-Params header:

Path parameters

string
required
The unique identifier of the batch to cancel. Format: batch_xxxxx

Response

Returns the batch object with cancelling status. Poll the retrieve batch endpoint to check when cancellation completes.