> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opencomputer.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Checkpoint

Create a checkpoint of the sandbox state. Each sandbox can have up to 10 full
checkpoints and up to 100 disk-only checkpoints. By default, creating past the
limit for that checkpoint type returns an error. Set `retentionPolicy.mode` to
`delete_oldest` to delete the oldest eligible checkpoint of the same type first
so the new checkpoint can be created.

<ParamField path="id" type="string" required>
  Sandbox ID
</ParamField>

<ParamField body="name" type="string" required>
  Checkpoint name (unique per sandbox)
</ParamField>

<ParamField body="kind" type="string" default="full">
  Checkpoint type. Use `full` to preserve disk, memory, and CPU state, or
  `disk_only` to preserve only disk state with a larger per-sandbox limit.
</ParamField>

<ParamField body="retentionPolicy" type="object">
  Optional retention policy. Use `{ "mode": "delete_oldest", "maxCount": 10 }`
  for full checkpoints or `{ "mode": "delete_oldest", "maxCount": 100 }` for
  disk-only checkpoints to delete the oldest eligible checkpoint of the same
  type before creating a new one.
</ParamField>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "cp-abc123",
    "sandboxID": "sb-abc123",
    "name": "before-migration",
    "status": "processing",
    "sizeBytes": 0,
    "createdAt": "2025-01-15T10:30:00Z"
  }
  ```
</ResponseExample>
