> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai create workergroup

Create a new autoscale group

## Usage

```bash theme={null}
vastai create workergroup [OPTIONS]
```

## Options

<ParamField path="--template_hash" type="string">
  template hash (required, but **Note**: if you use this field, you can skip search\_params, as they are automatically inferred from the template)
</ParamField>

<ParamField path="--template_id" type="integer">
  template id (optional)
</ParamField>

<ParamField path="-n" type="boolean">
  Disable default search param query args (alias: `--no-default`)
</ParamField>

<ParamField path="--launch_args" type="string">
  launch args  string for create instance  ex: "`--onstart` onstart\_wget.sh  `--env` '-e ONSTART\_PATH=[https://s3.amazonaws.com/vast.ai/onstart\_OOBA.sh](https://s3.amazonaws.com/vast.ai/onstart_OOBA.sh)' `--image` atinoda/text-generation-webui:default-nightly `--disk` 64"
</ParamField>

<ParamField path="--endpoint_name" type="string">
  deployment endpoint name (allows multiple workergroups to share same deployment endpoint)
</ParamField>

<ParamField path="--endpoint_id" type="integer">
  deployment endpoint id (allows multiple workergroups to share same deployment endpoint)
</ParamField>

<ParamField path="--test_workers" type="integer" default="3">
  number of workers to create to get an performance estimate for while initializing workergroup (default 3)
</ParamField>

<ParamField path="--gpu_ram" type="number">
  estimated GPU RAM req  (independent of search string)
</ParamField>

<ParamField path="--search_params" type="string">
  search param string for search offers    ex: "gpu\_ram>=23 num\_gpus=2 gpu\_name=RTX\_4090 inet\_down>200 direct\_port\_count>2 disk\_space>=64"
</ParamField>

<ParamField path="--min_load" type="number">
  \[NOTE: this field isn't currently used at the workergroup level] minimum floor load in perf units/s  (token/s for LLms)
</ParamField>

<ParamField path="--target_util" type="number">
  \[NOTE: this field isn't currently used at the workergroup level] target capacity utilization (fraction, max 1.0, default 0.9)
</ParamField>

<ParamField path="--cold_mult" type="number">
  \[NOTE: this field isn't currently used at the workergroup level]cold/stopped instance capacity target as multiple of hot capacity target (default 2.0)
</ParamField>

<ParamField path="--cold_workers" type="integer">
  min number of workers to keep 'cold' for this workergroup
</ParamField>

## Description

Create a new autoscaling group to manage a pool of worker instances.

Example: vastai create workergroup `--template_hash` HASH  `--endpoint_name` "LLama" `--test_workers` 5

## Examples

```bash theme={null}
vastai create workergroup
```

## Global Options

The following options are available for all commands:

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `--url URL`     | Server REST API URL                                   |
| `--retry N`     | Retry limit                                           |
| `--raw`         | Output machine-readable JSON                          |
| `--explain`     | Verbose explanation of API calls                      |
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |
