API reference
Rigs
Your desktops: list them.
- Operations
- 13
- Base path
https://os.one.ml/api/v1/rigs- Scopes
rigs:readrigs:write- API keys
- 6 tested with an API key
- SDK
genesis.call('rigs_listRigs', …)· helpers undergenesis.rigs- CLI
genesis rigs- MCP
- 10 tools; the other 3 through
genesis_call
Operations
| Operation | Endpoint | API key |
|---|---|---|
| List your Rigs: whole cloud computers (desktops), each with a screen. | GET | Tested with an API key |
| Create a Rig (desktop) | POST | Tested with an API key |
| Get one Rig (desktop) | GET/{id} | Tested with an API key |
| Stop one Rig (desktop) | DELETE/{id} | Tested with an API key |
| Run an action on one Rig | POST/{id}/action | Tested with an API key |
| Read a Rig's standing approval policy | GET/{id}/approval-policy | — |
| Set a Rig's standing approval policy | PUT/{id}/approval-policy | — |
| Approve or decline one step on a Rig | POST/{id}/approvals/{approvalId} | — |
| Run one command on a Rig | POST/{id}/exec | — |
| Download one Rig screenshot | GET/{id}/screenshots/{artifactId}/data | — |
| Get a stream credential for one Rig | POST/{id}/term | Tested with an API key |
| Read the organization's Rig view origins | GET/view-origins | — |
| Set the organization's Rig view origins | PUT/view-origins | — |
Rigs
List your Rigs: whole cloud computers (desktops), each with a screen.
GET/v1/rigs
Rigs in the selected organization and project. Needs rigs:read (or rigs:write). Ended Rigs are left out unless include=ended is given. Ended means omega-native's set, cancelled, terminated, failed or succeeded; orphaned counts as active. Omega keeps them for audit. Get-by-id returns an ended Rig either way, with its status. An inventory of 100 or more is refused rather than shown incomplete.
Parameters
includequery · "ended"endedalso lists ended Rigs (cancelled,terminated,failedorsucceeded;orphanedcounts as active). Omit it to list live Rigs only.
Responses
- 200Rigs in the selected project
Response fields
product"rigs"requiredinstancesobject[]requiredinstances[].[].idstringrequiredinstances[].[].omegaDeploymentIdstringrequiredinstances[].[].namestringrequiredinstances[].[].kindstringrequireddesktop (Rigs), browser (Panes) or sandbox (Shells)
instances[].[].statusstringrequiredinstances[].[].stagestringrequiredqueued, placed, running, failed, unknown or another producer stage
instances[].[].detailUrlstringinstances[].[].regionstring | nullinstances[].[].tierstring | nullinstances[].[].runtimestring | nullinstances[].[].createdAtstring | nullinstances[].[].updatedAtstring | nullinstances[].[].volumeobjectThe disk this instance keeps or uses, as Omega lists it to its owner (rule 11). kept true = the instance ended and the disk was kept for its name; remove it with the delete_volume action. Absent when Omega lists no disk for the row.
instances[].[].volume.namestringrequiredThe instance name the disk follows (never a disk id) max length 128
instances[].[].volume.size_gbintegerrequiredmin 0
instances[].[].volume.statestringrequiredready, attached, detaching, deleting or another Omega disk state
instances[].[].volume.keptbooleanrequiredinstances[].[].volume.end_pathstring | nullrequiredowner_stop, lifetime_end, idle_stop, create_abandon, create_release or idle_detach; null while in use
instances[].[].volume.end_atstring | nullrequiredWhen that end kept the disk (ISO 8601); null while in use
- 403RIGS_READ_PERMISSION_REQUIRED, RIGS_CONTEXT_REQUIRED or RIGS_CONTEXT_NOT_ADMITTED
- 404Any query other than
include=ended - 409RIGS_CONTEXT_CHANGED (selection changed during the read)
- 502RIGS_READ_REFUSED, RIGS_INVALID_RESPONSE or RIGS_INVALID_OR_INCOMPLETE_INVENTORY
- 503Rigs unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/rigs" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('rigs_listRigs'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_listRigs",
"arguments": {}
}
}Create a Rig (desktop)
POST/v1/rigs
Launches a cloud desktop in the selected organization and project. Needs rigs:write. Idempotency-Key is required: Omega journals the create under the operation key the gateway derives from it, so a retry with the same key returns the same Rig. Omega meters the create; the Rigs facade records no usage of its own.
Parameters
Idempotency-Keyheader · stringrequiredRequired. A stable key for this one create. The gateway derives the operation key from it (with your organization, principal, method and path); reuse the same key to retry and the original result is replayed instead of creating twice.
Request body application/json
namestringmin length 1 · max length 80
environment"xfce" | "kde" | "windows" | "macos"Desktop OS image (default xfce)
resolution"1920x1080"Optional. A Rig's desktop is a fixed 1920x1080 display; any other value is refused (400).
variant"persistent" | "stateless" | "visual" | "headless"Default persistent
Responses
- 201The Rig (created, or replayed for the same key)
Response fields
product"rigs"requiredinstanceobjectrequiredinstance.idstringrequiredinstance.omegaDeploymentIdstringrequiredinstance.namestringrequiredinstance.kindstringrequireddesktop (Rigs), browser (Panes) or sandbox (Shells)
instance.statusstringrequiredinstance.stagestringrequiredqueued, placed, running, failed, unknown or another producer stage
instance.detailUrlstringinstance.regionstring | nullinstance.tierstring | nullinstance.runtimestring | nullinstance.createdAtstring | nullinstance.updatedAtstring | nullinstance.volumeobjectThe disk this instance keeps or uses, as Omega lists it to its owner (rule 11). kept true = the instance ended and the disk was kept for its name; remove it with the delete_volume action. Absent when Omega lists no disk for the row.
instance.volume.namestringrequiredThe instance name the disk follows (never a disk id) max length 128
instance.volume.size_gbintegerrequiredmin 0
instance.volume.statestringrequiredready, attached, detaching, deleting or another Omega disk state
instance.volume.keptbooleanrequiredinstance.volume.end_pathstring | nullrequiredowner_stop, lifetime_end, idle_stop, create_abandon, create_release or idle_detach; null while in use
instance.volume.end_atstring | nullrequiredWhen that end kept the disk (ISO 8601); null while in use
- 400RIGS_IDEMPOTENCY_KEY_REQUIRED, RIGS_INVALID_IDEMPOTENCY_KEY, RIGS_INVALID_REQUEST (not one JSON object), or RIGS_CREATE_REFUSED (the facade refused the launch input, for example a resolution other than 1920x1080)
- 403RIGS_WRITE_PERMISSION_REQUIRED, RIGS_CONTEXT_REQUIRED or RIGS_CONTEXT_NOT_ADMITTED
- 409RIGS_CREATE_REFUSED: the key was used for a different request, or the first attempt is still pending; retry with the same key
- 413The body is over 64 KiB
- 502RIGS_CREATE_REFUSED or RIGS_INVALID_RESPONSE
- 503RIGS_CREATE_UNAVAILABLE: the create may or may not have started; retry with the same key
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/rigs" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('rigs_createRig', {
body: {},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_createRig",
"arguments": {
"body": {},
"idempotency_key": "<a stable key per change>"
}
}
}{id}
Get one Rig (desktop)
GET/v1/rigs/{id}
One Rig in the selected organization and project, under the same partition check as the list. Unknown and foreign ids are both 404. Needs rigs:read (or rigs:write).
Parameters
idpath · stringrequired
Responses
- 200The Rig
Response fields
product"rigs"requiredinstanceobjectrequiredinstance.idstringrequiredinstance.omegaDeploymentIdstringrequiredinstance.namestringrequiredinstance.kindstringrequireddesktop (Rigs), browser (Panes) or sandbox (Shells)
instance.statusstringrequiredinstance.stagestringrequiredqueued, placed, running, failed, unknown or another producer stage
instance.detailUrlstringinstance.regionstring | nullinstance.tierstring | nullinstance.runtimestring | nullinstance.createdAtstring | nullinstance.updatedAtstring | nullinstance.volumeobjectThe disk this instance keeps or uses, as Omega lists it to its owner (rule 11). kept true = the instance ended and the disk was kept for its name; remove it with the delete_volume action. Absent when Omega lists no disk for the row.
instance.volume.namestringrequiredThe instance name the disk follows (never a disk id) max length 128
instance.volume.size_gbintegerrequiredmin 0
instance.volume.statestringrequiredready, attached, detaching, deleting or another Omega disk state
instance.volume.keptbooleanrequiredinstance.volume.end_pathstring | nullrequiredowner_stop, lifetime_end, idle_stop, create_abandon, create_release or idle_detach; null while in use
instance.volume.end_atstring | nullrequiredWhen that end kept the disk (ISO 8601); null while in use
- 400RIGS_INVALID_ID (the id is not a UUID)
- 403RIGS_READ_PERMISSION_REQUIRED, RIGS_CONTEXT_REQUIRED or RIGS_CONTEXT_NOT_ADMITTED
- 404Not found (also any query)
- 409RIGS_CONTEXT_CHANGED (selection changed during the read)
- 502RIGS_READ_REFUSED or RIGS_INVALID_RESPONSE
- 503Rigs unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/rigs/$ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('rigs_getRig', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_getRig",
"arguments": {
"id": "<id>"
}
}
}Stop one Rig (desktop)
DELETE/v1/rigs/{id}
Runs the Rig's stop action. The Rig stops and leaves the plain list; its record stays, with status cancelled, and is listed with include=ended and returned by get-by-id. This is not a permanent delete. The Rig's durable disk is kept for its name (volume.kept); to erase it, run the delete_volume action once no Rig of that name is running. Needs rigs:write. No request body.
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional. With it the stop is one journaled operation; a retry with the same key replays it.
Responses
- 200Stop accepted
Response fields
oktruerequiredproduct"rigs"requiredidstringrequiredcapability"stop"requiredresultobjectrequiredOmega's stop acknowledgement. Only these fields are carried;
statusisterminatedwhen completed orcancellation_requestedwhile pending.result.okbooleanresult.capabilitystringresult.statusstringresult.completedbooleanresult.pendingbooleanresult.bridgeboolean
- 400A non-UUID id, a request body, RIGS_INVALID_IDEMPOTENCY_KEY, or the facade refused the request
- 403RIGS_WRITE_PERMISSION_REQUIRED, RIGS_CONTEXT_REQUIRED or RIGS_CONTEXT_NOT_ADMITTED
- 404Not found (also any query)
- 409Omega reports a conflicting or pending operation
- 502RIGS_STOP_REFUSED or RIGS_INVALID_RESPONSE
- 503Rigs unavailable; a stop may or may not have been dispatched
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/rigs/$ID" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('rigs_deleteRig', {
id: '<id>',
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_deleteRig",
"arguments": {
"id": "<id>",
"idempotency_key": "<a stable key per change>"
}
}
}Run an action on one Rig
POST/v1/rigs/{id}/action
The facade's action route with its own body form, {capability, args}. Capabilities: stop, restart, reinstall_os, snapshot, wipe_state, logs, delete_volume. Needs rigs:write. delete_volume deletes this Rig name's durable disk (refused 409 OMEGA_NATIVE_VOLUME_IN_USE while any Rig of that name runs; 404 OMEGA_NATIVE_VOLUME_NOT_FOUND when there is none; the next create of the name is refused). Idempotency-Key is required for every capability except stop; a retry with the same key replays instead of acting twice. Until Omega's native executor for a capability ships, the facade answers 503 for it. A Rig's desktop resolution is fixed at create, so there is no resize.
Control verbs (screenshot, click, type, key, scroll, move, drag): a model drives the Rig's desktop with these. They exist for an organization API key on the Rig that same key created, for organizations enabled for it (anyone else gets 400 RIGS_INVALID_ACTION); each needs its own Idempotency-Key and is limited per key per minute (429 HANDS_RATE_LIMITED with Retry-After). No model needs to be declared. Args: screenshot none; click {x, y, button?: left|right|middle, clicks?: 1|2|3}; move {x, y} (the pointer, no button); drag {path: [{x, y}, ...2 to 32 points], button?} (button down at the first point, through each point, up at the last; at most 5 seconds); type {text} (1 to 2000 characters); key {key, modifiers?: [alt|ctrl|meta|shift]} (one character or a named key: Enter, Tab, Escape, Backspace, Delete, the arrows, Home, End, PageUp, PageDown, Space, F1 to F12); scroll {dx?, dy?, x?, y?}. Points are whole screen pixels. screenshot answers {artifactId, width, height, screenWidth, screenHeight, scale, ...}: read the PNG with getRigScreenshotData; a picture point times scale is the screen point. Driving needs rigs:control (or rigs:write).
Approvals. On a Rig that may hold its owner's sign-ins (someone took control of it, a login was filled, or its browser profile was carried over), a screenshot runs and every input answers 409 APPROVAL_REQUIRED with error.approval {id, rig, step: {capability, args}, app, host, expiresAt} (app and host are what the Rig itself last reported in front; null when not known). Nothing is used up by that refusal. Approve it with decideRigApproval (a key holding rigs:approve), then send the same body again with the SAME Idempotency-Key and the header rigs-approval-id; it runs once. Approvals expire within two minutes. With the Rig's policy approve_all (setRigApprovalPolicy) inputs run with no approval. A model loop should hold a drive-only key; keep the rigs:approve key with the person or their UI. Refusals keep a fixed code: 403 HANDS_NOT_OWNER, 403 HANDS_CONTROL_SCOPE_REQUIRED, 409 APPROVAL_REQUIRED, 409 APPROVAL_PENDING / APPROVAL_MISMATCH / APPROVAL_EXPIRED / APPROVAL_DENIED / APPROVAL_NOT_FOUND, 503 APPROVAL_RECHECK_UNAVAILABLE (approved steps can't run on this Rig yet), 409 HANDS_STEP_REPLAYED, 409 OMEGA_NATIVE_DESKTOP_HIDDEN_* (the screen is hidden and why), 409 OMEGA_NATIVE_DESKTOP_NOT_READY, 423 OMEGA_NATIVE_OWNER_IN_CONTROL (a person is in control).
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional. With it the stop is one journaled operation; a retry with the same key replays it.
rigs-approval-idheader · stringThe approval id from an
APPROVAL_REQUIREDanswer, on the retry of that same step (same body, same Idempotency-Key).
Request body application/json
capability"stop" | "restart" | "reinstall_os" | "snapshot" | "wipe_state" | "logs" | "delete_volume" | "screenshot" | "click" | "type" | "key" | "scroll" | "move" | "drag"requiredargsobjectCapability arguments (default an empty object)
Responses
- 200The action's acknowledgement
Response fields
okbooleanrequiredproductstringrequiredidstringrequiredcapabilitystringrequiredresultobject | nullThe capability's result as Omega returns it
- 400A non-UUID id, an unknown capability, a missing Idempotency-Key (non-stop), or the facade refused the request
- 403Signed organization and project selection, or the write scope, required
- 404Not found
- 409The key was used for a different request, or the first attempt is still pending; for a control verb, one of the fixed codes above
- 423OMEGA_NATIVE_OWNER_IN_CONTROL: a person is in control of this Rig
- 429HANDS_RATE_LIMITED, with Retry-After
- 501The capability has no server-side executor
- 503A native
snapshotisSNAPSHOT_UNAVAILABLE(reasonno_omega_executor): Omega has no snapshot executor yet, so the facade refuses it before contacting Omega. Nothing is billed or journaled, and a retry gets the same answer. Any other 503 means the native executor for the capability is not available yet or the facade is unavailable; retry with the same key. - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/rigs/$ID/action" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"capability": "stop"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('rigs_actOnRig', {
id: '<id>',
body: {
capability: 'stop',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_actOnRig",
"arguments": {
"id": "<id>",
"body": {
"capability": "stop"
},
"idempotency_key": "<a stable key per change>"
}
}
}Read a Rig's standing approval policy
GET/v1/rigs/{id}/approval-policy
ask (every input on a signed-in Rig needs an approval; the default) or approve_all, with who set it and when. For API keys of the Rig's organization in the same project. Needs rigs:read.
Parameters
idpath · stringrequired
Responses
- 200The policy
Response fields
rigstring (uuid)requiredpolicy"ask" | "approve_all"requiredsetBystring | nullrequiredsetByKind"api_key" | "person"requiredsetAtstring | null (date-time)required
- 404Not found
- 503Rigs unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/rigs/$ID/approval-policy" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('rigs_getRigApprovalPolicy', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "rigs_getRigApprovalPolicy",
"arguments": {
"id": "<id>"
}
}
}
}Set a Rig's standing approval policy
PUT/v1/rigs/{id}/approval-policy
Sets ask or approve_all for a Rig an API key made. Needs rigs:approve (and rigs:read). Every change is recorded with who set it and when; ask ends approve_all. An organization owner or admin may also end it (ask only) from their own signed-in session (rigs:approvals:end).
Parameters
idpath · stringrequired
Request body application/json
policy"ask" | "approve_all"required
Responses
- 200The policy now
Response fields
rigstring (uuid)requiredpolicy"ask" | "approve_all"requiredsetBystring | nullrequiredsetByKind"api_key" | "person"requiredsetAtstring | null (date-time)required
- 400A body other than {policy}
- 403The key does not hold rigs:approve
- 404Not found
- 503Rigs unavailable; nothing was changed
- 4xx 5xxThe error envelope.
curl -X PUT "https://os.one.ml/api/v1/rigs/$ID/approval-policy" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"policy": "ask"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('rigs_setRigApprovalPolicy', {
id: '<id>',
body: {
policy: 'ask',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "rigs_setRigApprovalPolicy",
"arguments": {
"id": "<id>",
"body": {
"policy": "ask"
}
}
}
}
}Approve or decline one step on a Rig
POST/v1/rigs/{id}/approvals/{approvalId}
The owner's answer to one APPROVAL_REQUIRED. For a Rig an API key made, the owner is that key's organization: any of its API keys in the same project holding rigs:approve (no other scope implies it) may answer, once, before the approval expires. The answer only says yes or no; the approval is bound to the exact step that asked. self is true when the key that asked also approved. Anyone else, and an unknown id, gets 404.
Parameters
approvalIdpath · stringrequiredidpath · stringrequired
Request body application/json
decision"approve" | "deny"required
Responses
- 200The decision
Response fields
approvalobjectrequiredapproval.idstringrequiredapproval.rigstring (uuid)requiredapproval.status"approved" | "denied"requiredapproval.selfbooleanrequiredThe key that asked also approved
approval.expiresAtstring (date-time)required
- 400A non-UUID id, a malformed approval id, or a body other than {decision}
- 403
RIGS_APPROVE_PERMISSION_REQUIRED/APPROVE_SCOPE_REQUIRED: the key does not hold rigs:approve - 404RIGS_NOT_FOUND or APPROVAL_NOT_FOUND
- 409APPROVAL_EXPIRED or APPROVAL_DECIDED (decided once)
- 503Rigs unavailable; nothing was changed
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/rigs/$ID/approvals/$APPROVAL_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"decision": "approve"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('rigs_decideRigApproval', {
id: '<id>',
approvalId: '<approvalId>',
body: {
decision: 'approve',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "rigs_decideRigApproval",
"arguments": {
"id": "<id>",
"approvalId": "<approvalId>",
"body": {
"decision": "approve"
}
}
}
}
}Run one command on a Rig
POST/v1/rigs/{id}/exec
One-shot exec: runs argv (no shell) as the Rig's unprivileged user in the Rig's own container and returns its exit code and base64 stdout/stderr. For the Rig's creator only: an org API key on the Rig that same key created (never on a Rig whose disk may hold a person's sign-in), or a person's own signed-in session on a Rig they created. Never One's app session. Needs rigs:write. Idempotency-Key is required and is used once: a repeat with the same key is 409 HANDS_STEP_REPLAYED and runs nothing. Counts in the same per-minute limit as a Rig's other steps (429 HANDS_RATE_LIMITED with Retry-After). The body is one JSON object of at most 64 KiB. Answers 404 while exec is not switched on for Rigs.
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringrequiredRequired. A stable key for this one create. The gateway derives the operation key from it (with your organization, principal, method and path); reuse the same key to retry and the original result is replayed instead of creating twice.
Request body application/json
argvstring[]requiredThe command and its arguments, no shell; at most 32 KiB in total; argv[0] non-empty; no NUL
stdinstringCanonical base64, at most 46 KiB decoded
timeoutMsintegermin 1000 · max 60000 · default
30000cwdstringdefault
"/workspace"· pattern^/workspace(/[A-Za-z0-9._-]{1,128}){0,16}$
Responses
- 200The command's receipt
Response fields
exitCodeinteger | nullrequired124 when the command timed out
encoding"base64"requiredstdoutstringrequiredstderrstringrequiredtruncatedobjectrequiredtruncated.stdoutbooleanrequiredtruncated.stderrbooleanrequiredtimedOutbooleanrequiredoutputLimitedbooleanThe worker's hard output cap was hit
durationMsnumberrequired
- 400
INVALID_ARGUMENT, a missing or malformed Idempotency-Key, a non-UUID id, or a One app session - 403Signed organization and project selection, or the write scope, required; or a worker refusal
OMEGA_NATIVE_* - 404
RIGS_NOT_FOUND: not found, not the Rig's creator, or exec is not switched on - 409
HANDS_STEP_REPLAYED: this Idempotency-Key was already used (nothing was run again); or a worker refusalOMEGA_NATIVE_* - 413The body is larger than 64 KiB
- 423A worker refusal
OMEGA_NATIVE_*(for example a person holds control of the Rig) - 429
HANDS_RATE_LIMITEDor a workerOMEGA_NATIVE_*limit (with Retry-After) - 502Rigs returned an invalid or oversized receipt
- 503
HANDS_GUARD_UNAVAILABLE: Rigs could not admit the exec, and nothing was run. Any other server failure is a 504. - 504
RIGS_EXEC_OUTCOME_UNKNOWN: the command was sent and may have run (the answer was lost, or Rigs failed after admitting it). A retry with the same key never runs it twice. - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/rigs/$ID/exec" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"argv": [
"string"
]
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('rigs_execRig', {
id: '<id>',
body: {
argv: [
'string',
],
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_execRig",
"arguments": {
"id": "<id>",
"body": {
"argv": [
"string"
]
},
"idempotency_key": "<a stable key per change>"
}
}
}Download one Rig screenshot
GET/v1/rigs/{id}/screenshots/{artifactId}/data
The PNG of the Rig's screen that a screenshot action just captured (at most 1 MiB; the worker keeps it in memory for a short time only, and nothing stores it). For the same callers as the control verbs: the API key that created the Rig, in an organization enabled for it. Anyone else, and an unknown id, gets the same 404. Needs rigs:read.
Parameters
artifactIdpath · stringrequiredidpath · stringrequired
Responses
- 200The image
Response fields
Type:
string (binary) - 400A non-UUID id or artifact id
- 403Signed organization and project selection, or the read scope, required
- 404Not found
- 409The screenshot is no longer held, or the selection changed
- 502RIGS_INVALID_RESPONSE: the answer was not a bounded PNG
- 503Rigs unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/rigs/$ID/screenshots/$ARTIFACT_ID/data" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('rigs_getRigScreenshotData', {
id: '<id>',
artifactId: '<artifactId>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_getRigScreenshotData",
"arguments": {
"id": "<id>",
"artifactId": "<artifactId>"
}
}
}Get a stream credential for one Rig
POST/v1/rigs/{id}/term
Mints a short-lived terminal/viewer credential for the Rig. Needs rigs:write. No body, {}, or {"origin", "mode", "role"}. An API key on a Rig it created may ask {"mode": "watch", "origin": ...} for an origin the organization declared (setViewOrigins). Answers 503 until the native attach transport and its public origin are bound.
Parameters
idpath · stringrequired
Responses
- 200The credential
Response fields
productstringrequiredidstringrequiredkindstringcredentialsobjectrequiredcredentials.urlstringThe wss:// or https:// attach URL
credentials.tokenstringcredentials.expires_innumber | string
- 400A non-UUID id or a body other than {}
- 403Signed organization and project selection, or the write scope, required
- 404Not found
- 503The native stream transport is not bound yet, or the facade is unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/rigs/$ID/term" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('rigs_openRigTerm', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_openRigTerm",
"arguments": {
"id": "<id>"
}
}
}View origins
Read the organization's Rig view origins
GET/v1/rigs/view-origins
The https page origins on which this organization embeds a watch-only live view of its own Rigs (openRigTerm with {"mode": "watch", "origin": ...} from an API key on a Rig that key created). Needs rigs:read. For the organization's API keys and people; never One's app session. [] when none were set. setBy (who set them) is returned to a person's session only; an API key gets setByKind alone.
Responses
- 200The declared origins
Response fields
organizationIdstringrequiredoriginsstring[]requiredsetBystring | nullWho set them (a key id or a person id): returned to a person's session only
setByKind"key" | "person"requiredsetAtstring | null (date-time)required
- 403Signed organization and project selection, or the read scope, required
- 404
RIGS_NOT_FOUND: not switched on for Rigs, or a One app session - 503
HANDS_GUARD_UNAVAILABLEor Rigs unavailable - 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/rigs/view-origins" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('rigs_getViewOrigins'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_getViewOrigins",
"arguments": {}
}
}Set the organization's Rig view origins
PUT/v1/rigs/view-origins
Replaces the list: at most 8 distinct https origins (lowercase host with a dot, optional port, no path), never an IP address or localhost; [] clears it. Needs an API key holding exactly rigs:approve (and rigs:read; rigs:write and rigs:* do not imply it), or an organization owner's or admin's own signed-in session (rigs:approvals:end); Rigs checks who may set it again. Every change is recorded with who set it and when. The body is at most 4 KiB. No Idempotency-Key.
Request body application/json
originsstring[]required
Responses
- 200The declared origins now
Response fields
organizationIdstringrequiredoriginsstring[]requiredsetBystring | nullWho set them (a key id or a person id): returned to a person's session only
setByKind"key" | "person"requiredsetAtstring | null (date-time)required
- 400
INVALID_ARGUMENT: a body other than {"origins": [...]} - 403
RIGS_APPROVE_PERMISSION_REQUIRED: neither a key with rigs:approve nor an owner's or admin's own session - 404
RIGS_NOT_FOUND: not switched on for Rigs, or a One app session - 413The body is larger than 4 KiB
- 429
RIGS_RATE_LIMITED(with Retry-After). Nothing was changed. - 503
HANDS_GUARD_UNAVAILABLEor Rigs unavailable. Nothing was changed. - 4xx 5xxThe error envelope.
curl -X PUT "https://os.one.ml/api/v1/rigs/view-origins" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"origins": []
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('rigs_setViewOrigins', {
body: {
origins: [],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "rigs_setViewOrigins",
"arguments": {
"body": {
"origins": []
}
}
}
}L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support