---
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

---

[API](https://skmtc.net/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.net/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/run-llama/llama-platform/versions/b17341164de9/schema)
