Knowledge Pipeline

Upload Pipeline File

Changed on

Uploads a file for use in a knowledge pipeline. Use the returned id as the reference of a local_file item in Run Pipeline.

post/datasets/pipeline/file-upload

Request

  • Base URL
    https://api.dify.ai/v1
  • URL
    https://api.dify.ai/v1/datasets/pipeline/file-upload
  • Auth
    HTTP bearer

Request body multipart/form-data

filestring binary required

The file to upload, as one multipart/form-data part. Document files are capped at 15 MB by default.

Self-hosted deployments adjust the limit with the UPLOAD_FILE_SIZE_LIMIT environment variable.

On Dify Cloud, Professional and Team plans raise the document cap to 50 MB. Images, audio, and video follow their own limits: 10 MB, 50 MB, and 100 MB by default.

Response

File uploaded successfully.

created_atstring nullable

Upload timestamp in ISO 8601 format. May be null while the record is being created.

created_bystring

ID of the user who uploaded the file.

extensionstring

File extension.

idstring

Unique identifier of the uploaded file.

mime_typestring nullable

MIME type of the file. May be null if the upload did not include one.

namestring

Original file name.

sizeinteger

File size in bytes.

Changes