Skip to content
NimbusNexus

VM sizes

A VM size is a flavor: a vCPU count (vcpus), RAM in MB (ram) and swap in MB (swap). You don't pick a flavor when you create a VM: you set spec.cpu and spec.ram, and the API uses a flavor with exactly those numbers, creating one if none exists. The boot disk isn't part of the flavor; it's a separate volume.

Architecture and VM class

Besides cpu and ram, a VM's spec names an architecture and a vm_class. Together they pick the product the VM is billed as. The ones on offer in your session's region are in vm_options from GET /api/v1/instance/artifacts.

Naming convention

Read a flavor's shape from vcpus, ram and swap, not from its name. A flavor the API creates for a VM is named after its id, a UUID, and so is one made with POST /api/v1/flavor/ without a name. GET /api/v1/flavor/ filters on the shape with min_vcpus, max_vcpus, min_ram, max_ram, min_swap and max_swap.

Prices depend on the architecture, vm_class, cpu and ram; see Pricing data.

Resizing

A VM can move between sizes without re-provisioning. Send POST /api/v1/instance/{instance_id}/resize with a new spec (architecture, vm_class, cpu, ram). The VM restarts on the new flavor and waits in VERIFY_RESIZE: POST /api/v1/instance/{instance_id}/confirm_resize keeps the new size, and POST /api/v1/instance/{instance_id}/revert_resize goes back to the old one. Both answer 400 if the VM isn't in VERIFY_RESIZE.

What's next

  • Virtual machines — endpoints that actually provision a VM at one of these sizes.
  • VM images — the OS templates you boot the VM with.
  • SSH keys — public keys injected into VMs at boot.

Reference

GET/api/v1/flavor/

List Flavors

List available compute flavors (instance types defining vCPU, RAM, disk and swap).

Parameters

NameInTypeDescription
min_vcpusqueryinteger | null—
max_vcpusqueryinteger | null—
min_ramqueryinteger | null—
max_ramqueryinteger | null—
min_swapqueryinteger | null—
max_swapqueryinteger | null—
extra_specsqueryarray of string—
vcpu_weightqueryinteger | null—
rxtx_factorquerynumber | null—

Responses

  • 200Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/flavor/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/flavor/

Create Flavor

Create a new compute flavor definition.

Request body

FieldTypeDescription
vcpus*integer—
ram*integer—
swapinteger | null—
rxtx_factor*number—
extra_specsobject | null—
namestring | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/flavor/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "vcpus": 1,
    "ram": 1,
    "rxtx_factor": 0
  }'

Need to make a real call? Try these endpoints in the live Swagger UI →