---
title: "Create a template"
method: POST
path: "/compute/{connection_id}/template"
tags: ["compute", "template"]
---

# Create a template

`POST /compute/{connection_id}/template`

## Request

- Base URL: `http://api.unified.to`
- URL: `http://api.unified.to/compute/{connection_id}/template`
- Auth: API key in header `authorization`

## Path parameters

- `connection_id` string, required

## Query parameters

- `fields` string[]
- `raw` string

## Request body

- ComputeTemplate
  - `id` string: Unique identifier for the template
  - `created_at` string, date-time: When the template was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: When the template was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `name` string: Display name of the template
  - `aliases` string[]: Alternative names or tags for the template
  - `image` string: Container or OS image
  - `dockerfile` string: Dockerfile used to build the template
  - `start_command` string: Command run when an instance starts
  - `status` 'PENDING' | 'BUILDING' | 'READY' | 'FAILED' | 'OTHER': Normalized build status
  - `gpu_model` 'NVIDIA_GB300' | 'NVIDIA_B300' | 'NVIDIA_GB200' | 'NVIDIA_B200' | 'NVIDIA_GH200' | 'NVIDIA_H200' | 'NVIDIA_H100_SXM' | 'NVIDIA_H100_PCIE' | 'NVIDIA_H100_NVL' | 'NVIDIA_A100_SXM_80GB' | 'NVIDIA_A100_PCIE_80GB' | 'NVIDIA_A100_40GB' | 'NVIDIA_L40S' | 'NVIDIA_L40' | 'NVIDIA_L4' | 'NVIDIA_A40' | 'NVIDIA_A10' | 'NVIDIA_RTX_PRO_6000' | 'NVIDIA_RTX_6000_ADA' | 'NVIDIA_RTX_A6000' | 'NVIDIA_RTX_A5000' | 'NVIDIA_RTX_A4000' | 'NVIDIA_RTX_5090' | 'NVIDIA_RTX_4090' | 'NVIDIA_RTX_3090' | 'NVIDIA_V100' | 'NVIDIA_T4' | 'AMD_MI355X' | 'AMD_MI325X' | 'AMD_MI300X' | 'AMD_MI250' | 'OTHER': Default GPU model
  - `gpu_count` number: Default number of GPUs
  - `cpu_count` number: Default number of vCPUs
  - `memory_mb` number: Default memory in MiB
  - `disk_mb` number: Default disk in MiB
  - `ports` ComputeTemplatePorts (unresolved $ref)
  - `env` ComputeEnv[]: Default environment variables (write-only values)
    - `name` string, required: Environment variable name
    - `value` string: Environment variable value (write-only; never returned)
  - `is_public` boolean: Whether the template is publicly shared
  - `last_used_at` string, date-time: When an instance was last started from this template (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `metadata` ComputeMetadata[]: Vendor labels, tags and metadata
    - `id` string: The label, tag or metadata identifier
    - `slug` string: The label, tag or metadata key
    - `value` unknown
    - `namespace` string: The origin of the value (eg. labels, tags, metadata)
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'ARRAY' | 'OBJECT': The data type of the value
    - `extra_data` unknown
  - `raw` unknown

## Response `200`

Successful

- ComputeTemplate
  - `id` string: Unique identifier for the template
  - `created_at` string, date-time: When the template was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: When the template was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `name` string: Display name of the template
  - `aliases` string[]: Alternative names or tags for the template
  - `image` string: Container or OS image
  - `dockerfile` string: Dockerfile used to build the template
  - `start_command` string: Command run when an instance starts
  - `status` 'PENDING' | 'BUILDING' | 'READY' | 'FAILED' | 'OTHER': Normalized build status
  - `gpu_model` 'NVIDIA_GB300' | 'NVIDIA_B300' | 'NVIDIA_GB200' | 'NVIDIA_B200' | 'NVIDIA_GH200' | 'NVIDIA_H200' | 'NVIDIA_H100_SXM' | 'NVIDIA_H100_PCIE' | 'NVIDIA_H100_NVL' | 'NVIDIA_A100_SXM_80GB' | 'NVIDIA_A100_PCIE_80GB' | 'NVIDIA_A100_40GB' | 'NVIDIA_L40S' | 'NVIDIA_L40' | 'NVIDIA_L4' | 'NVIDIA_A40' | 'NVIDIA_A10' | 'NVIDIA_RTX_PRO_6000' | 'NVIDIA_RTX_6000_ADA' | 'NVIDIA_RTX_A6000' | 'NVIDIA_RTX_A5000' | 'NVIDIA_RTX_A4000' | 'NVIDIA_RTX_5090' | 'NVIDIA_RTX_4090' | 'NVIDIA_RTX_3090' | 'NVIDIA_V100' | 'NVIDIA_T4' | 'AMD_MI355X' | 'AMD_MI325X' | 'AMD_MI300X' | 'AMD_MI250' | 'OTHER': Default GPU model
  - `gpu_count` number: Default number of GPUs
  - `cpu_count` number: Default number of vCPUs
  - `memory_mb` number: Default memory in MiB
  - `disk_mb` number: Default disk in MiB
  - `ports` ComputeTemplatePorts (unresolved $ref)
  - `env` ComputeEnv[]: Default environment variables (write-only values)
    - `name` string, required: Environment variable name
    - `value` string: Environment variable value (write-only; never returned)
  - `is_public` boolean: Whether the template is publicly shared
  - `last_used_at` string, date-time: When an instance was last started from this template (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `metadata` ComputeMetadata[]: Vendor labels, tags and metadata
    - `id` string: The label, tag or metadata identifier
    - `slug` string: The label, tag or metadata key
    - `value` unknown
    - `namespace` string: The origin of the value (eg. labels, tags, metadata)
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'ARRAY' | 'OBJECT': The data type of the value
    - `extra_data` unknown
  - `raw` unknown

---

[API](https://skmtc.dev/unified/apis/unified-to-api-2.md) · [All operations](https://skmtc.dev/unified/apis/unified-to-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/unified/apis/unified-to-api-2/revisions/7a38bdd7f089?raw)
