---
title: "Upload Pipeline File"
method: POST
path: "/datasets/pipeline/file-upload"
tags: ["Knowledge Pipeline"]
---

# Upload Pipeline File

`POST /datasets/pipeline/file-upload`

Uploads a file for use in a knowledge pipeline. Use the returned `id` as the `reference` of a `local_file` item in [Run Pipeline](/en/api-reference/knowledge-pipeline/run-pipeline).

## Response `201`

File uploaded successfully.

- object
  - `id` string — Unique identifier of the uploaded file.
  - `name` string — Original file name.
  - `size` integer — File size in bytes.
  - `extension` string — File extension.
  - `mime_type` string, nullable — MIME type of the file. May be `null` if the upload did not include one.
  - `created_by` string — ID of the user who uploaded the file.
  - `created_at` string, nullable — Upload timestamp in ISO 8601 format. May be `null` while the record is being created.

## Other responses

- `400` — - `no_file_uploaded` : No file was provided in the request. - `filename_not_exists_error` : The uploaded file has no filename. - `too_many_files` : Only one file is allowed per request.
- `413` — `file_too_large` : The file exceeds the upload size limit.
- `415` — `unsupported_file_type` : The file type is not supported.

---

[API](https://skmtc.net/langgenius/apis/dify-service-api.md) · [All operations](https://skmtc.net/langgenius/apis/dify-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langgenius/dify-service-api/revisions/e49b3db72bad/schema)
