Home / Servers / OpenAI API / create_file
Upload file
An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.
Upload file Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and each project can store up to 2.5 TB of files in total. There is no organization-wide storage limit.… [POST /files]
Name on the gateway: openai_api__create_file · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
file required | string | The File object (not file name) to be uploaded. |
purpose required | assistants | batch | fine-tune | vision | user_data | evals | The intended purpose of the uploaded file. One of: - assistants: Used in the… |
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_file",
"arguments": {
"file": "…",
"purpose": "…"
}
}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 upload file tool with file set to ….