Skip to content
中文

List templates

GET/e2b/templates● Supported

Official E2B docs ↗

Request parameters

  • teamIDstringoptional

    query: Identifier of the team

Returns

200

Deprecated: the latest official SDK uses v2.

Errors follow the E2B format — see error codes

Request

curl
curl https://api.deepraxis.com/e2b/templates \
  -H "X-API-Key: $PRAXIS_API_KEY"
Python
import requests

opts = dict(
    api_key="$PRAXIS_API_KEY",
    api_url="https://api.deepraxis.com/e2b",
    domain="sandbox.praxisusercontent.com",
)

# 官方 SDK 没有封装模板列表,直接用 HTTP 调用
resp = requests.get(
    f"{opts['api_url']}/templates",
    headers={"X-API-Key": opts["api_key"]},
)
print(resp.json())
TypeScript
const opts = {
  apiKey: "$PRAXIS_API_KEY",
  apiUrl: "https://api.deepraxis.com/e2b",
  domain: "sandbox.praxisusercontent.com",
};

// 官方 SDK 没有封装模板列表,直接用 HTTP 调用
const resp = await fetch(`${opts.apiUrl}/templates`, {
  headers: { "X-API-Key": opts.apiKey },
});
console.log(await resp.json());

Response 200

[
  {
    "templateID": "node22",
    "buildID": "sbr_base-base_node22@e2ba43b98ce1226ab5242303c33b5f36958784ad06dbc42c0ec439bea6e6dfcb",
    "cpuCount": 1,
    "memoryMB": 1983,
    "diskSizeMB": 24242,
    "public": true,
    "aliases": [],
    "names": [
      "node22"
    ],
    "createdAt": "1970-01-01T00:00:00.000Z",
    "updatedAt": "1970-01-01T00:00:00.000Z",
    "createdBy": null,
    "lastSpawnedAt": null,
    "spawnCount": 0,
    "buildCount": 1,
    "envdVersion": "0.9.0",
    "buildStatus": "ready"
  }
]

Response

HTTP 200

Successfully returned all templates

application/json

Name Type Description
[].templateID string Identifier of the template
[].buildID string Identifier of the last successful build for given template
[].cpuCount integer CPU cores for the sandbox
[].memoryMB integer Memory for the sandbox in MiB
[].diskSizeMB integer Disk size for the sandbox in MiB
[].public boolean Whether the template is public or only accessible by the team
[].aliases array<string> Aliases of the template
[].names array<string> Names of the template (namespace/alias format when namespaced)
[].createdAt string Time when the template was created
[].updatedAt string Time when the template was last updated
[].createdBy object
[].createdBy.id string Identifier of the user
[].createdBy.email string Email of the user
[].lastSpawnedAt string Time when the template was last used
[].spawnCount integer Number of times the template was used
[].buildCount integer Number of times the template was built
[].envdVersion string Version of the envd running in the sandbox
[].buildStatus string Status of the template build