---
title: "Upload File"
method: POST
path: "/api/v1/files"
tags: ["Files"]
---

# Upload File

`POST /api/v1/files`

Upload a file directly using multipart/form-data.

## Query parameters

- `external_file_id` string, nullable
- `storage_type` string, nullable
- `project_id` string, uuid, nullable
- `organization_id` string, uuid, nullable

## Cookies

- `session` string, nullable

## Response `200`

Successful Response

- File — Schema for a file.
  - `id` string, uuid, required — Unique identifier
  - `created_at` string, date-time, nullable — Creation datetime
  - `updated_at` string, date-time, nullable — Update datetime
  - `name` string, required
  - `external_file_id` string, nullable — The ID of the file in the external system
  - `file_size` integer, nullable — Size of the file in bytes
  - `file_type` string, nullable — File type (e.g. pdf, docx, etc.)
  - `project_id` string, uuid, required — The ID of the project that the file belongs to
  - `last_modified_at` string, date-time, nullable — The last modified time of the file
  - `resource_info` object, nullable — Resource information for the file
  - `permission_info` object, nullable — Permission information for the file
  - `data_source_id` string, uuid, nullable — The ID of the data source that the file belongs to
  - `expires_at` string, date-time, nullable — The expiration date for the file. Files past this date can be deleted.
  - `purpose` string, nullable — The intended purpose of the file (e.g., 'user_data', 'parse', 'extract', 'split', 'classify')

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.dev/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/run-llama/llama-platform/revisions/01ac7197eb4a/schema)
