Skip to content

Upload a template

POST
/v1/template

Upload a container image as a template. The image is pulled, converted to a rootfs, and stored for later use when creating sandboxes. A maximum of 25 templates per organization is enforced.

object
name
required

Template name. Must not start with a system prefix or contain whitespace.

string
Example
my-python-app
uri
required

Container image URI to pull and convert.

string
<= 500 characters
Example
docker.io/library/python:3.12
credentials
One of:

Credentials for pulling from a private container registry.

object
type
Allowed values: basic

Template uploaded successfully.

object
id
required

The created template ID.

string
Example
tpl-abc123
name
required

The created template name.

string
Example
my-python-app
digest
required

The container image digest used for this template.

string
Example
sha256:0123456789abcdef
image_config
required
object
entrypoint
required
Array<string>
nullable
cmd
required
Array<string>
nullable
working_dir
string
user

The OS user that the container process runs as.

string
Example
user
env
object
key
additional properties
string
is_system
required

Whether this template is a system template.

boolean
created_at
required

When the template was created.

string format: date-time
Example
2026-02-08T12:34:56Z

Validation error or invalid image.

One of:
object
message
required

Summary message, e.g. “Invalid request”.

string
errors
required
Array<object>
object
field
required

JSON field name that failed validation (e.g. “path”, “command”).

string
error
required

Human-readable description of the validation failure.

string

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string

Conflict – template name already exists or template limit reached.

object
message
required

Human-readable error message.

string