Docs/Tenant machines
Organisations

Tenant machines

Create, list, get, revoke and delete a Tenant's machines under /v1/tenants/{tenantId}/machines.

A Tenant has two kinds of machine:

  • An enrolled machine is one of your customer's own computers, running the Sai runtime and enrolled into the Tenant.
  • A cloud machine is a computer that Sai hosts for the Tenant. Your backend creates and deletes it. Cloud machines walks through the whole flow.

Your backend manages both with an Organisation Key. A Tenant token sees the same machines in GET /v1/agents/machines.

The console shows them on the Tenant's page in the portal.

The machine object

An enrolled machineJSON
{
  "machineId": "tm_5a1f0c9e2b7d4e6a8c3f1b2d",
  "kind": "enrolled",
  "name": "Front desk PC",
  "platform": "darwin",
  "state": "online",
  "status": "active",
  "online": true,
  "lastSeen": 1790003600000,
  "runtimeVersion": "1.2.0",
  "createdAt": 1790000000000,
  "capabilities": {
    "canSee": null,
    "canUseAccessibility": null,
    "canControl": null
  }
}
A cloud machineJSON
{
  "machineId": "3b7e9c1a-5f2d-4e8a-9c0b-1d2e3f4a5b6c",
  "kind": "cloud",
  "name": "Riverside intake",
  "platform": "win32",
  "machineClass": "win32-4c8g",
  "state": "ready",
  "lastSeen": 1790003600000,
  "runtimeVersion": "1.2.0",
  "createdAt": 1790000000000,
  "capabilities": null
}
FieldNotes
machineIdSai's id for the machine. Pass it in the paths below and as machineId to /v1/agents/message.
kindenrolled or cloud.
nameEnrolled: the computer's name, as the runtime reported it when it enrolled. Cloud: the name you gave on create. It can be "" when you gave none.
platformwin32, darwin or linux.
machineClassCloud only. The size, which sets the price: win32-4c8g or linux-2c2g. See What a cloud machine costs.
stateEnrolled: online when the machine reported in the last 3 minutes, else offline. Cloud: see Cloud machine states.
statusEnrolled only. Always active. Kept for compatibility: read state instead.
onlineEnrolled only. true when state is online. Kept for compatibility: read state instead.
lastSeenUnix time in milliseconds of its last report, or null.
runtimeVersionThe Sai runtime's version, or null.
createdAtUnix time in milliseconds.
capabilitiesWhat stands in the way of Sai using the machine, as its runtime last reported, or null. See Capabilities.

A revoked or deleted machine leaves the list.

Capabilities

From Sai runtime 0.1.3, an enrolled machine reports whether Sai can use it. Each field is null when nothing stands in the way, or a sentence saying what does and, where there is one, the fix.

FieldSai canIt needs
canSeeSee the screen in screenshots.macOS: Screen Recording. Windows: the runtime runs in the user's session, which is connected and unlocked, with no UAC prompt or Ctrl+Alt+Del screen up.
canUseAccessibilityRead other apps' accessibility trees and act on them.macOS: Accessibility. Windows: the runtime runs in the user's session, not as a service.
canControlReach other apps with the mouse, keyboard and element actions.Everything canUseAccessibility needs. On Windows, also everything canSee needs.

On a computer with no display attached, canSee and canControl are never null.

capabilities is null when the machine has no answer yet: its runtime is older than 0.1.3 or hasn't reported yet, or its check failed. Read null as "no answer", not as a kind of machine: cloud machines report too, once their runner does. A field that is null means nothing was found in the way, not a guarantee: a check that can't tell counts as fine. The runtime reports again whenever an answer changes, and an offline machine keeps its last answers. On macOS, ask the user for what's missing: see macOS permissions.

Cloud machine states

stateMeaning
provisioningSai is creating the machine.
startingThe machine exists and is starting or waking. A message sent now waits for it.
readyThe machine is on and connected. A message starts at once. This is the only state in which nothing waits.
hibernatedThe machine is off. A message sent now wakes it.
deletingSai is deleting the machine. It leaves the list when Sai is done.
failedNo machine came up within 17 minutes of the create. Create another. It leaves the list 24 hours after the create.

Create a cloud machine

Create a Windows cloud machinecURL
curl -s -X POST "$SAI_API_URL/v1/tenants/$TENANT_ID/machines" \
  -H "Authorization: Bearer $SAI_ORG_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "os": "windows",
    "name": "Riverside intake",
    "requestId": "8d0c6b7e-2f4a-4c1e-9b3d-5a6f7e8d9c0b"
  }'
FieldTypeRequiredNotes
osstringyeswindows or linux. The size follows the OS: win32-4c8g for Windows, linux-2c2g for Linux.
namestringno1 to 64 characters. A label for your own users.
requestIdstringno1 to 128 characters of A-Z a-z 0-9 _ -. Makes a retry safe. See Retry a create.

Any other field is refused with 400 invalid_body, so a misspelt requestID fails instead of being ignored.

202 Accepted · Cloud machineJSON
{
  "machineId": "3b7e9c1a-5f2d-4e8a-9c0b-1d2e3f4a5b6c",
  "kind": "cloud",
  "name": "Riverside intake",
  "platform": "win32",
  "machineClass": "win32-4c8g",
  "state": "provisioning",
  "lastSeen": null,
  "runtimeVersion": null,
  "createdAt": 1790000000000,
  "capabilities": null
}

The machine is in the list at once, in provisioning. Get it until state is ready.

The Tenant must be active. An Organisation can create 600 cloud machines an hour. A Tenant with a cloudMachineLimit can have at most that many cloud machines. See Limit a Tenant's cloud machines.

StatuserrorWhen
400invalid_bodyA field is missing, out of range or unknown. details says which.
402insufficient_creditsThe Organisation has no credit for computers. Add credit.
403spend_cap_reachedThe Tenant has reached its monthly budget. The body has scope and resetsAt.
403tenant_disabledThe Tenant is disabled.
404not_foundNo such Tenant.
409machine_limit_reachedThe Tenant has cloudMachineLimit cloud machines. The body has limit and used.
409request_id_reusedThis requestId was used for a create with a different body.
409create_in_progressA create with this requestId and body started less than a minute ago and has no machine yet. Retry in a few seconds with the same requestId.
429rate_limitedMore than 600 creates for the Organisation in an hour.
500internalSai failed for an unknown reason. Retry with the same requestId. Quote errorId to support.
503capacity_unavailableSai has no room for a new machine now. Retry later.
409 Conflict · machine_limit_reachedJSON
{
  "error": "machine_limit_reached",
  "limit": 2,
  "used": 2,
  "message": "The Tenant has as many cloud machines as its cloudMachineLimit allows."
}

Retry a create

Generate a requestId for each machine you mean to create, such as a UUID, and send the same one again when you retry that create. Without a requestId, every call creates a new machine, so a retry after a timeout can leave you with two.

  • The same requestId with the same body returns the same machineId. Its state is always provisioning. Get the machine for its current state.
  • The same requestId with a different os, name or Tenant returns 409 request_id_reused.
  • The same requestId sent again while the first create is still running returns 409 create_in_progress. Nothing new is created. Retry in a few seconds with the same requestId: once the first create has its machine, you get that machineId.
  • A refusal (402, 403, 409 machine_limit_reached or 503) creates nothing. You can retry with the same requestId.
  • After a 500, Sai may have created the machine. A retry with the same requestId finishes that create instead of starting a second one.
  • A requestId belongs to your Organisation. It is free again 24 hours after its first create.

List a Tenant's machines

List a Tenant's machines
curl -s "$SAI_API_URL/v1/tenants/$TENANT_ID/machines" \
  -H "Authorization: Bearer $SAI_ORG_KEY"
200 OK · Tenant machinesJSON
{
  "machines": [
    {
      "machineId": "tm_5a1f0c9e2b7d4e6a8c3f1b2d",
      "kind": "enrolled",
      "name": "Front desk PC",
      "platform": "darwin",
      "state": "online",
      "status": "active",
      "online": true,
      "lastSeen": 1790003600000,
      "runtimeVersion": "1.2.0",
      "createdAt": 1790000000000,
      "capabilities": {
        "canSee": null,
        "canUseAccessibility": null,
        "canControl": null
      }
    },
    {
      "machineId": "3b7e9c1a-5f2d-4e8a-9c0b-1d2e3f4a5b6c",
      "kind": "cloud",
      "name": "Riverside intake",
      "platform": "win32",
      "machineClass": "win32-4c8g",
      "state": "hibernated",
      "lastSeen": 1790003600000,
      "runtimeVersion": "1.2.0",
      "createdAt": 1790000000000,
      "capabilities": null
    }
  ]
}

The list has both kinds. A disabled Tenant's machines are listed too.

StatuserrorWhen
404not_foundNo such Tenant.

Get a machine

Get a Tenant machine
curl -s "$SAI_API_URL/v1/tenants/$TENANT_ID/machines/$MACHINE_ID" \
  -H "Authorization: Bearer $SAI_ORG_KEY"

200 with the machine.

StatuserrorWhen
404not_foundNo such Tenant, or no such machine in the Tenant.

Watch a machine's screen

With a Tenant token, POST /v1/agents/machines/{machineId}/live returns a liveUrl and a websocketUrl for one of the Tenant's machines. On an enrolled machine, it needs the Sai runtime 0.1.2 or later on macOS, or 0.1.3 or later on Windows. See Live view.

Anyone holding a liveUrl for an enrolled machine can see and control your customer's real computer.

Revoke a machine

Revoke a Tenant machine
curl -s -X DELETE "$SAI_API_URL/v1/tenants/$TENANT_ID/machines/$MACHINE_ID" \
  -H "Authorization: Bearer $SAI_ORG_KEY"

204 No Content. The machine is signed out at once, leaves the list and cannot reconnect. To bring it back, enroll it again with a new code.

Revoking is for an enrolled machine. The same call on a cloud machine deletes it. See Delete a cloud machine.

StatuserrorWhen
404not_foundNo such Tenant, or no such machine in the Tenant.

To stop every machine of a Tenant at once, disable the Tenant: they stay enrolled and reconnect when it is enabled again. Deleting the Tenant revokes them all.

Delete a cloud machine

Delete a cloud machinecURL
curl -s -X DELETE "$SAI_API_URL/v1/tenants/$TENANT_ID/machines/$MACHINE_ID" \
  -H "Authorization: Bearer $SAI_ORG_KEY"
202 AcceptedJSON
{ "state": "deleting" }

Sai deletes the machine and its disk. A delete cannot be undone. The machine shows deleting until Sai is done, then leaves the list. You can delete a disabled Tenant's machines too.

StatuserrorWhen
404not_foundNo such Tenant, no such machine in the Tenant, or a cloud machine still provisioning or failed.
500internalSai could not start the delete. Retry. Quote errorId to support.

A machine in provisioning can be deleted once it reaches starting. A failed machine leaves the list by itself.

Disabling or deleting a Tenant with DELETE /v1/tenants/{tenantId} does not delete its cloud machines. They hibernate and stay listed until you delete them here.

© 2026 Simular Inc. All rights reserved.