Home / Servers / OpenAI API / cancel_batch

Cancel batch

An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.

Cancel batch 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. [POST /batches/{batch_id}/cancel]

Name on the gateway: openai_api__cancel_batch · may change things.

Parameters

NameTypeDescription
batch_id requiredstringThe ID of the batch to cancel.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "openai_api__cancel_batch",
  "arguments": {
    "batch_id": "…"
  }
}

Or connect the OpenAI API server directly, which lists 371 tools including this one:

Run in your terminal
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the cancel batch tool with batch_id set to ….

More from OpenAI API