GET /api/machines
List all online machines in the authenticated user’s namespace. Authentication: RequiredResponse
Array of machine objects
Example
Errors
503- Hub not connected
POST /api/machines/:id/spawn
Spawn a new session on a specific machine. Authentication: RequiredPath Parameters
Machine ID
Request Body
Working directory path for the new session
Agent type:
claude, codex, cursor, gemini, or opencode (default: claude)Model identifier (agent-specific)
Start in YOLO mode (bypass permissions)
Session type:
simple or worktreeWorktree name (required if sessionType is
worktree)Response
Whether spawn succeeded
ID of the newly spawned session
Error message if spawn failed
Example: Spawn Claude Session
Example: Spawn with YOLO Mode
Example: Spawn Worktree Session
Errors
400- Invalid body403- Access denied (machine belongs to different namespace)404- Machine not found503- Hub not connected
POST /api/machines/:id/paths/exists
Check if multiple paths exist on a machine. Authentication: RequiredPath Parameters
Machine ID
Request Body
Array of paths to check (max 1000)
Response
Object mapping each path to a boolean indicating existence
Example
Errors
400- Invalid body (empty or too many paths)403- Access denied404- Machine not found500- Failed to check paths503- Hub not connected
Use Cases
- Validate directory before spawning a session
- Check multiple projects to show which are available
- Detect moved/deleted directories