Files
Upload File
Changed onAvailable 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: only requests carrying the same user can reference it.
Which file types an app actually consumes depends on its file-upload settings; read them from Get App Parameters.
post/files/upload
Request
- Base URLhttps://api.dify.ai/v1
- URLhttps://api.dify.ai/v1/files/upload
- AuthHTTP bearer
Request body multipart/form-data
Response
File uploaded successfully.
Changes
- info
added the optional property
to the response with the status
- info