Home / Servers / OpenAI API / create_batch

Create batch

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

Create batch Creates and executes a batch from an uploaded file of requests [POST /batches]

Name on the gateway: openai_api__create_batch · may change things.

Parameters

NameTypeDescription
input_file_id requiredstringThe ID of an uploaded file that contains requests for the new batch. See…
endpoint required/v1/responses | /v1/chat/completions | /v1/embeddings | /v1/completions | /v1/moderations | /v1/images/generations | /v1/images/edits | /v1/videosThe endpoint to be used for all requests in the batch. Currently…
completion_window required24hThe time frame within which the batch should be processed. Currently only 24h…
metadataobjectSet of 16 key-value pairs that can be attached to an object. This can be…
output_expires_afterobjectThe expiration policy for the output and/or error file that are generated for…

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__create_batch",
  "arguments": {
    "input_file_id": "…",
    "endpoint": "…",
    "completion_window": "…"
  }
}

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 create batch tool with input_file_id set to ….

More from OpenAI API