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

NameTypeDescription
file requiredstringThe File object (not file name) to be uploaded.
purpose requiredassistants | batch | fine-tune | vision | user_data | evalsThe intended purpose of the uploaded file. One of: - assistants: Used in the…
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_file",
  "arguments": {
    "file": "…",
    "purpose": "…"
  }
}

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

More from OpenAI API