Sign Up

Snapshots

List all snapshots

GET
/snapshots

Authorization

headerAuthorizationBearer <token>

API Key access

Query Parameters

page?integer

Page number of the results

Range1 <= value
Default1
limit?integer

Number of results per page

Range1 <= value <= 200
Default100
name?string

Filter by partial name match

sourceSandboxId?string

Filter by the ID of the sandbox the snapshot was created from

sort?string

Field to sort by

Default"lastUsedAt"
Value in"name""state""lastUsedAt""createdAt"
order?string

Direction to sort by

Default"desc"
Value in"asc""desc"

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

Paginated list of all snapshots

application/json
  1. response
items*array<>
total*integer
page*integer
totalPages*integer
curl -X GET 'http://localhost:3000/snapshots'
{  "total": 2,  "totalPages": 9,  "page": 7,  "items": [    {      "imageName": "imageName",      "buildInfo": "",      "cpu": 6.027456183070403,      "regionIds": [        "regionIds",        "regionIds"      ],      "gpu": 1.4658129805029452,      "organizationId": "organizationId",      "general": true,      "createdAt": "2000-01-23T04:56:07.000+00:00",      "disk": 5.637376656633329,      "ref": "daytonaio/sandbox:latest",      "size": 0.8008281904610115,      "mem": 5.962133916683182,      "lastUsedAt": "2000-01-23T04:56:07.000+00:00",      "entrypoint": [        "entrypoint",        "entrypoint"      ],      "errorReason": "errorReason",      "sourceSandboxId": "sandbox123",      "name": "name",      "id": "id",      "state": "",      "initialRunnerId": "runner123",      "gpuType": "H100",      "updatedAt": "2000-01-23T04:56:07.000+00:00",      "sandboxClass": "linux-vm"    },    {      "imageName": "imageName",      "buildInfo": "",      "cpu": 6.027456183070403,      "regionIds": [        "regionIds",        "regionIds"      ],      "gpu": 1.4658129805029452,      "organizationId": "organizationId",      "general": true,      "createdAt": "2000-01-23T04:56:07.000+00:00",      "disk": 5.637376656633329,      "ref": "daytonaio/sandbox:latest",      "size": 0.8008281904610115,      "mem": 5.962133916683182,      "lastUsedAt": "2000-01-23T04:56:07.000+00:00",      "entrypoint": [        "entrypoint",        "entrypoint"      ],      "errorReason": "errorReason",      "sourceSandboxId": "sandbox123",      "name": "name",      "id": "id",      "state": "",      "initialRunnerId": "runner123",      "gpuType": "H100",      "updatedAt": "2000-01-23T04:56:07.000+00:00",      "sandboxClass": "linux-vm"    }  ]}

Create a new snapshot

POST
/snapshots

Authorization

headerAuthorizationBearer <token>

API Key access

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Request Body

application/json
  1. body
name*string

The name of the snapshot

imageName?string

The image name of the snapshot

entrypoint?array<string>

The entrypoint command for the snapshot

cpu?integer

CPU cores allocated to the resulting sandbox

gpu?integer

GPU units allocated to the resulting sandbox

gpuType?array<>

Preferred GPU type for the resulting sandbox.

memory?integer

Memory allocated to the resulting sandbox in GB

disk?integer

Disk space allocated to the sandbox in GB

buildInfo?

Build information for the snapshot

regionId?string

ID of the region where the snapshot will be available. Defaults to organization default region if not specified.

sandboxClass?string

Target sandbox class. Determines which runners can host sandboxes created from this snapshot.

Value in"linux-vm""container""windows"

Response Body

The snapshot has been successfully created.

application/json
  1. response
id*string
organizationId?string
general*boolean
name*string
imageName?string
state*string
Value in"building""pending""pulling""snapshotting""active""inactive""error""build_failed""removing"
size*number|null
entrypoint*array<string>|null
cpu*number
gpu*number
gpuType?string

The GPU type assigned to the snapshot

Value in"H100""H200""B200""B300""RTX-PRO-6000""RTX-4090""RTX-5090""MI355X"
mem*number
disk*number
errorReason*string|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
lastUsedAt*|
Formatdate-time
buildInfo?

Build information for the snapshot

regionIds?array<string>

IDs of regions where the snapshot is available

initialRunnerId?string

The initial runner ID of the snapshot

ref?string

The snapshot reference

sourceSandboxId*|

The ID of the sandbox the snapshot was created from

sandboxClass?string

The sandbox class of the snapshot

Value in"linux-vm""container""windows"
curl -X POST 'http://localhost:3000/snapshots' \  -H 'Content-Type: application/json' \  -d '{  "disk": 3,  "imageName": "ubuntu:22.04",  "memory": 1,  "buildInfo": "",  "regionId": "regionId",  "entrypoint": "sleep infinity",  "name": "ubuntu-4vcpu-8ram-100gb",  "cpu": 1,  "gpu": 0,  "gpuType": [    "H100"  ],  "sandboxClass": "linux-vm"}'
{  "imageName": "imageName",  "buildInfo": "",  "cpu": 6.027456183070403,  "regionIds": [    "regionIds",    "regionIds"  ],  "gpu": 1.4658129805029452,  "organizationId": "organizationId",  "general": true,  "createdAt": "2000-01-23T04:56:07.000+00:00",  "disk": 5.637376656633329,  "ref": "daytonaio/sandbox:latest",  "size": 0.8008281904610115,  "mem": 5.962133916683182,  "lastUsedAt": "2000-01-23T04:56:07.000+00:00",  "entrypoint": [    "entrypoint",    "entrypoint"  ],  "errorReason": "errorReason",  "sourceSandboxId": "sandbox123",  "name": "name",  "id": "id",  "state": "",  "initialRunnerId": "runner123",  "gpuType": "H100",  "updatedAt": "2000-01-23T04:56:07.000+00:00",  "sandboxClass": "linux-vm"}
GET
/snapshots/{id}

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

id*string

Snapshot ID or name

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

The snapshot

application/json
  1. response
id*string
organizationId?string
general*boolean
name*string
imageName?string
state*string
Value in"building""pending""pulling""snapshotting""active""inactive""error""build_failed""removing"
size*number|null
entrypoint*array<string>|null
cpu*number
gpu*number
gpuType?string

The GPU type assigned to the snapshot

Value in"H100""H200""B200""B300""RTX-PRO-6000""RTX-4090""RTX-5090""MI355X"
mem*number
disk*number
errorReason*string|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
lastUsedAt*|
Formatdate-time
buildInfo?

Build information for the snapshot

regionIds?array<string>

IDs of regions where the snapshot is available

initialRunnerId?string

The initial runner ID of the snapshot

ref?string

The snapshot reference

sourceSandboxId*|

The ID of the sandbox the snapshot was created from

sandboxClass?string

The sandbox class of the snapshot

Value in"linux-vm""container""windows"
curl -X GET 'http://localhost:3000/snapshots/string'
{  "imageName": "imageName",  "buildInfo": "",  "cpu": 6.027456183070403,  "regionIds": [    "regionIds",    "regionIds"  ],  "gpu": 1.4658129805029452,  "organizationId": "organizationId",  "general": true,  "createdAt": "2000-01-23T04:56:07.000+00:00",  "disk": 5.637376656633329,  "ref": "daytonaio/sandbox:latest",  "size": 0.8008281904610115,  "mem": 5.962133916683182,  "lastUsedAt": "2000-01-23T04:56:07.000+00:00",  "entrypoint": [    "entrypoint",    "entrypoint"  ],  "errorReason": "errorReason",  "sourceSandboxId": "sandbox123",  "name": "name",  "id": "id",  "state": "",  "initialRunnerId": "runner123",  "gpuType": "H100",  "updatedAt": "2000-01-23T04:56:07.000+00:00",  "sandboxClass": "linux-vm"}

Delete snapshot

DELETE
/snapshots/{id}

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

id*string

Snapshot ID

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

Snapshot has been deleted

curl -X DELETE 'http://localhost:3000/snapshots/string'
Empty

Get snapshot build logs

Deprecated
GET
/snapshots/{id}/build-logs

This endpoint is deprecated. Use getSnapshotBuildLogsUrl instead.

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

id*string

Snapshot ID

Query Parameters

follow?boolean

Whether to follow the logs stream

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

curl -X GET 'http://localhost:3000/snapshots/string/build-logs'
Empty
GET
/snapshots/{id}/build-logs-url

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

id*string

Snapshot ID

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

The snapshot build logs URL

application/json
  1. response
url*string

URL response

curl -X GET 'http://localhost:3000/snapshots/string/build-logs-url'
{  "url": "url"}

Activate a snapshot

POST
/snapshots/{id}/activate

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

id*string

Snapshot ID

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

The snapshot has been successfully activated.

application/json
  1. response
id*string
organizationId?string
general*boolean
name*string
imageName?string
state*string
Value in"building""pending""pulling""snapshotting""active""inactive""error""build_failed""removing"
size*number|null
entrypoint*array<string>|null
cpu*number
gpu*number
gpuType?string

The GPU type assigned to the snapshot

Value in"H100""H200""B200""B300""RTX-PRO-6000""RTX-4090""RTX-5090""MI355X"
mem*number
disk*number
errorReason*string|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
lastUsedAt*|
Formatdate-time
buildInfo?

Build information for the snapshot

regionIds?array<string>

IDs of regions where the snapshot is available

initialRunnerId?string

The initial runner ID of the snapshot

ref?string

The snapshot reference

sourceSandboxId*|

The ID of the sandbox the snapshot was created from

sandboxClass?string

The sandbox class of the snapshot

Value in"linux-vm""container""windows"
curl -X POST 'http://localhost:3000/snapshots/string/activate'
{  "imageName": "imageName",  "buildInfo": "",  "cpu": 6.027456183070403,  "regionIds": [    "regionIds",    "regionIds"  ],  "gpu": 1.4658129805029452,  "organizationId": "organizationId",  "general": true,  "createdAt": "2000-01-23T04:56:07.000+00:00",  "disk": 5.637376656633329,  "ref": "daytonaio/sandbox:latest",  "size": 0.8008281904610115,  "mem": 5.962133916683182,  "lastUsedAt": "2000-01-23T04:56:07.000+00:00",  "entrypoint": [    "entrypoint",    "entrypoint"  ],  "errorReason": "errorReason",  "sourceSandboxId": "sandbox123",  "name": "name",  "id": "id",  "state": "",  "initialRunnerId": "runner123",  "gpuType": "H100",  "updatedAt": "2000-01-23T04:56:07.000+00:00",  "sandboxClass": "linux-vm"}

Deactivate a snapshot

POST
/snapshots/{id}/deactivate

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

id*string

Snapshot ID

Header Parameters

X-Daytona-Organization-ID?string

Use with JWT to specify the organization ID

Response Body

The snapshot has been successfully deactivated.

curl -X POST 'http://localhost:3000/snapshots/string/deactivate'
Empty