Upload File
Available for: Workflow, Chatflow
Uploads a file for use in requests to this app in this environment.
The returned id works only for requests that carry the same user, to the same app and environment. A single run can reference at most 100 files.
Standard API equivalent: Upload File. Differences:
useris required.- The response’s
source_urlis a signed download URL. - The combined size of all parts arriving before the
userfield is capped at 100 MiB. - Error codes differ.
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
File upload request. Requires multipart/form-data.
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. The file belongs to this user in this app and environment. Send this part before the file part when possible; the combined size of parts arriving before it is capped at 100 MiB. See End User Identity.
512Response
The stored file, with the id to reference in a run.
Unique file ID.
Opaque file reference used internally when attaching files in agent and tool contexts. Always null for files uploaded through this endpoint.
File name.
File size in bytes.
File extension.
MIME type of the file.
End-user ID of the uploader. Look up details with Get End User Info.
Upload timestamp (Unix epoch seconds).
Preview URL for the file.
Signed URL for downloading the file.
Original URL of the file.
Unused; always null.
ID of the associated tenant.
ID of the associated conversation.
Unused; always null.