Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceComputeSnapshots

Fork a new VM from a snapshot

Creates a VM from a snapshot, taking its GPU model and count, image, env vars, port and the source VM's SSH keys unless the request overrides them. The disk is never smaller than the snapshot's, and an unnamed fork is called fork-<snapshot name>. A valid request with no free capacity answers 503. The response carries the new VM's id, name and status.

Required permission

Requires the compute.create permission. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

orl vms fork --snapshot-id <snapshot-id>
POST
/v1/orgs/{orgId}/vms/fork

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

orgId*string

Request Body

application/json
  1. body
snapshotId*string
name?string
gpuModelId?string
Lengthlength <= 256
gpuCount?integer
resourceSize?string
diskSizeGb?integer
imageUrl?string
envVars?
containerPort?integer
sshKeyIds?array<string>

Org SSH key ids for the fork. Omit to carry the source VM's keys over. Every resulting id must name a live key of this org, so forking a source whose keys are gone requires naming a replacement set here.

Items1 <= items <= 64

Response Body

Created

application/json
  1. response
id*string
name*string
status*string
Example Request
curl -X POST 'https://api.openrelay.inc/v1/orgs/string/vms/fork' \  -H 'Content-Type: application/json' \  -d '{  "snapshotId": "string"}'
Example Response
{  "id": "string",  "name": "string",  "status": "string"}