Upload File
Available for: Chatflow, Workflow, New Agent, Chatbot, Agent, Text Generator apps.
Upload a file for use when sending messages, enabling multimodal understanding of images, documents, audio, and video. Uploaded files are for use by the current end-user only.
Authorizations
API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer. Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences. Requests with a missing or invalid API key fail with HTTP 401 and error code unauthorized.
Body
File upload request. Requires multipart/form-data.
The file to be uploaded. Supported types include images, documents, audio, and video.
Identifier for the end user, defined by your application's rules and unique within the app. Service API and WebApp user IDs are separate, even when identical. If omitted, the upload is attributed to the shared DEFAULT-USER end user; a file can only be used later by requests carrying the same user value.
Response
File uploaded successfully.
Unique file ID.
File name.
File size in bytes.
File extension.
MIME type of the file.
ID of the user who uploaded the file.
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.