Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.superserve.ai/llms.txt

Use this file to discover all available pages before exploring further.

Rebuild

Queue a new build for an existing template, e.g. after a failed build, or to pick up an updated base image.
const build = await template.rebuild()
console.log(`Build queued: ${build.id}`)
Rebuild is idempotent: if an in-flight build already exists with the same configuration, you get back the existing build instead of a duplicate.

List and inspect builds

const builds = await template.listBuilds({ limit: 10 })
for (const b of builds) {
  console.log(b.id, b.status, b.errorMessage ?? "")
}

const build = await template.getBuild(builds[0].id)

Cancel an in-flight build

await template.cancelBuild(build.id)
cancelBuild is a no-op for builds already in a terminal state.

Delete a template

await template.delete()

// Or by UUID
await Template.deleteById("7a3f2b8c-1234-...")
Both calls are idempotent on 404. If any non-destroyed sandbox still references the template, the call raises ConflictError; destroy those sandboxes first. Once the delete succeeds the template’s name is released for reuse — you can immediately create a new template with the same name.