> ## 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 multiple instances from a list of offer IDs.

## Signature

```python theme={null}
VastAI.create_instances(
    ids: List[int],
    template_hash: Optional[str] = None,
    user: Optional[str] = None,
    disk: Optional[float] = 10,
    image: Optional[str] = None,
    login: Optional[str] = None,
    label: Optional[str] = None,
    onstart: Optional[str] = None,
    onstart_cmd: Optional[str] = None,
    entrypoint: Optional[str] = None,
    ssh: bool = False,
    jupyter: bool = False,
    direct: bool = False,
    jupyter_dir: Optional[str] = None,
    jupyter_lab: bool = False,
    lang_utf8: bool = False,
    python_utf8: bool = False,
    env: Optional[str] = None,
    args: Optional[str] = None,
    force: bool = False,
    cancel_unavail: bool = False,
    bid_price: Optional[float] = None,
    create_volume: Optional[int] = None,
    link_volume: Optional[int] = None,
    volume_size: Optional[int] = None,
    mount_path: Optional[str] = None,
    volume_label: Optional[str] = None
) -> dict
```

## Parameters

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

<ParamField path="template_hash" type="Optional[str]">
  Create instance from template info
</ParamField>

<ParamField path="user" type="Optional[str]">
  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="Optional[float]" default="10">
  size of local disk partition in GB
</ParamField>

<ParamField path="image" type="Optional[str]">
  docker container image to launch
</ParamField>

<ParamField path="login" type="Optional[str]">
  docker login arguments for private repo authentication, surround with ''
</ParamField>

<ParamField path="label" type="Optional[str]">
  label to set on the instance
</ParamField>

<ParamField path="onstart" type="Optional[str]">
  filename to use as onstart script
</ParamField>

<ParamField path="onstart_cmd" type="Optional[str]">
  contents of onstart script as single argument
</ParamField>

<ParamField path="entrypoint" type="Optional[str]">
  override entrypoint for args launch instance
</ParamField>

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

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

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

<ParamField path="jupyter_dir" type="Optional[str]">
  For runtype 'jupyter', directory in instance to use to launch jupyter. Defaults to image's working directory
</ParamField>

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

<ParamField path="lang_utf8" type="bool">
  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="bool">
  Workaround for images with locale problems: set python's locale to C.UTF-8
</ParamField>

<ParamField path="env" type="Optional[str]">
  env variables and port mapping options, surround with ''
</ParamField>

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

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

<ParamField path="cancel_unavail" type="bool">
  Return error if scheduling fails (rather than creating a stopped instance)
</ParamField>

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

<ParamField path="create_volume" type="Optional[int]">
  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="Optional[int]">
  ID of an existing rented volume to link to the instance during creation. (returned from "show volumes" cmd)
</ParamField>

<ParamField path="volume_size" type="Optional[int]">
  Size of the volume to create in GB. Only usable with --create-volume (default 15GB)
</ParamField>

<ParamField path="mount_path" type="Optional[str]">
  The path to the volume from within the new instance container. e.g. /root/volume
</ParamField>

<ParamField path="volume_label" type="Optional[str]">
  (optional) A name to give the new volume. Only usable with --create-volume
</ParamField>

## Returns

`dict`

## Example

```python theme={null}
from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.create_instances(ids=12345)
print(result)
```
