Request a template build
POST
/sandbox/v1/templates● SupportedRequest body
namestringoptionalName of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array.
tagsarrayoptionalTags to assign to the template build
aliasstringoptionalAlias of the template. Deprecated, use name instead.
teamIDstringoptionalIdentifier of the team
cpuCountintegeroptionalRequested virtual CPU count; a positive integer, default 2 for template builds.
memoryMBintegeroptionalRequested build memory in MiB; a positive integer, default 1024.
minFreeDiskMbintegeroptionalUpstream minimum free disk request in MiB; use the native diskGb field to set the build disk size.
diskGbintegeroptionalBuild disk size in GiB, a positive safe integer. Defaults to 10; available only on the own face.
Returns
202
Errors follow the E2B format — see error codes
Request
curl
curl https://api.deepraxis.com/sandbox/v1/templates \
-H "X-API-Key: $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"docs-template","cpuCount":2,"memoryMB":1024,"tags":["docs"],"diskGb":10}'Python
import requests
api_key = "$PRAXIS_API_KEY"
# templateID and buildID come from the preceding create response; replace the example IDs.
resp = requests.request("POST", "https://api.deepraxis.com/sandbox/v1/templates",
headers={"X-API-Key": api_key},
json={"name":"docs-template","cpuCount":2,"memoryMB":1024,"tags":["docs"],"diskGb":10},
)
print(resp.status_code, resp.text)TypeScript
const apiKey = "$PRAXIS_API_KEY";
// templateID and buildID come from the preceding create response; replace the example IDs.
const resp = await fetch("https://api.deepraxis.com/sandbox/v1/templates", { method: "POST",
headers: { "X-API-Key": apiKey, "Content-Type": "application/json" },
body: JSON.stringify({"name":"docs-template","cpuCount":2,"memoryMB":1024,"tags":["docs"],"diskGb":10}),
});
console.log(resp.status, await resp.text());Response 202
{
"templateID": "sbe_a9b9ece1928540ffcfcf",
"buildID": "sbt_2158874f-2b56-49ee-beeb-f85922f8e362",
"public": false,
"names": [
"docs-template-e9819104"
],
"aliases": [],
"tags": [
"docs"
]
}Response
HTTP 202
The build was requested successfully
application/json
| Name | Type | Description |
|---|---|---|
| templateID | string | Identifier of the template |
| buildID | string | Identifier of the last successful build for given template |
| public | boolean | Whether the template is public or only accessible by the team |
| names | array<string> | Names of the template |
| tags | array<string> | Tags assigned to the template build |
| aliases | array<string> | Aliases of the template |