tenki_create_template
Create a reusable sandbox-image template with base image, setup script, and default resources, so you can later build it into a bootable image for Tenki sandboxes.
Instructions
Create a custom-image template (a reusable sandbox-image spec: base image + setup script + default resources). Build it into a bootable image later with tenki_build_template. NOTE: only a TYPED template (created with builder_spec, no legacy fields) can build a named, publishable image (image_name) that tenki_create_sandbox boots via its image arg.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable template name. | |
| tags | No | Tags for later filtering. | |
| env_vars | No | Environment variables as a key→value object. | |
| cpu_cores | No | Default vCPUs for sandboxes from this template (1-16). | |
| memory_mb | No | Default memory in MB (512-65536). | |
| start_cmd | No | Command run when a sandbox boots from this template. | |
| builder_spec | No | Typed template spec, passed through as-is — e.g. {specVersion:'tenki.template.v1', base:{image:'sandbox'}, workdir:'/home/tenki', steps:[{run:{command:'...'}}], resources:{cpuCores,memoryMb,diskSizeGb}}. Mutually exclusive with base_image_id/setup_script/start_cmd/env_vars/cpu_cores/memory_mb/disk_size_gb/parent_* (the API rejects mixing). Required if the template's builds should publish an image (tenki_build_template image_name). | |
| disk_size_gb | No | Default disk in GB (5-100). | |
| parent_image | No | Derive this template from an existing built image reference. | |
| setup_script | No | Shell script run at build time to provision the image. Required for a from-scratch template (the API rejects a create without it unless you derive from a parent template/image). | |
| workspace_id | No | Workspace to create in (defaults to the key's first workspace). | |
| base_image_id | No | Base image ID to build on top of. | |
| parent_template_id | No | Derive this template from an existing template. |