Start a reserved template build
/sandbox/v1/templates/{templateID}/builds/{buildID}◐ PartialRequest parameters
templateIDstringrequiredpath: Template identifier from templates.create or templates.list. Use your organization's templateID, not a provider handle.
buildIDstringrequiredpath: Build identifier returned by templates.create. It must belong to the selected template in your organization.
fromImagestringoptionalImage to use as a base for the template build
fromTemplatestringoptionalTemplate to use as a base for the template build
fromImageRegistryobjectoptionalRegistry authentication. Unlike E2B, only the vault reference variant is accepted; plaintext aws, gcp and registry variants return 400. Cannot be used with official templates.
Expand sub-fields (4)
typestringrequiredvault resolves the password at build time without persisting its value.
vaultIdstringrequiredVault ID containing the registry password, from vaults.list or vaults.create.
secretNamestringrequiredSecret name in that vault containing the registry password.
usernamestringoptionalRegistry login username without whitespace; defaults to token.
forcebooleanoptionalWhether the whole build should be forced to run regardless of the cache
stepsarrayoptionalList of steps to execute in the template build
Expand sub-fields (4)
typestringrequiredType of the step
argsarrayoptionalArguments for the step
filesHashstringoptionalHash of the files used in the step
forcebooleanoptionalWhether the step should be forced to run regardless of the cache
startCmdstringoptionalStart command to execute in the template after the build
readyCmdstringoptionalReady check command to execute in the template after the build
dockerfilestringoptionalDockerfile text, at most 64 KiB UTF-8. Mutually exclusive with fromImage, fromTemplate and steps. COPY/ADD are rejected; fetch remote content using RUN. Registry credentials require a nonofficial image in the first FROM.
Returns
202
Errors follow the E2B format — see error codes
Request
curl
curl https://api.deepraxis.com/sandbox/v1/templates/sbe_example/builds/sbt_example \
-H "X-API-Key: $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"dockerfile":"FROM praxis/base\nRUN echo template-reference"}'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/sbe_example/builds/sbt_example",
headers={"X-API-Key": api_key},
json={"dockerfile":"FROM praxis/base\nRUN echo template-reference"},
)
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/sbe_example/builds/sbt_example", { method: "POST",
headers: { "X-API-Key": apiKey, "Content-Type": "application/json" },
body: JSON.stringify({"dockerfile":"FROM praxis/base\nRUN echo template-reference"}),
});
console.log(resp.status, await resp.text());Response 202
{}Response
HTTP 202
The build has started
No response body is declared.