Skip to main content
Create an instance
Create a Compute VM or container using a hardware preset and an image. The instance uses the last public key you registered through the API or the Compute console. For the full workflow, see Create an instance using the Compute API.

Before you send the request

Choose a preset from List presets and an image from List images. The preset determines the hardware and location. Match image_type to the type used when listing images. A prepaid account needs enough credit for one hour of the selected preset. Availability can change between listing presets and creating the instance.

Request

All four fields are required in the JSON body.
Replace YOUR_PRESET_ID and YOUR_IMAGE_ID with values from the catalogue. For a container, use image_type: "container" and a container image ID.

Response and readiness

A successful create returns 201 Created. Read instance.instance_id from the response. If instance contains only instance_id, creation still succeeded. Poll Get instance until status reaches RUNNING. Creation can succeed before the instance is ready. Use the connection command shown in the Compute console to connect.

Errors and retries

A no-capacity 409 does not include Retry-After. Choose another compatible preset or try again later.
Creation is not idempotent. Each successful call creates a separately billed instance, even with the same name and body. After a lost response, connection failure, or 500, 503, or 504, check List instances before you submit again.
This release does not support startup scripts, tags, or renaming and retagging instances through PATCH.

Authorizations

Authorization
string
header
required

An API key issued by Hive Compute support. See Authentication above for how to request one.

Body

application/json
name
string
required

Letters, digits, hyphens and underscores.

Maximum string length: 255
Pattern: ^[a-zA-Z0-9_-]+$
Example:

"training-run-1"

preset_id
string<uuid>
required

The id of a preset from GET /presets.

image_type
enum<string>
required

The type of the image. Case-insensitive.

Available options:
vm,
container
image_id
string
required

The id of an image from GET /images of that type.

Maximum string length: 255
Example:

"ubuntu24.04"

Response

The instance was created and is starting.

instance
object

The instance, as GET /instances/{id} returns it. When it could not be read right after the create, it holds only instance_id: the instance exists, so read it with GET /instances/{id} rather than creating again.