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

# Upload File

`POST /api/v1/beta/files`

Upload a file using multipart/form-data.

Set `purpose` to indicate how the file will be used:
`user_data`, `parse`, `extract`, `classify`, `split`,
`sheet`, or `agent_app`.

Returns the created file metadata including its ID for use
in subsequent parse, extract, or classify operations.

## Query parameters

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

## Cookies

- `session` string, nullable

## Response `201`

Successful Response

- FileV2 — An uploaded file.
  - `id` string, required — Unique file identifier
  - `name` string, required — File name including extension
  - `external_file_id` string, nullable — Optional ID for correlating with an external system
  - `file_type` string, nullable — File extension (pdf, docx, png, etc.)
  - `project_id` string, uuid, required — Project this file belongs to
  - `last_modified_at` string, date-time, nullable — When the file was last modified (ISO 8601)
  - `expires_at` string, date-time, nullable — When the file expires and may be automatically removed. Null means no expiration.
  - `purpose` string, nullable — How the file will be used: user_data, parse, extract, classify, split, sheet, or agent_app
  - `download_url` PresignedUrl — Schema for a presigned URL.
    - `url` string, uri, required — A presigned URL for IO operations against a private file
    - `expires_at` string, date-time, required — The time at which the presigned URL expires
    - `form_fields` object, nullable — Form fields for a presigned POST request

## Other responses

- `422` — Validation Error

## Changes

- **2026-06-09** `b17341164de9` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-05-23** `34da5826db1c` — 1 info
  - added the optional property `download_url` to the response with the `201` status
- **2026-05-21** `fb63fb8d662c` — 1 warning
  - removed the optional property `download_url` from the response with the `201` status
- **2026-05-16** `c317ed7c691a` — 1 info
  - added the optional property `download_url` to the response with the `201` status
- **2026-05-14** `1bbc901f8c0d` — 1 warning
  - removed the optional property `download_url` from the response with the `201` status

[Full history](https://skmtc.dev/run-llama/apis/llama-platform/changes/api/v1/beta/files/post.md)

---

[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/b17341164de9/schema)
