---
title: "Deploy an instant virtual machine"
method: POST
path: "/virtual-machines/instant"
tags: ["Virtual Machines"]
---

# Deploy an instant virtual machine

`POST /virtual-machines/instant`

## Request

- Base URL: `https://cloud-api.voltagepark.com/api/v1`
- URL: `https://cloud-api.voltagepark.com/api/v1/virtual-machines/instant`
- Auth: one of:
  - HTTP bearer
  - API key in header `UI-Authorization`
- TypeScript: <https://skmtc.dev/voltagepark/apis/voltage-park-on-demand-api/docs/virtual-machines/instant/post.ts> (a function with typed inputs; its response is checked against the schema)

Using a preset found at `/virtual-machines/instant/locations`, deploy a preconfigured virtual machine in seconds.

## Request body

- InstantVMConfig
  - `config_id` string, uuid, required
  - `name` string, required
  - `password` string, nullable
  - `organization_ssh_keys` union: Configuration for organization-associated SSH keys. Can select all, none, or select keys by ID. Either this or `ssh_keys` must be provided.
    - OrganizationSshKeysSelectiveConfig
      - `mode` 'selective', required
      - `ssh_key_ids` string[], required: SSH key IDs can be found with the GET `/organization/ssh-keys` route.
    - OrganizationSshKeysNonSelectiveConfig
      - `mode` 'all' | 'none', required
  - `ssh_keys` string[]: A list of SSH keys which will be added to this deploy only. Either this or `organization_ssh_keys` must be provided.
  - `cloud_init` InstantCloudInit
    - `packages` string[]
    - `write_files` CloudInitWriteFile[]
      - `encoding` string, nullable
      - `content` string, required
      - `owner` string, nullable
      - `path` string, required
      - `permissions` string, nullable
    - `runcmd` string[]
  - `tags` string[]

## Response `201`

Successful Response

- InstantVMResult
  - `vm_id` string, uuid, required

## Other responses

- `400`: Bad Request
- `422`: Validation Error

---

[API](https://skmtc.dev/voltagepark/apis/voltage-park-on-demand-api.md) - [All operations](https://skmtc.dev/voltagepark/apis/voltage-park-on-demand-api/llms.txt) - [OpenAPI document](https://skmtc.dev/voltagepark/apis/voltage-park-on-demand-api/revisions/11c2e9146826?raw)
