Launch a CPU VM
Create an Ubuntu VM in a private subnet and follow its provisioning operation.
Use the Compute API to launch a VM, then check its provisioning operation and private address.
Project, catalog, and subnet
Set TACHORA_API_KEY and TACHORA_PROJECT_ID as described in the quickstart. Use a Member project key for this example. Set TACHORA_SUBNET_ID to a subnet in the same project and region, or create one.
The example uses us-ohio-1, cpu.2x4, and ubuntu-24.04. Check the regions, instance types, and images available for your project. To connect over SSH, include IDs for the project’s SSH keys in the optional ssh_key_ids array.
Request a VM
Run this in your shell. Keep the same idempotency key and body if you retry the request.
VM_CREATE_KEY=$(uuidgen)
curl --fail-with-body --silent --show-error \
"https://api.tachora.ai/v1/projects/${TACHORA_PROJECT_ID}/instances" \
-H "Authorization: Bearer ${TACHORA_API_KEY}" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ${VM_CREATE_KEY}" \
--data-binary @- <<JSON
{
"name": "example-vm",
"region": "us-ohio-1",
"instance_type": "cpu.2x4",
"image": "ubuntu-24.04",
"subnet_id": "${TACHORA_SUBNET_ID}"
}
JSON
The create instance response is 202 Accepted. Set TACHORA_INSTANCE_ID to instance.id and TACHORA_OPERATION_ID to operation.id. A 409 insufficient_capacity response means Tachora was unable to place the instance.
Check provisioning
curl --fail-with-body --silent --show-error \
"https://api.tachora.ai/v1/operations/${TACHORA_OPERATION_ID}" \
-H "Authorization: Bearer ${TACHORA_API_KEY}"
Call Get operation again after a short delay while its state is pending or running. Finish when the state reaches succeeded, failed, or cancelled. If the operation fails, use the response’s error field to diagnose it.
Find the VM address
After the operation succeeds, use Get instance to read the VM’s private_ip.
curl --fail-with-body --silent --show-error \
"https://api.tachora.ai/v1/instances/${TACHORA_INSTANCE_ID}" \
-H "Authorization: Bearer ${TACHORA_API_KEY}"
When you’re done with the example, delete the VM and wait for the delete operation to succeed before removing any subnet it used.