---
title: "Upload one part of a larger file (upload_id, part_index in body)"
method: POST
path: "/preview/nodes/{name}/files/parts"
tags: ["nodes"]
---

# Upload one part of a larger file (upload_id, part_index in body)

`POST /preview/nodes/{name}/files/parts`

## Request

- Base URL: `https://autoresearch.sfcompute.com`
- URL: `https://autoresearch.sfcompute.com/preview/nodes/{name}/files/parts`
- Auth: HTTP bearer

Upload a file too big for one write_file call, in parts: send each part with the same upload_id and a 0-based part_index (each part at most max_write_file_bytes decoded - 4 MiB by default - base64 for binary), then call commit_file_parts once with the path, part_count and the whole file's sha256. Parts land as files under ~/.givemeanode/uploads/<upload_id>/ on the node's own disk: nothing is stored server-side, and a stopped node keeps them. Returns {written, upload_id, part_index, bytes_written, sha256, sha256_verified, upload_bytes}; the part is hashed on the node before it lands, exactly like write_file, and upload_bytes is the upload's running total. Re-sending a part_index overwrites that part, so a retry after a lost answer is safe; choose upload_id from the file (its sha256, or the first 16 hex chars) so a retried upload resumes instead of starting over. Ceilings: max_chunked_write_parts parts per upload and max_chunked_write_bytes for the whole file (list_limits; 256 parts and 256 MiB by default) - a bigger file goes through storage (`autor storage cp`, then import_data) or is pulled from inside the node. Calling this on a stopped node wakes it, exactly like write_file, and THE PART DOES NOT LAND on the queued/waking answers (written:false): re-send it once the node is running; to push many parts, wake the node, then hold_node, then send. Each part opens a billed session on the node's mission like any other exec. The answer's timing_ms says where a slow call spent its time: server is our whole handling of the call and exec the node leg, and a part lands in well under a second. Time past that is your client producing the content, so send text as utf8 (base64 only for binary) and use the biggest part your client allows. NOT for secrets (run_command's env). From a shell, `autor cp` takes this path by itself when a file is over the single-call cap.

## Path parameters

- `name` string, required: Node name (from `list_nodes`).

## Query parameters

- `workspace` string

## Request body

- object
  - `content` string, required: This part's bytes. UTF-8 text as-is; binary as base64 with encoding:"base64". At most max_write_file_bytes decoded (4 MiB by default; list_limits shows yours).
  - `encoding` string, nullable: "utf8" (default) or "base64".
  - `part_index` integer, required: This part's 0-based position in the file: 0 to part_count-1. Re-sending an index overwrites that part, so a retry is safe.
  - `upload_id` string, required: Your name for this upload: 1-64 characters of letters, digits, '.', '_' or '-', starting with a letter or digit. Pass the same one on every part and on the commit. Derive it from the file (its sha256, or the first 16 hex characters of it) so a retry after a lost answer resumes the same upload instead of starting a second one.

## Response `200`

The capability's JSON result.

- Result: The capability's result: the same object the MCP tool returns as structuredContent. Resources carry an `object` type discriminator and an immutable id; money is integer micro-dollars in `*_usd_micros` fields.
  - `object` string: The resource type, when the result is one resource.

## Other responses

- `400`: Malformed request: bad JSON, a parameter that does not parse, or a value outside its range. Code `invalid`.
- `401`: No bearer token, or one this API cannot verify. Code `unauthenticated`.
- `403`: Authenticated, but the token's scopes or the account's role do not reach this operation. The message names the scope word to request. Code `forbidden`.
- `404`: No such route. Code `not_found`; the body names the OpenAPI document.
- `422`: A well-formed request the platform declined: no such node, a cap reached, a state that forbids the move. The message says which, and what to do instead. Code `refused`.
- `429`: Over this door's per-customer budget. Wait `Retry-After` seconds. Code `rate_limited`.
- `500`: Our fault. Retry; if it persists, quote the request-id. Code `internal`.
- `503`: The node changed state under every pass this call made - a wake, a stop, or a container exit landing mid-call. Nothing ran and nothing was billed; the same call works shortly. Wait `Retry-After` seconds and repeat it. Code `settling`.

---

[API](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api.md) · [All operations](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/revisions/f88dcb70ac6c?raw)
