Skip to content
Home

Runtime API

Runtime APIs are served from the sandbox envdUrl returned by create, detail, or connect. They operate inside that sandbox runtime.

X-Access-Token: <envdAccessToken>

Health endpoints are public:

GET {envdUrl}/health
GET {envdUrl}/
OPTIONS *
POST {envdUrl}/run
Terminal window
curl -sS "$ENVD_URL/run" \
-H "X-Access-Token: $ENVD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"cmd": "python --version",
"cwd": "/root",
"timeoutMs": 30000
}'

Use SDK or CLI helpers for streaming and background process management. The CLI maps this flow to:

Terminal window
seacloud sandbox exec <sandbox_id> "python --version"
seacloud sandbox exec --background <sandbox_id> "python server.py"
MethodPathPurpose
GET{envdUrl}/files?path=/rootList files.
GET{envdUrl}/file?path=/root/app.pyRead a file.
POST{envdUrl}/fileWrite a file.
POST{envdUrl}/filesUpload or write files.
POST{envdUrl}/files/batchBatch file operations.
POST{envdUrl}/files/composeCompose files from multiple parts.

Example write:

Terminal window
curl -sS -X POST "$ENVD_URL/file" \
-H "X-Access-Token: $ENVD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"path": "/root/workspace/hello.txt",
"content": "hello sandbox"
}'

Advanced SDK calls use runtime RPC groups:

GroupRoute prefix
FilesystemPOST {envdUrl}/filesystem.Filesystem/*
ProcessPOST {envdUrl}/process.Process/*

Prefer SDKs for these routes unless you are debugging a low-level integration.

GET {envdUrl}/metrics

Returns a runtime snapshot from inside the sandbox. For dashboard metrics, use GET /sandboxes/:sandboxID/metrics.