---
title: "Capture a snapshot from a sandbox"
method: POST
path: "/v2/sandboxes/boxes/{name}/snapshot"
tags: ["sandboxes"]
---

# Capture a snapshot from a sandbox

`POST /v2/sandboxes/boxes/{name}/snapshot`

Create a snapshot by capturing the current state of a sandbox or promoting an existing checkpoint.

## Path parameters

- `name` string, required

## Request body

- SandboxesCaptureSnapshotPayload
  - `checkpoint` string — if omitted, creates a fresh checkpoint from the running VM
  - `docker_image` string — sandbox-local Docker image to export
  - `fs_capacity_bytes` integer — required for Docker image export unless the sandbox has a capacity
  - `include_memory` boolean — IncludeMemory, when true, captures a full VM memory snapshot alongside the filesystem clone. Only honored when the sandbox is running AND Checkpoint is omitted (i.e. a fresh in-VM checkpoint is requested). Defaults to false to keep snapshots small unless memory restore is explicitly desired.
  - `name` string, required

## Response `201`

Created

- SandboxesSnapshotResponse
  - `created_at` string
  - `created_by` string
  - `docker_image` string
  - `fs_capacity_bytes` integer
  - `fs_used_bytes` integer
  - `id` string
  - `image_digest` string
  - `memory_snapshot_size_bytes` integer — MemorySnapshotSizeBytes is non-nil iff the snapshot was captured with VM memory state. A non-nil value is the canonical signal that this snapshot can warm-restore from memory; nil means rootfs only.
  - `name` string
  - `registry_id` string
  - `source_sandbox_id` string
  - `status` string
  - `status_message` string
  - `updated_at` string

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/langchain-ai/apis/langsmith.md) · [All operations](https://skmtc.net/langchain-ai/apis/langsmith/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langchain-ai/langsmith/revisions/a0acb3a6a101/schema)
