Create allocates a machine from a template, applies CPU, memory, timeout, environment, metadata, network, desktop, and volume options, and returns a machine ID once the runtime is ready to accept work.

What state changes

  • A new machine enters the running set for your API key.
  • Template runtime defaults and create-time overrides become the machine’s initial process and filesystem environment.
  • Optional public traffic credentials are minted for exposed ports.

Usage

from nullspace import Machine

with Machine.create(template="base", timeout=300) as machine:
    print(machine.id)
    result = machine.commands.run("pwd", shell=True)
    print(result.stdout.strip())
API reference: createMachine (POST /v1/machines). Guide: Machines. Example: Examples.