Connect to a sandbox
Call Create sandbox first and replace sbx_123 with its returned sandboxID.
/sandbox/v1/sandboxes/{sandboxID}/connect● SupportedRequest parameters
sandboxIDstringrequiredpath: Sandbox ID.
timeoutintegeroptionalRequested remaining lifetime in seconds from the connection. Defaults to 300 seconds; an existing later expiry is preserved.
memorybooleanoptionalDefaults to true. When false and the sandbox is paused, resume from disk state only: the sandbox cold-boots fresh and any memory in the snapshot is ignored, never modified or deleted. Disk state has crash-recovery semantics — writes not flushed before the pause may be lost. A no-op for snapshots that contain no memory. Rejected with an error in environments where this capability is not enabled, never silently downgraded to a memory restore.
Returns
201
Errors follow the E2B format — see error codes
Request
curl
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
curl https://api.deepraxis.com/sandbox/v1/sandboxes/sbx_123/connect \
-H "X-API-Key: $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"timeout":300}'Python
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
import requests
api_key = "$PRAXIS_API_KEY"
# Call /sandbox/v1 directly over HTTP.
resp = requests.post(
"https://api.deepraxis.com/sandbox/v1/sandboxes/sbx_123/connect",
headers={"X-API-Key": api_key},
json={"timeout": 300},
)
print(resp.status_code, resp.text)TypeScript
// Call Create sandbox first and replace sbx_123 with its returned sandboxID.
const apiKey = "$PRAXIS_API_KEY";
// Call /sandbox/v1 directly over HTTP.
const resp = await fetch(`https://api.deepraxis.com/sandbox/v1/sandboxes/sbx_123/connect`, {
method: "POST",
headers: { "X-API-Key": apiKey, "Content-Type": "application/json" },
body: JSON.stringify({ timeout: 300 }),
});
console.log(resp.status, await resp.text());Response 201
{
"templateID": "node22",
"sandboxID": "sbib2586b83c183533da70bced2",
"clientID": "i42g6lkj181tyvouozh1o",
"envdVersion": "0.9.0",
"envdAccessToken": "<access-token>",
"domain": "sandbox.praxisusercontent.com"
}Response
HTTP 200
The sandbox was already running
application/json
| Name | Type | Description |
|---|---|---|
| templateID | string | Identifier of the template from which is the sandbox created |
| sandboxID | string | Identifier of the sandbox |
| alias | string | Alias of the template |
| clientID | string | Identifier of the client |
| envdVersion | string | Version of the envd running in the sandbox |
| envdAccessToken | string | Access token used for envd communication |
| trafficAccessToken | string | Token required for accessing sandbox via proxy. |
| domain | string | Base domain where the sandbox traffic is accessible |
| machine | string | What kind of machine this sandbox is, so you can decide whether to drive it as a computer without knowing which vendor placed it. full: a complete environment that runs files, commands, terminals and background processes through the data plane — drive it as a computer. light: a light machine without that. none: a single-use box that is reachable but must not be driven as a computer. |
HTTP 201
The sandbox was resumed successfully
application/json
| Name | Type | Description |
|---|---|---|
| templateID | string | Identifier of the template from which is the sandbox created |
| sandboxID | string | Identifier of the sandbox |
| alias | string | Alias of the template |
| clientID | string | Identifier of the client |
| envdVersion | string | Version of the envd running in the sandbox |
| envdAccessToken | string | Access token used for envd communication |
| trafficAccessToken | string | Token required for accessing sandbox via proxy. |
| domain | string | Base domain where the sandbox traffic is accessible |
| machine | string | What kind of machine this sandbox is, so you can decide whether to drive it as a computer without knowing which vendor placed it. full: a complete environment that runs files, commands, terminals and background processes through the data plane — drive it as a computer. light: a light machine without that. none: a single-use box that is reachable but must not be driven as a computer. |