---
title: "Begin a large upload into /workspace: declare the size and SHA-256."
method: POST
path: "/v1/sandboxes/{id}/uploads"
tags: ["files"]
---

# Begin a large upload into /workspace: declare the size and SHA-256.

`POST /v1/sandboxes/{id}/uploads`

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/sandboxes/{id}/uploads`
- Auth: HTTP bearer

Then PUT each 1 MiB chunk (offset a multiple of chunkBytes; the last may be shorter), in any order and several at once, and commit. The file appears atomically only if every byte matches the digest.

## Path parameters

- `id` string, required: Resource identifier (UUID).

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `path` string, required: Absolute path under /workspace, e.g. /workspace/data/model.bin. To place the file elsewhere, move it with exec after the commit.
  - `size` integer, required
  - `sha256` string, required
  - `mode` string: Octal permissions for the file, e.g. 755 for a program. Default 644. No set-id or sticky bits.

## Response `200`

Success

- object
  - `uploadId` string, required
  - `chunkBytes` integer, required: Send chunks of this size.
  - `parallel` boolean: Chunks may be sent at the same time.
  - `replayed` boolean
  - `mode` string: Octal permissions for the file, e.g. 755 for a program. Default 644. No set-id or sticky bits.

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
