Skip to content
Get started

Create a snapshot for an instance

client.instances.snapshots.create(stringid, SnapshotCreateParams { kind, name, tags } body, RequestOptionsoptions?): Snapshot { id, created_at, kind, 6 more }
post/instances/{id}/snapshots

Create a snapshot for an instance

ParametersExpand Collapse
id: string
body: SnapshotCreateParams { kind, name, tags }

Snapshot capture kind

Accepts one of the following:
"Standby"
"Stopped"
name?: string

Optional snapshot name (lowercase letters, digits, and dashes only; cannot start or end with a dash)

maxLength63
tags?: Record<string, string>

User-defined key-value tags.

ReturnsExpand Collapse
Snapshot { id, created_at, kind, 6 more }
id: string

Auto-generated unique snapshot identifier

created_at: string

Snapshot creation timestamp

formatdate-time

Snapshot capture kind

Accepts one of the following:
"Standby"
"Stopped"
size_bytes: number

Total payload size in bytes

formatint64
source_hypervisor: "cloud-hypervisor" | "firecracker" | "qemu" | "vz"

Source instance hypervisor at snapshot creation time

Accepts one of the following:
"cloud-hypervisor"
"firecracker"
"qemu"
"vz"
source_instance_id: string

Source instance ID at snapshot creation time

source_instance_name: string

Source instance name at snapshot creation time

name?: string | null

Optional human-readable snapshot name (unique per source instance)

tags?: Record<string, string>

User-defined key-value tags.

Create a snapshot for an instance
import Hypeman from '@onkernel/hypeman';

const client = new Hypeman({
  apiKey: 'My API Key',
});

const snapshot = await client.instances.snapshots.create('id', { kind: 'Standby' });

console.log(snapshot.id);
{
  "id": "q7z1w7l2af4l8y7q1h7g2m3s",
  "created_at": "2026-03-06T13:56:11Z",
  "kind": "Standby",
  "size_bytes": 104857600,
  "source_hypervisor": "cloud-hypervisor",
  "source_instance_id": "qilviffnqzck2jrim1x6s2b1",
  "source_instance_name": "nginx1",
  "name": "baseline-standby",
  "tags": {
    "team": "backend",
    "env": "staging"
  }
}
Returns Examples
{
  "id": "q7z1w7l2af4l8y7q1h7g2m3s",
  "created_at": "2026-03-06T13:56:11Z",
  "kind": "Standby",
  "size_bytes": 104857600,
  "source_hypervisor": "cloud-hypervisor",
  "source_instance_id": "qilviffnqzck2jrim1x6s2b1",
  "source_instance_name": "nginx1",
  "name": "baseline-standby",
  "tags": {
    "team": "backend",
    "env": "staging"
  }
}