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
| Name | Type | Description |
|---|---|---|
filename required | string | The name of the file to upload. |
purpose required | assistants | batch | fine-tune | vision | The intended purpose of the uploaded file. See the documentation on File… |
bytes required | integer | The number of bytes in the file you are uploading. |
mime_type required | string | The MIME type of the file. This must fall within the supported MIME types for… |
expires_after | object | The 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:
{
"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:
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 ….