---
title: "Template data model"
url: "https://docs.unified.to/compute/template/model"
description: "The Template data model object in Unified's Template API: 19 fields, including created_at, updated_at and name, with types and enum values."
---
# Template data model

 View field support, webhooks, and list parameters for each integration on the [Supported Integrations](https://docs.unified.to/compute/integrations.md) page. 

| Field                    | Type                                                                                     | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------ | ---------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                       | string                                                                                   | No       | Unique identifier for the template                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| created\_at              | string (date-time)                                                                       | No       | When the template was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| updated\_at              | string (date-time)                                                                       | No       | When the template was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| name                     | string                                                                                   | No       | Display name of the template                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| aliases                  | string\[\]                                                                               | No       | Alternative names or tags for the template                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| image                    | string                                                                                   | No       | Container or OS image                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| dockerfile               | string                                                                                   | No       | Dockerfile used to build the template                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| start\_command           | string                                                                                   | No       | Command run when an instance starts                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| status                   | enum                                                                                     | No       | Normalized build status Values: PENDING, BUILDING, READY, FAILED, OTHER                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| gpu\_model               | enum                                                                                     | No       | Default GPU model Values: 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 |
| gpu\_count               | number                                                                                   | No       | Default number of GPUs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| cpu\_count               | number                                                                                   | No       | Default number of vCPUs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| memory\_mb               | number                                                                                   | No       | Default memory in MiB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| disk\_mb                 | number                                                                                   | No       | Default disk in MiB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ports                    | object                                                                                   | No       | Ports exposed by instances from this template                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| env                      | [ComputeEnv](https://docs.unified.to/compute/template/model.md#ComputeEnv)\[\]           | No       | Default environment variables (write-only values)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| env\[\].name             | string                                                                                   | Yes      | Environment variable name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| env\[\].value            | string                                                                                   | No       | Environment variable value (write-only; never returned)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| is\_public               | boolean                                                                                  | No       | Whether the template is publicly shared                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| last\_used\_at           | string (date-time)                                                                       | No       | When an instance was last started from this template (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| metadata                 | [ComputeMetadata](https://docs.unified.to/compute/template/model.md#ComputeMetadata)\[\] | No       | Vendor labels, tags and metadata                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| metadata\[\].id          | string                                                                                   | No       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| metadata\[\].slug        | string                                                                                   | No       | The label, tag or metadata key                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| metadata\[\].value       | object                                                                                   | No       | The label, tag or metadata value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| metadata\[\].namespace   | string                                                                                   | No       | The origin of the value (eg. labels, tags, metadata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| metadata\[\].format      | enum                                                                                     | No       | The data type of the value Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| metadata\[\].extra\_data | object                                                                                   | No       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

## TypeScript

```typescript
export type ComputeTemplate = {
	id?: string; // Unique identifier for the template
	created_at?: string-time; // When the template was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-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?: any; // Ports exposed by instances from this template
	env?: []; // Default environment variables (write-only values)
	is_public?: boolean; // Whether the template is publicly shared
	last_used_at?: string-time; // When an instance was last started from this template (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	metadata?: []; // Vendor labels, tags and metadata
	raw?: any; // Raw data from integration
} 
```

## Zod

```typescript
import { z } from 'zod';

export const ZodComputeTemplate = z.object({
	id: z.string().optional().describe("Unique identifier for the template"),
	created_at: z.string-time().optional().describe("When the template was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the template was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("Display name of the template"),
	aliases: z.array().optional().describe("Alternative names or tags for the template"),
	image: z.string().optional().describe("Container or OS image"),
	dockerfile: z.string().optional().describe("Dockerfile used to build the template"),
	start_command: z.string().optional().describe("Command run when an instance starts"),
	status: z.enum("PENDING", "BUILDING", "READY", "FAILED", "OTHER").optional().describe("Normalized build status"),
	gpu_model: z.enum("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").optional().describe("Default GPU model"),
	gpu_count: z.number().optional().describe("Default number of GPUs"),
	cpu_count: z.number().optional().describe("Default number of vCPUs"),
	memory_mb: z.number().optional().describe("Default memory in MiB"),
	disk_mb: z.number().optional().describe("Default disk in MiB"),
	ports: z.unknown().optional().describe("Ports exposed by instances from this template"),
	env: z.array().optional().describe("Default environment variables (write-only values)"),
	is_public: z.boolean().optional().describe("Whether the template is publicly shared"),
	last_used_at: z.string-time().optional().describe("When an instance was last started from this template (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	metadata: z.array().optional().describe("Vendor labels, tags and metadata"),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class ComputeTemplateStatus(str, Enum):
	PENDING = 'PENDING'
	BUILDING = 'BUILDING'
	READY = 'READY'
	FAILED = 'FAILED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class ComputeTemplateGpu_model(str, Enum):
	NVIDIA_GB300 = 'NVIDIA_GB300'
	NVIDIA_B300 = 'NVIDIA_B300'
	NVIDIA_GB200 = 'NVIDIA_GB200'
	NVIDIA_B200 = 'NVIDIA_B200'
	NVIDIA_GH200 = 'NVIDIA_GH200'
	NVIDIA_H200 = 'NVIDIA_H200'
	NVIDIA_H100_SXM = 'NVIDIA_H100_SXM'
	NVIDIA_H100_PCIE = 'NVIDIA_H100_PCIE'
	NVIDIA_H100_NVL = 'NVIDIA_H100_NVL'
	NVIDIA_A100_SXM_80GB = 'NVIDIA_A100_SXM_80GB'
	NVIDIA_A100_PCIE_80GB = 'NVIDIA_A100_PCIE_80GB'
	NVIDIA_A100_40GB = 'NVIDIA_A100_40GB'
	NVIDIA_L40S = 'NVIDIA_L40S'
	NVIDIA_L40 = 'NVIDIA_L40'
	NVIDIA_L4 = 'NVIDIA_L4'
	NVIDIA_A40 = 'NVIDIA_A40'
	NVIDIA_A10 = 'NVIDIA_A10'
	NVIDIA_RTX_PRO_6000 = 'NVIDIA_RTX_PRO_6000'
	NVIDIA_RTX_6000_ADA = 'NVIDIA_RTX_6000_ADA'
	NVIDIA_RTX_A6000 = 'NVIDIA_RTX_A6000'
	NVIDIA_RTX_A5000 = 'NVIDIA_RTX_A5000'
	NVIDIA_RTX_A4000 = 'NVIDIA_RTX_A4000'
	NVIDIA_RTX_5090 = 'NVIDIA_RTX_5090'
	NVIDIA_RTX_4090 = 'NVIDIA_RTX_4090'
	NVIDIA_RTX_3090 = 'NVIDIA_RTX_3090'
	NVIDIA_V100 = 'NVIDIA_V100'
	NVIDIA_T4 = 'NVIDIA_T4'
	AMD_MI355X = 'AMD_MI355X'
	AMD_MI325X = 'AMD_MI325X'
	AMD_MI300X = 'AMD_MI300X'
	AMD_MI250 = 'AMD_MI250'
	OTHER = 'OTHER'

@dataclasses.dataclass
class ComputeTemplate:
	"""Unique identifier for the template"""
	id: Optional[str]
	"""When the template was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the template was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""Display name of the template"""
	name: Optional[str]
	"""Alternative names or tags for the template"""
	aliases: Optional[List[List[str]]]
	"""Container or OS image"""
	image: Optional[str]
	"""Dockerfile used to build the template"""
	dockerfile: Optional[str]
	"""Command run when an instance starts"""
	start_command: Optional[str]
	"""Normalized build status"""
	status: Optional[ComputeTemplateStatus]
	"""Default GPU model"""
	gpu_model: Optional[ComputeTemplateGpu_model]
	"""Default number of GPUs"""
	gpu_count: Optional[int]
	"""Default number of vCPUs"""
	cpu_count: Optional[int]
	"""Default memory in MiB"""
	memory_mb: Optional[int]
	"""Default disk in MiB"""
	disk_mb: Optional[int]
	"""Ports exposed by instances from this template"""
	ports: Optional[PropertyComputeTemplatePorts]
	"""Default environment variables (write-only values)"""
	env: Optional[PropertyComputeTemplateEnv]
	"""Whether the template is publicly shared"""
	is_public: Optional[bool]
	"""When an instance was last started from this template (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	last_used_at: Optional[str]
	"""Vendor labels, tags and metadata"""
	metadata: Optional[PropertyComputeTemplateMetadata]

```
