kosa8 docs Dashboard
esc
↑ ↓ move↵ openRuns in your browser; nothing you type is sent anywhere.

HTTP API / Embeds

Embeds

3 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.

A signed, expiring iframe URL for the sandbox's terminal or desktop#

POST/v1/sandboxes/{id}/embedscope sandboxes:write

The page posts {source: "kosa8", type} messages to the listed origins: ready, exited {code}, approval_requested {approval}, expired. See docs/guides/cloud-embed.

Parameters
idrequiredpath · string
Sandbox id (sbx_…)
JSON body
mode"view" | "interact"
view (default): watch only, enforced by the server; interact: mouse and keyboard too
ui"terminal" | "desktop"
terminal (default), or desktop (the kosa8-desktop image's noVNC)
ttl_sinteger
How long the URL works (default 3600), never past the sandbox's delete_after Min 60. Max 604800.
originsrequiredarray of string
The origins that may frame it (CSP frame-ancestors) and receive its postMessage events, such as https://app.example.com
commandarray of string
Terminal only: the program to show instead of the default (a login shell; view mode: the sandbox's tmux session, read-only)
Responses
201400401403404409501
curl -s -X POST https://api.kosa8.com/v1/sandboxes/$SBX/embed \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json

The sandbox's live embeds (no URLs)#

GET/v1/sandboxes/{id}/embedsscope sandboxes:read
Parameters
idrequiredpath · string
Sandbox id (sbx_…)
Responses
200401403404
curl -s -X GET https://api.kosa8.com/v1/sandboxes/$SBX/embeds \
  -H "Authorization: Bearer $KOSA8_API_KEY"

End an embed's URL before it expires#

DELETE/v1/sandboxes/{id}/embeds/{embed_id}scope sandboxes:write
Parameters
idrequiredpath · string
Sandbox id (sbx_…)
embed_idrequiredpath · string
Embed id (emb_…)
Responses
200401403404
curl -s -X DELETE https://api.kosa8.com/v1/sandboxes/$SBX/embeds/$EMBED_ID \
  -H "Authorization: Bearer $KOSA8_API_KEY"

The kosa8 weekly

Agent security news, one industry deep-dive and a hands-on challenge, every Monday. Unsubscribe in one click.

© 2026 kosa8 · kosa8.com · AI Agent Sandbox: Secure and Sovereign for Enterprise · Local models served by llamay · Agent gateway: MAQPNA