Upload File
Available for: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps.
Uploads a file and returns its id for later requests to reference. The file belongs to the uploading end user: runs of this app can reference it only when they send the same user.
Which file types an app actually consumes depends on its file-upload settings; read them from Get App Parameters.
For deployed environments, use the deployed-environment variant instead.
Authorizations
Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).
Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).
Body
The file to upload, as one multipart/form-data part. The filename must not contain / or \.
Any extension is accepted unless it is on the deployment's security blacklist (UPLOAD_FILE_EXTENSION_BLACKLIST, empty by default).
Default size limits per category: images 5 MB (10 MB on Docker Compose deployments), audio 50 MB, video 100 MB, other files 15 MB. Your platform administrator can change them with the UPLOAD_*_FILE_SIZE_LIMIT environment variables.
End-user identifier, defined by your app and unique within it. Use the user you'll send when you run the app with this file. If you omit it, the file belongs to the app's shared end user DEFAULT-USER, and only a run that sends "user": "DEFAULT-USER" can use it. See End User Identity.
Response
File uploaded successfully.
End-user ID of the uploader. Look up details with Get End User Info.