> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai create instances

Create instances from a list of offers

## Usage

```bash theme={null}
vastai create instances [OPTIONS] ID0 ID1 ID2... [--args ...]
```

## Arguments

<ParamField path="ids" type="integer" required>
  ids of instance types to launch (returned from search offers)
</ParamField>

## Options

<ParamField path="--template_hash" type="string">
  Create instance from template info
</ParamField>

<ParamField path="--user" type="string">
  User to use with docker create. This breaks some images, so only use this if you are certain you need it.
</ParamField>

<ParamField path="--disk" type="number" default="10">
  size of local disk partition in GB
</ParamField>

<ParamField path="--image" type="string">
  docker container image to launch
</ParamField>

<ParamField path="--login" type="string">
  docker login arguments for private repo authentication, surround with ''
</ParamField>

<ParamField path="--label" type="string">
  label to set on the instance
</ParamField>

<ParamField path="--onstart" type="string">
  filename to use as onstart script
</ParamField>

<ParamField path="--onstart-cmd" type="string">
  contents of onstart script as single argument
</ParamField>

<ParamField path="--entrypoint" type="string">
  override entrypoint for args launch instance
</ParamField>

<ParamField path="--ssh" type="boolean">
  Launch as an ssh instance type
</ParamField>

<ParamField path="--jupyter" type="boolean">
  Launch as a jupyter instance instead of an ssh instance
</ParamField>

<ParamField path="--direct" type="boolean">
  Use (faster) direct connections for jupyter & ssh
</ParamField>

<ParamField path="--jupyter-dir" type="string">
  For runtype 'jupyter', directory in instance to use to launch jupyter. Defaults to image's working directory
</ParamField>

<ParamField path="--jupyter-lab" type="boolean">
  For runtype 'jupyter', Launch instance with jupyter lab
</ParamField>

<ParamField path="--lang-utf8" type="boolean">
  Workaround for images with locale problems: install and generate locales before instance launch, and set locale to C.UTF-8
</ParamField>

<ParamField path="--python-utf8" type="boolean">
  Workaround for images with locale problems: set python's locale to C.UTF-8
</ParamField>

<ParamField path="--env" type="string">
  env variables and port mapping options, surround with ''
</ParamField>

<ParamField path="--args" type="string">
  list of arguments passed to container ENTRYPOINT. Onstart is recommended for this purpose. (must be last argument)
</ParamField>

<ParamField path="--force" type="boolean">
  Skip sanity checks when creating from an existing instance
</ParamField>

<ParamField path="--cancel-unavail" type="boolean">
  Return error if scheduling fails (rather than creating a stopped instance)
</ParamField>

<ParamField path="--bid_price" type="number">
  (OPTIONAL) create an INTERRUPTIBLE instance with per machine bid price in \$/hour
</ParamField>

<ParamField path="--create-volume" type="integer">
  Create a new local volume using an ID returned from the "search volumes" command and link it to the new instance
</ParamField>

<ParamField path="--link-volume" type="integer">
  ID of an existing rented volume to link to the instance during creation. (returned from "show volumes" cmd)
</ParamField>

<ParamField path="--volume-size" type="integer">
  Size of the volume to create in GB. Only usable with --create-volume (default 15GB)
</ParamField>

<ParamField path="--mount-path" type="string">
  The path to the volume from within the new instance container. e.g. /root/volume
</ParamField>

<ParamField path="--volume-label" type="string">
  (optional) A name to give the new volume. Only usable with --create-volume
</ParamField>

## 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`) |
