Create your first Tab
Go from a workspace API key to an acknowledged Linux environment.
Before you begin#
Sign in to the workspace dashboard, verify your email, and create a key under API keys. Your workspace needs assigned compute capacity and an approved template. Keep the key in your environment or secret manager; do not embed it in browser code.
The examples use TABS_API_KEY and the public API origin https://api.runtabs.dev. No local gateway is required.
Check the supported routes#
GET /tabs/v1/capabilities requires a workspace API key. It describes supported gateway routes and fixed create options. hostReadiness is always not-checked: a supported create route is not a promise of available capacity, an online VM runtime or a healthy guest.
Then read GET /v2/templates for approved IDs, runtime, CPU, memory and readiness. A missing image, unsupported image and unavailable runtime have separate reason codes. Older hosts may omit readiness diagnoses. A historical dashboard snapshot is not current readiness.
curl --fail --silent --show-error \
-H "X-API-Key: $TABS_API_KEY" \
https://api.runtabs.dev/tabs/v1/capabilities
curl --fail --silent --show-error \
-H "X-API-Key: $TABS_API_KEY" \
https://api.runtabs.dev/v2/templatesCheck capacity#
curl --fail --silent --show-error \
-H "X-API-Key: $TABS_API_KEY" \
https://api.runtabs.dev/tabs/v1/fleetA capacity read does not reserve a slot. If awake capacity is full, wait for a Tab to pause, explicitly manage an existing Tab, or ask your administrator for capacity.
Create a Tab#
Generate and retain a UUID before submitting this operation. In a shell, set CREATE_ATTEMPT=$(uuidgen); persist it if your process must recover after restarting.
The current workspace defaults to an Ubuntu bhv VM with a writable filesystem and administrator login; sudo runs inside that VM. Use an approved template ID, metadata containing only name (1–50 characters), timeout exactly 300 seconds, and autoPause true. Arbitrary environment variables, runtime overrides, policy, trust and grant options are not accepted by this route. Template runtime and image are pinned for the accepted operation.
Generate a new idempotency key for each logical mutation. Repeat an unchanged request with its original key after transport uncertainty; do not issue a new create key just because a response was lost. Reusing a key with a changed request is a conflict. Keep the complete returned sandboxID, including its host prefix.
curl --fail --silent --show-error \
-X POST https://api.runtabs.dev/v2/sandboxes \
-H "X-API-Key: $TABS_API_KEY" \
-H "Idempotency-Key: $CREATE_ATTEMPT" \
-H "Content-Type: application/json" \
--data '{"templateID":"ubuntu","metadata":{"name":"my-agent"},"timeout":300,"autoPause":true}'The acknowledgement contains sandboxID. Save that complete ID. A successful create does not supply native guest credentials.
Open the terminal#
Return to Environments in the dashboard, refresh the list, select your environment, and open its terminal. The terminal uses your workspace session; the API key is not a guest password. See terminal access.
Clean up#
Delete only the Tab you intend to remove. Set SANDBOX_ID to its full acknowledged ID and DELETE_ATTEMPT to a new UUID.
curl --fail --silent --show-error \
-X DELETE "https://api.runtabs.dev/sandboxes/$SANDBOX_ID" \
-H "X-API-Key: $TABS_API_KEY" \
-H "Idempotency-Key: $DELETE_ATTEMPT"Deletion removes the environment. Treat an interrupted request as uncertain: keep the same operation key and inspect current state before creating replacement work.
