Home / Servers / OpenAI API / create_upload

Create upload

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

Create upload Creates an intermediate Upload object that you can add Parts to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it. Once you complete the Upload, we… [POST /uploads]

Name on the gateway: openai_api__create_upload · may change things.

Parameters

NameTypeDescription
filename requiredstringThe name of the file to upload.
purpose requiredassistants | batch | fine-tune | visionThe intended purpose of the uploaded file. See the documentation on File…
bytes requiredintegerThe number of bytes in the file you are uploading.
mime_type requiredstringThe MIME type of the file. This must fall within the supported MIME types for…
expires_afterobjectThe expiration policy for a file. By default, files with purpose=batch expire…

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_upload",
  "arguments": {
    "filename": "…",
    "purpose": "…",
    "bytes": 0,
    "mime_type": "…"
  }
}

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 upload tool with filename set to ….

More from OpenAI API