> For the complete documentation index, see [llms.txt](https://docs.i3d.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.i3d.net/game-hosting/elements/deploymentenvironment/hostcapacitytemplate.md).

# Host Capacity

With the HostCapacityTemplate element you can define how many game instances you want deployed on any specified BM instance types and / or VM instance types. The actual definitions of the instance types and capacities themselves are defined in the [InstanceTypeCapacity](/game-hosting/elements/deploymentenvironment/hostcapacitytemplate/instancetypecapacity.md) elements, which are assigned to this HostCapacityTemplate upon creation.

## Element Structure

| Property  | Value type | Required  | Description                                       |
| --------- | ---------- | --------- | ------------------------------------------------- |
| id        | string     | Read-only | Unique identifier of this element                 |
| name      | string     | Yes       | The name of the HostCapacityTemplate              |
| createdAt | int        | Read-only | A unix timestamp of when this element was created |

Table 1: HostCapacityTemplate element structure

## API example

Create a new HostCapacityTemplate within your i3D.net account.

[Full API reference](/api/api_one.md#v3-hostcapacitytemplate)

#### HTTP request

[`POST /v3/hostCapacityTemplate`](/api/api_one.md#v3-hostcapacitytemplate)

#### Request body

```
{
  "name": "MyHostCapacityTemplate"
}
```

#### Response body

```
[
  {
    "id": "4943474277300823573",
    "name": "MyHostCapacityTemplate",
    "createdAt": 1579007256
  }
]
```

## Assignment to a Fleet

A HostCapacityTemplate can be assigned to a [Fleet](/game-hosting/elements/deploymentenvironment/fleet.md). Here is a simple example to show you how:

[Full API reference](/api/api_one.md#v3-fleet)

#### HTTP request

[`PUT /v3/fleet/{fleetId}`](/api/api_one.md#v3-fleet-fleetid)

#### Request body

```
{
  "hostCapacityTemplateId": "4943474277300823573"
}
```

#### Response body

```
[
  {
    "id": "7420099900751948711",
    "name": "Bluewolf PC",
    "deploymentEnvironmentId": "173892217340309897",
    "deploymentProfileId": "8068976724396537810",
    "gameDeploymentTemplateId": "2190484266497878757",
    "utilityDeploymentTemplateId": "1316371245160957961",
    "dependencyDeploymentTemplateId": "6537333393893172977",
    "hostCapacityTemplateId": "4943474277300823573",
    "operationalStatus": 0
  }
]
```

## Assignment to an ApplicationBuild

A HostCapacityTemplate can also be assigned to an [ApplicationBuild](/game-hosting/elements/application/applicationbuild.md). This will override a HostCapacityTemplate set in the Fleet. This is useful if you want to test optimizations of a new build, to see if you can deploy more game instances than before.

[Full API reference](/api/api_one.md#v3-applicationbuild)

#### HTTP request

[`PUT /v3/applicationBuild/{applicationBuildId}`](/api/api_one.md#v3-applicationbuild-applicationbuildid)

#### Request body

```
{
  "hostCapacityTemplateId": "4943474277300823573"
}
```

#### Response body

```
[
  {
    "id": "794401102378076360",
    "name": "Bluewolf PC build",
    "applicationId": "7983757100270474749",
    "type": 1,
    "executable": "GameServer",
    "startupParameters": "-applicationInstanceId VARAPPLICATIONINSTANCEID -maxplayers 8",
    "instanceDoesReadyCallback": 0,
    "installId": 8675,
    "osId": 151,
    "hostCapacityTemplateId": "4943474277300823573",
    "createdAt": 1568899371,
    "label": []
  }
]
```

## Related element

This element contains a list of [InstanceTypeCapacity](/game-hosting/elements/deploymentenvironment/hostcapacitytemplate/instancetypecapacity.md) elements.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.i3d.net/game-hosting/elements/deploymentenvironment/hostcapacitytemplate.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
