API reference
Shells
Your sandboxes: list them.
- Operations
- 12
- Base path
https://os.one.ml/api/v1/shells- Scopes
shells:readshells:write- API keys
- 7 tested with an API key
- SDK
genesis.call('shells_listShells', …)· helpers undergenesis.shells- MCP
- 12 tools
Operations
| Operation | Endpoint | API key |
|---|---|---|
| List your Shells (sandboxes) | GET/shells | Tested with an API key |
| Create a Shell (sandbox) | POST/shells | Tested with an API key |
| Get one Shell (sandbox) | GET/shells/{id} | Tested with an API key |
| Stop and delete one Shell (sandbox) | DELETE/shells/{id} | Tested with an API key |
| Run an action on one Shell | POST/shells/{id}/action | Tested with an API key |
| Read a Shell's network access | GET/shells/{id}/egress | — |
| Read a Shell's recent network decisions | GET/shells/{id}/egress/log | — |
| Ask for more network or internet access for a Shell (sandbox) | POST/shells/{id}/egress/requests | — |
| Read a network access request | GET/shells/{id}/egress/requests/{requestId} | — |
| Take a Shell's extra network access away | POST/shells/{id}/egress/revoke | — |
| Run one command in a Shell | POST/shells/{id}/exec | Tested with an API key |
| Get a stream credential for one Shell | POST/shells/{id}/term | Tested with an API key |
Shells
List your Shells (sandboxes)
GET/v1/shells/shells
Sandbox instances in the selected organization and project. Needs shells:read. Ended Shells 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 Shell either way, with its status. createdBy=me narrows the list to the Shells the caller made (the server's own creator marker for the verified principal; never a client-sent id).
Parameters
includequery · "ended"endedalso lists ended Shells (cancelled,terminated,failedorsucceeded;orphanedcounts as active). Omit it to list live Shells only.createdByquery · "me"melists only the Shells the caller made, by the server's creator marker for the signed-in principal (never a client-sent id). Omit it to list every Shell in the selected organization and project.
Responses
- 200Shells in the selected project
Response fields
product"shells"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
- 400
createdByother thanme(CREATED_BY_MUST_BE_ME) - 403Signed organization and project selection required
- 404Any query other than
include=endedandcreatedBy=me - 503Shells private admission unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/shells/shells" \
-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('shells_listShells'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_listShells",
"arguments": {}
}
}Create a Shell (sandbox)
POST/v1/shells/shells
Starts a cloud sandbox in the selected organization and project. Needs shells: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 Shell. Omega meters the create; the Shells 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
namestringmax length 80
runtimestringcontainer (the default; the only runtime the native producer runs). Anything else is 422 OMEGA_NATIVE_UNSUPPORTED_PROFILE.
languagestringbash (default), node or python
network"sealed" | "localhost" | "internet"Default sealed. The native producer runs sealed only until per-tenant egress ships; anything else is 422 OMEGA_NATIVE_UNSUPPORTED_PROFILE.
timeoutSecondsintegerSandbox lifetime in seconds, 60 to 1800 (default 1800). Omega stops the Shell when it runs out. Anything else is 422 OMEGA_NATIVE_UNSUPPORTED_PROFILE. min 60 · max 1800
Responses
- 201The Shell (created, or replayed for the same key)
Response fields
product"shells"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
- 400A missing or malformed Idempotency-Key (OMEGA_NATIVE_OPERATION_REQUIRED), a body that is not one JSON object, or the facade refused the launch input
- 403Signed organization and project selection, the write scope, or the Shells entitlement required
- 409The key was used for a different request, or the first attempt is still pending; retry with the same key
- 503Shells 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/shells/shells" \
-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('shells_createShell', {
body: {},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_createShell",
"arguments": {
"body": {},
"idempotency_key": "<a stable key per change>"
}
}
}Get one Shell (sandbox)
GET/v1/shells/shells/{id}
One Shell in the selected organization and project, under the same read permission and partition check as the list. Unknown and foreign ids are both 404. Needs shells:read (or shells:write).
Parameters
idpath · stringrequired
Responses
- 200The Shell
Response fields
product"shells"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
- 400The id is not a UUID, or INVALID_ARGUMENT (the Shell id was refused)
- 403Signed organization and project selection, or the read scope, required
- 404Not found (also any query)
- 503Shells private admission unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/shells/shells/$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('shells_getShell', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_getShell",
"arguments": {
"id": "<id>"
}
}
}Stop and delete one Shell (sandbox)
DELETE/v1/shells/shells/{id}
Runs the Shell's stop action. Omega's native stop deletes the deployment; it cannot be started again. Needs shells: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"shells"requiredidstringrequiredcapability"stop"requiredresultobjectOmega's stop acknowledgement, as the facade returns it
cambiumanyCambium event the facade recorded for the action, when any
- 400A non-UUID id, a request body, or the facade refused the request
- 403Signed organization and project selection, or the write scope, required
- 404Not found (also any query)
- 409Omega reports a conflicting or pending operation
- 503Shells unavailable; a stop may or may not have been dispatched
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/shells/shells/$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('shells_deleteShell', {
id: '<id>',
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_deleteShell",
"arguments": {
"id": "<id>",
"idempotency_key": "<a stable key per change>"
}
}
}Action
Run an action on one Shell
POST/v1/shells/shells/{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 shells:write. delete_volume deletes this Shell name's durable disk (refused 409 OMEGA_NATIVE_VOLUME_IN_USE while any Shell 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.
Parameters
idpath · stringrequiredIdempotency-Keyheader · stringOptional. With it the stop is one journaled operation; a retry with the same key replays it.
Request body application/json
capability"stop" | "restart" | "reinstall_os" | "snapshot" | "wipe_state" | "logs" | "delete_volume"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
- 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/shells/shells/$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('shells_actOnShell', {
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": "shells_actOnShell",
"arguments": {
"id": "<id>",
"body": {
"capability": "stop"
},
"idempotency_key": "<a stable key per change>"
}
}
}Egress
Read a Shell's network access
GET/v1/shells/shells/{id}/egress
The Shell's egress state: its tier (sealed, packages, custom or internet), the extra hosts it was widened to and until when, today's usage and the limits. Read only. Needs shells:write (the same permission as a Shell action). Answers 404 until the owner switches Shells egress operations on.
Parameters
idpath · stringrequired
Responses
- 200The egress state
Response fields
okbooleanrequiredproductstringrequiredidstringrequiredegressobject | nullrequiredThe Shell's tier, extra hosts, expiry, usage and limits as the proxy reports them
- 400A non-UUID id
- 403Signed organization and project selection, or the write scope, required
- 404Not found, or egress operations are not on
- 409The Shell is not routed or not reachable
- 503The Shells facade or Omega is unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/shells/shells/$ID/egress" \
-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('shells_getShellEgress', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_getShellEgress",
"arguments": {
"id": "<id>"
}
}
}Read a Shell's recent network decisions
GET/v1/shells/shells/{id}/egress/log
The proxy's most recent decisions for this Shell (allowed, refused and why). Hosts the Shell was refused are shown so you can see what to ask for; no payload is ever recorded. limit is 1 to 100 (default the proxy's page). Needs shells:write.
Parameters
idpath · stringrequiredlimitquery · integer
Responses
- 200The recent decisions
Response fields
okbooleanrequiredproductstringrequiredidstringrequiredlogobject | array | nullrequiredThe recent decisions
- 400A non-UUID id or a limit outside 1 to 100
- 403Signed organization and project selection, or the write scope, required
- 404Not found, or egress operations are not on
- 503The Shells facade or Omega is unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/shells/shells/$ID/egress/log" \
-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('shells_getShellEgressLog', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_getShellEgressLog",
"arguments": {
"id": "<id>"
}
}
}Ask for more network or internet access for a Shell (sandbox)
POST/v1/shells/shells/{id}/egress/requests
Files a request to let this one Shell reach up to 8 extra hosts for at most 59 minutes. Nothing is widened by this call: Shells creates a confirmation for the person who created the Shell, they decide in Taps or the Console, and the widening is applied when the confirmed request is read (getShellEgressRequest). Only the Shell's creator can ask. Needs shells:write. Idempotency-Key is required.
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
hostsstring[]requiredttl_secondsintegerrequiredmin 1 · max 3540
reasonstringrequiredmin length 1 · max length 200
Responses
- 202The request is filed and waiting for the person
Response fields
okbooleanrequiredproductstringrequiredrequestobjectrequiredrequest.request_idstring (uuid)requiredrequest.status"pending"requiredrequest.shell_idstringrequiredrequest.hostsstring[]requiredrequest.expires_atstring (date-time)requiredrequest.expires_at_epochintegerrequest.reasonstringrequest.digeststringrequiredrequest.sentencestringrequiredThe exact sentence the person is asked to confirm
- 400INVALID_ARGUMENT, a missing Idempotency-Key, or a non-UUID id
- 403Signed selection or write scope required, or the caller is not the Shell's creator (EGRESS_NOT_CREATOR)
- 404Not found, or egress operations are not on
- 409The Shell has no network access to widen (EGRESS_NOT_ROUTED)
- 503Taps or the Shells facade is unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/shells/shells/$ID/egress/requests" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"hosts": [
"string"
],
"ttl_seconds": 1,
"reason": "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('shells_requestShellEgress', {
id: '<id>',
body: {
hosts: [
'string',
],
ttl_seconds: 1,
reason: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_requestShellEgress",
"arguments": {
"id": "<id>",
"body": {
"hosts": [
"string"
],
"ttl_seconds": 1,
"reason": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Read a network access request
GET/v1/shells/shells/{id}/egress/requests/{requestId}
The request's status: pending, approved, declined, expired or applied. If the person confirmed it and nobody has applied it yet, this read applies it once (applied_now). A declined or expired request stays final. Needs shells:write.
Parameters
requestIdpath · stringrequiredidpath · stringrequired
Responses
- 200The request and its status
Response fields
okbooleanrequiredproductstringrequiredrequestobjectrequiredrequest.request_idstring (uuid)requiredrequest.shell_idstringrequiredrequest.hostsstring[]requiredrequest.expires_atstring (date-time)requiredrequest.digeststringrequiredrequest.status"pending" | "approved" | "declined" | "expired" | "applied"requiredrequest.applied_atstring | null (date-time)
- 400A non-UUID id
- 403Signed selection or write scope required
- 404Not found, or egress operations are not on
- 503Taps or the Shells facade is unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/shells/shells/$ID/egress/requests/$REQUEST_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('shells_getShellEgressRequest', {
id: '<id>',
requestId: '<requestId>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_getShellEgressRequest",
"arguments": {
"id": "<id>",
"requestId": "<requestId>"
}
}
}Take a Shell's extra network access away
POST/v1/shells/shells/{id}/egress/revoke
Removes any widening now: the Shell goes back to its default tier and its open tunnels close. Needs shells:write. Idempotency-Key is required. The body is empty or {}.
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.
Responses
- 200The result
Response fields
okbooleanrequiredproductstringrequiredidstringrequiredresultobject | null
- 400A non-UUID id, a body other than {}, or a missing Idempotency-Key
- 403Signed selection or write scope required
- 404Not found, or egress operations are not on
- 503The Shells facade or Omega is unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/shells/shells/$ID/egress/revoke" \
-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('shells_revokeShellEgress', {
id: '<id>',
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_revokeShellEgress",
"arguments": {
"id": "<id>",
"idempotency_key": "<a stable key per change>"
}
}
}Exec
Run one command in a Shell
POST/v1/shells/shells/{id}/exec
One-shot exec: runs argv (no shell) as an unprivileged user in the sandbox and returns its exit code and base64 stdout/stderr (each capped at 1 MiB). Needs shells:write. Idempotency-Key is required. The Shells facade journals the result: a repeat with the same key and body replays it without running again, the same key with another body is 409 OPERATION_CONFLICT, and a repeat while the first has no confirmed result is 409 OPERATION_PENDING. Answers 409/503 until the Shell is released from quarantine and Omega's exec executor ships.
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
stdinstringCanonical base64, at most 48128 bytes decoded
timeoutMsintegermin 1000 · max 60000 · default
30000cwdstringdefault
"/workspace"· pattern^/workspace(/[^/]+)*$
Responses
- 200The command's result (or the stored result for the same key)
Response fields
oktruerequiredproduct"shells"requiredidstringrequiredresultobjectrequiredresult.exitCodeinteger | nullrequiredresult.encoding"base64"requiredresult.stdoutstringrequiredresult.stderrstringrequiredresult.truncatedobjectrequiredresult.truncated.stdoutbooleanresult.truncated.stderrbooleanresult.timedOutbooleanrequiredresult.durationMsnumberrequired
- 400INVALID_ARGUMENT, a missing Idempotency-Key, or a non-UUID id
- 403Signed organization and project selection, or the write scope, required
- 404Not found
- 409OPERATION_CONFLICT, OPERATION_PENDING, or the Shell is still quarantined
- 502Omega returned an invalid or oversized result
- 503The executor or the operation journal is unavailable; retry with the same key
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/shells/shells/$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('shells_execShell', {
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": "shells_execShell",
"arguments": {
"id": "<id>",
"body": {
"argv": [
"string"
]
},
"idempotency_key": "<a stable key per change>"
}
}
}Term
Get a stream credential for one Shell
POST/v1/shells/shells/{id}/term
Mints a short-lived (60 s, single-use) terminal credential for the Shell: {url, token, protocol, channel, expiresAt, mode, role}. Open url as a WebSocket with the subprotocols omega-attach.v1 and omega-attach.token.<token> from an allowed Origin. The channel is pty (omega-pty.v1): binary frames carry terminal bytes both ways (keystrokes in, output out), and the one text frame a client may send is {type:"resize", cols, rows} (1 to 500 each). Needs shells:write. No body (or {}).
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/shells/shells/$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('shells_openShellTerm', {
id: '<id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "shells_openShellTerm",
"arguments": {
"id": "<id>"
}
}
}L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support