Skip to main content
POST
/
api
/
v1
/
vms
/
{id}
/
save-image
Save VM disk as custom image
curl --request POST \
  --url https://api.rafftechnologies.com/api/v1/vms/{id}/save-image \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --header 'X-Project-ID: <x-project-id>' \
  --data '
{
  "name": "web-server-baseline",
  "description": "<string>",
  "disk_id": 0,
  "snapshot_id": -1
}
'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "region": "us-east",
    "version": "<string>",
    "description": "<string>",
    "os_type": "<string>",
    "is_windows": true,
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.rafftechnologies.com/llms.txt

Use this file to discover all available pages before exploring further.

Updated May 8, 2026

Authorizations

X-API-Key
string
header
required

API key for authentication. Each key is bound to a specific account.

Headers

X-Project-ID
string<uuid>
required

Project ID. Required for all mutating operations (create, delete, power actions, resize).

Path Parameters

id
string<uuid>
required

VM ID (UUID)

Body

application/json
name
string
required

Custom image name.

Required string length: 1 - 128
Example:

"web-server-baseline"

description
string

Optional description for the saved image.

disk_id
integer
default:0

Which disk to capture. 0 for the OS disk, 1+ for attached volumes.

snapshot_id
integer
default:-1

Source for the image. -1 captures the current live disk state. Pass a snapshot ID to capture from a saved snapshot.

Response

Image creation initiated

success
boolean
data
object

A custom OS image saved from a VM disk. Use id as template_id when creating new VMs.

Last modified on May 8, 2026