Skip to main content
Build a custom template from a Docker image. Define the base image, build steps, resources, and ready checks. The API will build and cache your template for creating sandboxes.

Endpoint

Request

Headers

Body Parameters

Alpine Linux is not supported. Use glibc-based images like ubuntu:*, debian:*, python:*-slim, node:*-slim.

Example Request

Build a Python template:
Build a Node.js template:

Response

Success (202 Accepted)

Response Fields

Status Codes

Build Steps

Supported Step Types

RUN Steps

ENV Steps

WORKDIR Steps

Errors

Alpine Not Supported (400)

Cause: The base image is Alpine Linux, which is not supported. Fix: Use a glibc-based image like ubuntu:22.04, python:3.11-slim, or node:18-slim.

Template Exists (409)

Cause: A template with the same name already exists and update is false. Fix: Either:
  • Use a different template name
  • Set "update": true to update the existing template

Invalid Resources (400)

Cause: Resource values are outside allowed limits. Fix: Ensure:
  • cpu: 1-8 (depends on your plan)
  • memory: 512-64000 MB
  • diskGB: 1-250 GB

Monitor Build Progress

After triggering a build, monitor its progress:

Use Cases

Create Data Science Template

Update Existing Template

Next Steps