API, CLI, and SDK reference

Everything OpenComputers is reachable three ways: the REST API, the miosa CLI, and the SDKs. This page is the map. Field-level detail for hosts, jobs, files, tunnels, agents, and clusters lives in the OpenComputers API reference.

REST API

Base path: /api/v1/opencomputers. All calls need Authorization: Bearer <platform-api-key>.

GroupEndpoints
HostsGET /hosts, POST /hosts, GET /hosts/:id, DELETE /hosts/:id
Host tagsPATCH /hosts/:id/tags, POST /hosts/:id/tags/:tag, DELETE /hosts/:id/tags/:tag, GET /tags
Host runtimeGET /hosts/:id/runtime, POST /hosts/:id/runtime, POST /hosts/:id/runtime/certify, POST /hosts/:id/runtime/enrollment
Host infoGET /hosts/:id/metrics, GET /hosts/:id/services, GET /hosts/:id/jobs
GroupsGET /groups, POST /groups, GET /groups/:id, PATCH /groups/:id, DELETE /groups/:id, POST /groups/:id/members, POST /groups/:id/members/:host_id, DELETE /groups/:id/members/:host_id, POST /groups/:id/exec, POST /groups/:id/apps/:app_id/install
JobsPOST /hosts/:id/exec, GET /hosts/:id/exec, POST /hosts/:id/jobs, GET /hosts/:id/exec/:job_id, DELETE /hosts/:id/exec/:job_id
FilesGET /hosts/:id/fs, GET /hosts/:id/fs/stat, GET /hosts/:id/fs/download, POST /hosts/:id/fs/upload, DELETE /hosts/:id/fs, POST /hosts/:id/fs/mkdir
Terminal and desktopPOST /hosts/:id/terminal/ticket, POST /hosts/:id/desktop/ticket
ContainersGET, POST /hosts/:host_id/containers, GET, PATCH, DELETE /hosts/:host_id/containers/:id, POST .../:id/start, POST .../:id/stop, POST .../:id/restart
ComposeGET, POST /hosts/:host_id/compose-projects, GET, DELETE /hosts/:host_id/compose-projects/:id, POST .../up, POST .../down
IDE sessionsGET, POST /hosts/:host_id/ide-sessions, GET, DELETE /hosts/:host_id/ide-sessions/:id, POST .../reveal-password
GitHub Actions runnersGET, POST /hosts/:id/gha-runners, GET, DELETE /hosts/:id/gha-runners/:runner_id, POST .../refresh
MeshesGET, POST /meshes, GET, DELETE /meshes/:id, POST /meshes/:id/hosts/:host_id, DELETE /meshes/:id/hosts/:host_id
BackupsGET, POST /hosts/:host_id/backup-configs, PATCH, DELETE /hosts/:host_id/backup-configs/:config_id, POST .../pause, POST .../resume, POST .../trigger, GET .../snapshots
SnapshotsGET /snapshots/:id, DELETE /snapshots/:id, POST /snapshots/:id/restore
TunnelsGET, POST /hosts/:host_id/tunnels, GET, PATCH, DELETE /hosts/:host_id/tunnels/:id
Tunnel domainsGET, POST /tunnels/:tunnel_id/domains, GET, DELETE /tunnels/:tunnel_id/domains/:id, POST .../verify
SecretsGET, POST /secrets, GET, POST /hosts/:id/secrets, PATCH, DELETE /hosts/:id/secrets/:secret_id, POST .../reveal
SSH keysGET, POST /hosts/:id/ssh-keys, DELETE /hosts/:id/ssh-keys/:key_id, POST /hosts/:id/ssh-keys/import/github
ClipboardPOST /hosts/:id/clipboard, GET /hosts/:id/clipboard
AppsGET /apps, GET /hosts/:id/apps, POST /hosts/:id/apps/:app_id/install, GET /hosts/:id/apps/installs/:install_id, DELETE /hosts/:id/apps/:app_id, POST .../:app_id/start, POST .../:app_id/health
WorkspacesGET /workspaces, GET, POST /hosts/:host_id/workspaces, GET, PATCH, DELETE /hosts/:host_id/workspaces/:wid, POST .../pull, POST .../open-terminal, POST .../run, POST .../expose
SchedulesGET, POST /hosts/:host_id/schedules, GET, PATCH, DELETE /hosts/:host_id/schedules/:id, POST .../pause, POST .../resume, POST .../trigger, GET .../runs
SharesGET, POST /hosts/:id/shares, PATCH, DELETE /hosts/:id/shares/:share_id
AlertsGET, POST /alerts/rules, PATCH, DELETE /alerts/rules/:id, POST .../fire-test, GET, POST /alerts/channels, PATCH, DELETE /alerts/channels/:id, POST .../verify, GET /alerts/fires, POST /alerts/fires/:id/ack
WebhooksGET, POST /webhooks, PATCH, DELETE /webhooks/:id, POST .../test, GET .../deliveries
AuditGET /audit, GET /audit/export, GET /audit/verify, GET /audit/:id
ClustersGET, POST /clusters, GET, DELETE /clusters/:id, POST /clusters/:id/start, POST /clusters/:id/stop

Streaming endpoints

These answer with Server-Sent Events and keep the connection open:

StreamEndpoint
Job outputGET /hosts/:id/exec/:job_id/stream
Host lifecycleGET /hosts/events
Container logsGET /hosts/:host_id/containers/:id/logs
Container statsGET /hosts/:host_id/containers/:id/stats
Compose eventsGET /hosts/:host_id/compose-projects/:id/events
Mesh eventsGET /meshes/:id/events
Runner eventsGET /hosts/:id/gha-runners/:runner_id/events
Agent session eventsGET /hosts/:id/agent/sessions/:session_id/events
App install eventsGET /hosts/:id/apps/installs/:install_id/events
Cluster eventsGET /clusters/:id/events
Workspace eventsGET /hosts/:host_id/workspaces/:wid/events
Audit feedGET /audit/live

GET /hosts/events uses a ticket rather than a bearer token: mint one with POST /api/v1/opencomputers/hosts/events/sse-ticket, then connect with ?ticket=.

Inference

An active cluster serves an OpenAI-compatible endpoint:

EndpointPurpose
POST /inference/:slug/v1/chat/completionsChat completions
POST /inference/:slug/v1/completionsText completions
GET /inference/:slug/v1/modelsModel list

Unauthenticated endpoints

EndpointPurpose
POST /opencomputers/hosts/registration-statusCheck whether a host key is valid and connected
POST /opencomputers/schedules/trigger/:tokenTrigger a schedule from a webhook, using its one-time token
GET /opencomputers/osa/latestThe latest agent release manifest
ANY /t/:slug/*pathThe public tunnel proxy; the tunnel’s own access mode decides who gets through

CLI

The CLI exposes OpenComputers as miosa host, with miosa host as an alias.

miosa host and miosa device both accept the global flags (--json, --org, --profile, --timeout, and others). See the CLI reference for the full command and flag list.

SDKs

SDKNamespace
TypeScriptclient.openComputers
Pythonclient.open_computers
Goclient.OpenComputers
ElixirMiosa.OpenComputers.* modules
import Miosa from '@miosa/sdk';

const miosa = new Miosa({ apiKey: process.env.MIOSA_API_KEY });

const host = await miosa.openComputers.hosts.create({ name: 'studio', platform: 'linux' });
console.log(host.host_key);                       // shown once

const job = await miosa.openComputers.jobs.start(host.id, { command: 'uname -a' });
console.log(job.links.stream);                   // stream this job
import miosa

client = miosa.Miosa(api_key="msk_...")

for host in client.open_computers.hosts.list().data:
    print(host.id, host.status)
Was this page helpful?