# E2B-compatible API (/en/docs/api/compatible/e2b)



## Base URL [#base-url]

<ApiBaseDomain prefix="/e2b" />

## Get started [#get-started]

<QuickstartTabs snippets="{&#x22;curl&#x22;:&#x22;curl https://api-origin.invalid/e2b/sandboxes \\\n  -H \&#x22;X-API-Key: $PRAXIS_API_KEY\&#x22; \\\n  -H \&#x22;Content-Type: application/json\&#x22; \\\n  -d '{\&#x22;templateID\&#x22;:\&#x22;node22\&#x22;,\&#x22;timeout\&#x22;:300}'&#x22;,&#x22;python&#x22;:&#x22;import os\n\nfrom e2b import Sandbox\n\nopts = dict(\n    api_key=os.environ[\&#x22;PRAXIS_API_KEY\&#x22;],\n    api_url=\&#x22;https://api-origin.invalid/e2b\&#x22;,\n    domain=\&#x22;praxisusercontent.com\&#x22;,\n)\n\nsandbox = Sandbox.create(template=\&#x22;node22\&#x22;, timeout=300, **opts)\nprint(sandbox.sandbox_id)&#x22;,&#x22;typescript&#x22;:&#x22;import { Sandbox } from \&#x22;e2b\&#x22;;\n\nconst opts = {\n  apiKey: process.env.PRAXIS_API_KEY,\n  apiUrl: \&#x22;https://api-origin.invalid/e2b\&#x22;,\n  domain: \&#x22;praxisusercontent.com\&#x22;,\n};\n\nconst sandbox = await Sandbox.create(\&#x22;node22\&#x22;, { ...opts, timeoutMs: 300_000 });\nconsole.log(sandbox.sandboxId);&#x22;}" />

## Control plane and data plane [#control-plane-and-data-plane]

* **Control plane**: the endpoints listed on this page (create, list, pause, connect, kill …) live at the base URL above and authenticate with your API key (the `X-API-Key` header; the official SDK sends it for you).
* **Data plane**: running commands and reading files inside a sandbox goes straight to `<port>-<sandbox ID>.praxisusercontent.com` with the access token returned when the sandbox was created — so besides `api_url` the SDK also needs `domain` set to `praxisusercontent.com`.

Or leave the code alone and set environment variables:

<QuickstartCode code="&#x22;export E2B_API_KEY=$PRAXIS_API_KEY\nexport E2B_API_URL=https://api-origin.invalid/e2b\nexport E2B_DOMAIN=praxisusercontent.com&#x22;" language="bash" />

## Endpoints [#endpoints]

| Method | Path                                                                              | Description               | Support     |
| ------ | --------------------------------------------------------------------------------- | ------------------------- | ----------- |
| POST   | [`/sandboxes`](/docs/api/compatible/e2b/createSandbox)                            | Create a sandbox          | ● Supported |
| GET    | [`/sandboxes`](/docs/api/compatible/e2b/listSandboxes)                            | List running sandboxes    | ● Supported |
| GET    | [`/sandboxes/{sandboxID}`](/docs/api/compatible/e2b/getSandbox)                   | Get a sandbox             | ● Supported |
| GET    | [`/sandboxes/{sandboxID}/metrics`](/docs/api/compatible/e2b/getSandboxMetrics)    | Get sandbox metrics       | ● Supported |
| POST   | [`/sandboxes/{sandboxID}/timeout`](/docs/api/compatible/e2b/setSandboxTimeout)    | Set sandbox timeout       | ● Supported |
| POST   | [`/sandboxes/{sandboxID}/pause`](/docs/api/compatible/e2b/pauseSandbox)           | Pause a sandbox           | ● Supported |
| POST   | [`/sandboxes/{sandboxID}/connect`](/docs/api/compatible/e2b/connectSandbox)       | Connect to a sandbox      | ● Supported |
| DELETE | [`/sandboxes/{sandboxID}`](/docs/api/compatible/e2b/killSandbox)                  | Kill a sandbox            | ● Supported |
| POST   | [`/v2/sandboxes`](/docs/api/compatible/e2b/createSandboxV2)                       | Create a sandbox (v2)     | ● Supported |
| GET    | [`/v2/sandboxes`](/docs/api/compatible/e2b/listSandboxesV2)                       | List sandboxes (v2)       | ● Supported |
| POST   | [`/v2/sandboxes/{sandboxID}/connect`](/docs/api/compatible/e2b/connectSandboxV2)  | Connect to a sandbox (v2) | ● Supported |
| GET    | [`/templates`](/docs/api/compatible/e2b/listTemplates)                            | List templates            | ● Supported |
| GET    | [`/v2/templates`](/docs/api/compatible/e2b/listTemplatesV2)                       | List templates (v2)       | ● Supported |
| POST   | [`/volumes`](/docs/api/compatible/e2b/createVolume)                               | Create team volume        | ● Supported |
| GET    | [`/volumes`](/docs/api/compatible/e2b/listVolumes)                                | List team volumes         | ● Supported |
| GET    | [`/volumes/{volumeID}`](/docs/api/compatible/e2b/getVolume)                       | Team volume               | ● Supported |
| DELETE | [`/volumes/{volumeID}`](/docs/api/compatible/e2b/deleteVolume)                    | Delete team volume        | ● Supported |
| POST   | [`/sandboxes/{sandboxID}/fork`](/docs/api/compatible/e2b/forkSandbox)             | Fork a sandbox            | ● Supported |
| POST   | [`/sandboxes/{sandboxID}/snapshots`](/docs/api/compatible/e2b/createSnapshot)     | Create a snapshot         | ● Supported |
| GET    | [`/snapshots`](/docs/api/compatible/e2b/listSnapshots)                            | List snapshots            | ● Supported |
| DELETE | [`/templates/{templateID}`](/docs/api/compatible/e2b/deleteSnapshot)              | Delete a snapshot         | ● Supported |
| PUT    | [`/sandboxes/{sandboxID}/network`](/docs/api/compatible/e2b/updateSandboxNetwork) | Update sandbox network    | ● Supported |
| GET    | [`/v2/sandboxes/{sandboxID}/logs`](/docs/api/compatible/e2b/getSandboxLogs)       | Get sandbox logs          | ● Supported |

## Differences from E2B [#differences-from-e2b]

* <a href="/docs/api/compatible/e2b/createSandbox">Create a sandbox</a>：Deprecated: the latest official SDK uses v2. The platform does not provide E2B's default base template yet: Sandbox.create() without a template returns 404, so name a template explicitly (see List templates for what is available).
* <a href="/docs/api/compatible/e2b/listSandboxes">List running sandboxes</a>：Deprecated: the latest official SDK uses v2.
* <a href="/docs/api/compatible/e2b/connectSandbox">Connect to a sandbox</a>：Deprecated: the latest official SDK uses v2.
* <a href="/docs/api/compatible/e2b/listTemplates">List templates</a>：Deprecated: the latest official SDK uses v2.

For authoritative parameter definitions, see the [official E2B documentation](https://docs.e2b.dev/api-reference).

Errors follow the E2B format, see [errors](/docs/api/errors); quotas and response headers are covered in [rate limits](/docs/api/rate-limits).
