---
title: How to Create an Instance Template
url: https://docs.vultr.com/products/compute/clusters/instance-templates/create
description: Create a reusable Vultr instance template with a plan, OS, SSH keys, and user data using the API for consistent setups.
publish_date: 2026-10-27T21:32:36.615224Z
last_updated: 2026-10-28T17:02:45.980820Z
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

An instance template is a reusable blueprint that defines the plan, OS, SSH keys, and Cloud-Init user data for instances. Templates ensure consistent deployments across a cluster and simplify scaling by eliminating the need to specify configuration details for each new instance.

This guide explains how to create an instance template from scratch using the Vultr API. To capture an existing instance's configuration instead, including its startup script, see [How to Create an Instance Template From an Instance](https://docs.vultr.com/products/compute/clusters/instance-templates/create-from-instance).

The following table describes the available fields for creating an instance template:

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `plan` | string | Yes | The compute plan identifier, such as `vhp-4c-8gb-intel`. |
| `label` | string | No | A descriptive label for the template. |
| `os_id` | integer | No | The operating system ID. |
| `iso_id` | string | No | The ISO image ID. |
| `snapshot_id` | string | No | The snapshot ID. |
| `marketplace_app_id` | integer | No | The Marketplace application ID. |
| `marketplace_image_id` | integer | No | The Marketplace image ID. |
| `ssh_key_ids` | array | No | Array of SSH key IDs to install on the instance. `sshkey_ids` is also accepted, and `ssh_key_ids` takes precedence if both are provided. |
| `user_data` | string | No | Base64-encoded Cloud-Init user data to initialize and customize the instance at boot. |

> [!NOTE]
> * Creating an instance template requires only the `plan` field. All other fields are optional.
> * To set an image source, choose only one of `os_id`, `iso_id`, `snapshot_id`, `marketplace_app_id`, or `marketplace_image_id`.
> * This endpoint doesn't accept a startup script. To get a template with a startup script, [create it from an existing instance](https://docs.vultr.com/products/compute/clusters/instance-templates/create-from-instance) instead.
> * VPC and VFS attachments aren't part of a template. Set them on the cluster.

Send a `POST` request to the [**Create Instance Template** endpoint](https://www.vultr.com/api/#tag/instance-templates/operation/create-instance-template) to create a new template. Replace `PLAN` with the compute plan identifier, `OS_ID` with the operating system ID, `TEMPLATE_LABEL` with a descriptive label, and `SSH_KEY_ID` with an SSH key's ID.

```console
$ curl "https://api.vultr.com/v2/instances/templates" \
    -X POST \
    -H "Authorization: Bearer ${VULTR_API_KEY}" \
    -H "Content-Type: application/json" \
    -d '{
        "plan": "PLAN",
        "os_id": OS_ID,
        "label": "TEMPLATE_LABEL",
        "ssh_key_ids": [
            "SSH_KEY_ID"
        ]
    }'
```

A successful request returns an HTTP `200 OK` response containing an array of template details, unlike the Retrieve and Update endpoints, which return a single object. Note the template `id` at `instance_template[0].id` for use when creating clusters or instances. The response also includes read-only fields such as `plan_details`, `os`, `os_shortname`, `disk_config`, and `ephemeral`, which indicates whether a cluster created the template and still owns it.
