Skip to main content
The fastest end-to-end workflow is:
  1. Define a template in code.
  2. Build it once.
  3. Launch sandboxes from the returned template ID.
import { Sandbox, Template } from "novita-sandbox"

const template = Template().fromImage("python:3.12")

const build = await Template.build(template, "my-python-template", {
  cpuCount: 2,
  memoryMB: 1024,
})

console.log(build.templateId)
console.log(build.buildId)

const sandbox = await Sandbox.create(build.templateId)
const result = await sandbox.commands.run("python --version")

console.log(result.stdout)

await sandbox.kill()
Last modified on June 10, 2026