---
title: "Reserve an upload (step 1 of 3)"
method: POST
path: "/files"
---

# Reserve an upload (step 1 of 3)

`POST /files`

## Request

- Base URL: `https://cactuscompute.com/v1`
- URL: `https://cactuscompute.com/v1/files`
- Auth: HTTP bearer

## Request body

- object
  - `name` string, required
  - `bytes` integer, required

## Response `201`

Reservation

- Upload
  - `id` string, required: Upload id (bare uuid); the file id after `complete` is `file-<this>`
  - `url` string, uri, required: PUT the raw bytes here with Content-Type application/octet-stream
  - `expires_at` string, date-time, required

## Other responses

- `4XX`: The request was rejected; `code` says why and `url` (when present) is the console page that clears it

---

[API](https://skmtc.dev/cactuscompute/apis/needle-fine-tuning-api.md) - [All operations](https://skmtc.dev/cactuscompute/apis/needle-fine-tuning-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cactuscompute/apis/needle-fine-tuning-api/revisions/227acc9b45e8?raw)
