Reference · Tools

OpenAI File Upload

Upload files to OpenAI for use with assistants, fine-tuning, and batch.

Action (binary) AI v1 Binary data

OpenAI File Upload sends a binary file to the OpenAI Files API with the purpose you specify — assistants, fine-tuning, batch processing or vision — and returns the file object including its ID. That ID is what later OpenAI nodes reference. A typical build is uploading a document then reasoning over it with OpenAI Reasoning or File Search.

Node type
Action (binary)
Parameters
5
Outputs
Output, Error
Credentials
OpenAI

OpenAI File Upload

Upload files to OpenAI for use with assistants, fine-tuning, and batch.

Overview

OpenAI File Upload uses the OpenAI Files API (POST /files) to upload files for various purposes including assistants, fine-tuning, batch processing, and vision. Accepts binary file input and uploads it as multipart/form-data with a specified purpose. Returns the file object with id, filename, bytes, purpose, and status metadata. The file ID can be used in subsequent OpenAI API calls.

Category: AI
Tool Name: openai_file_upload
Version: 1

Appearance: Icon: openai | Color: #10a37f

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires OpenAI credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
Binary Property NamestringNodataThe name of the binary property containing the file to upload. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
PurposeoptionsNoassistantsThe intended purpose of the uploaded file. This determines how OpenAI processes and validates the file.
Options: assistants (use with OpenAI Assistants), fine-tune (training file for fine-tuning a model), batch (input file for batch processing), vision (image file for vision analysis)
OptionscollectionNo{}Optional output settings — add only the fields you need.
— Response Field NamestringNofileThe output field name where the file upload response will be stored.
Include InputbooleanNofalseWhether to include the original input item fields in the output alongside the upload response.
Max ConcurrencynumberNo5Maximum number of items to process concurrently.

Output Data

One output item per input item. The full file object lands on the field named by Response Field Name (file by default), and the two fields you almost always need — fileId and fileName — are lifted to the top level. The rest of the input item JSON is dropped unless Include Input is on; the input binary is forwarded unchanged.

{
  "file": {
    "id": "file-abc123",
    "object": "file",
    "bytes": 120432,
    "filename": "training.jsonl",
    "purpose": "fine-tune",
    "status": "processed"
  },
  "fileId": "file-abc123",
  "fileName": "training.jsonl"
}
  • fileId is the value other OpenAI nodes expect. Wire it into OpenAI Chat, OpenAI Reasoning, OpenAI Structured Output, OpenAI Vision or OpenAI Code Interpreter as {{ $json.fileId }}.
  • Uploading the same file twice creates two distinct file IDs — OpenAI does not deduplicate. Upload once and reuse the ID across runs where you can.

Usage Examples

  • Upload a JSONL file for fine-tuning an OpenAI model
  • Upload a document for use with an OpenAI assistant
  • Upload a batch processing input file to OpenAI
  • Upload an image file for OpenAI vision analysis
  • Upload training data and get the file ID for a fine-tuning job

Example Configuration

Upload a file arriving on the default binary property:

{
  "type": "openai_file_upload",
  "parameters": {
    "binaryPropertyName": "data",
    "purpose": "assistants"
  }
}

Upload fine-tuning data and keep the original item fields:

{
  "type": "openai_file_upload",
  "parameters": {
    "binaryPropertyName": "trainingFile",
    "purpose": "fine-tune",
    "includeInput": true,
    "options": {
      "responseFieldName": "uploadedFile"
    }
  }
}

Upload an image for a later vision step:

{
  "type": "openai_file_upload",
  "parameters": {
    "binaryPropertyName": "photo",
    "purpose": "vision",
    "maxConcurrency": 10
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

OpenAI File Upload sends binary files to the OpenAI Files API as multipart/form-data with a specified purpose such as assistants, fine-tuning, batch processing, or vision. Use this tool when a downstream OpenAI operation requires a pre-uploaded file reference, such as attaching documents to an assistant or supplying training data for a fine-tune job. It returns a file object with the id, filename, byte size, purpose, and status fields, where the file id is passed directly into subsequent OpenAI API calls.

Frequently asked questions

What do I do with the returned ID?

Pass it into the OpenAI node that needs it — Reasoning and Vision both accept a file ID, and batch and fine-tuning jobs reference uploaded files the same way.

What is the purpose field for?

It tells OpenAI what the file is for — assistants, fine-tuning, batch processing or vision — and the wrong purpose means the file cannot be used by the operation you intended.

How does the file reach the node?

As binary data on the incoming item, sent as multipart/form-data, so it chains directly after a download or read-file step.

What comes back?

A file object with id, filename, byte size, purpose and status.

Build with the OpenAI File Upload node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need OpenAI credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.