---
title: "Upload a checkpoint."
method: POST
path: "/v1/checkpoints"
tags: ["checkpoints"]
---

# Upload a checkpoint.

`POST /v1/checkpoints`

## Request

- Base URL: `https://api.smolmachines.com`
- URL: `https://api.smolmachines.com/v1/checkpoints`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/smolmachines/apis/smolfleet-api/docs/v1/checkpoints/post.ts> (a function with typed inputs; its response is checked against the schema)

Starts uploading a `.checkpoint` file captured outside the cloud, such as a
machine checkpointed on a laptop. `PUT` each consecutive `partSizeBytes`
slice of the file to the matching URL, then complete the upload. Requires the
`machine:create` scope.

## Request body

- CreateCheckpointUploadRequest: Start uploading a `.checkpoint` file captured outside the cloud, such as on a laptop with `smolvm machine checkpoint`.
  - `image` string, nullable: OCI image the checkpointed machine was created from, when the client knows it. A checkpoint records only its machine, so without this the restored machine's source is unknown.
  - `sizeBytes` integer, required: Exact size of the file in bytes.

## Response `201`

Upload URLs for each part

- CheckpointUpload: Where to send a checkpoint file's bytes. Each URL takes one consecutive `partSizeBytes` slice of the file, the last one the remainder, with a plain HTTP `PUT` and no authorization header. Then call `POST /v1/checkpoints/{id}/complete`.
  - `checkpoint` PortableCheckpointInfo, required: Portable live-state capture; only `available` denotes a completed upload.
    - `arch` string, required
    - `createdAt` string, required
    - `downloadUrl` string, required: Authenticated endpoint that downloads the `.smolcheckpoint` file.
    - `engineVersion` string, nullable: smolvm version of the node that captured it. A restore is only placed on a node at this version or newer. Absent for older checkpoints, which restore anywhere.
    - `id` string, required
    - `machineDeleted` boolean: The machine it was captured from has been deleted. The checkpoint stays until it is deleted itself, and can still be restored or downloaded.
    - `machineId` string, required
    - `sizeBytes` integer, required
    - `status` string, required: `creating`, `uploading`, `available`, `failed`, or `deleting`.
  - `expiresAt` string, required: When the upload URLs stop working (RFC 3339).
  - `partSizeBytes` integer, required
  - `uploadUrls` string[], required

## Other responses

- `400`: Key is not tenant-scoped
- `401`: Missing or invalid API key
- `403`: Key lacks the required scope
- `422`: Size out of range
- `429`: Rate limited; retry after the Retry-After header
- `500`: Internal error
- `503`: Checkpoint storage unavailable

## Changes

- **2026-10-16** `bc31fc04a568`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/smolmachines/apis/smolfleet-api/changes/v1/checkpoints/post.md)

---

[API](https://skmtc.dev/smolmachines/apis/smolfleet-api.md) - [All operations](https://skmtc.dev/smolmachines/apis/smolfleet-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smolmachines/apis/smolfleet-api/revisions/bc31fc04a568?raw)
