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

# Provision Instance

> How to provision an instance using availability data

<Info>
  Before you start, ensure that you have [API Key](/api-reference/api-keys) with `Instances -> Read and write` permission
</Info>

## Checking GPU Availability

First, check available GPU configurations:

```bash theme={null}
prime availability list
```

<Tip>
  Filter results using these options:

  * `--gpu-type`: Specific GPU model (e.g., H100\_80GB)
  * `--regions`: Geographic locations (e.g., united\_states,canada)
  * `--gpu-count`: Number of GPUs needed
  * `--socket`: Socket type (PCIe, SXM4, etc.)
  * `--provider`: Name of a provider
</Tip>

## Creating an Instance

Create a new instance interactively:

```bash theme={null}
prime pods create
```

### Available Options

<ResponseField name="--id" type="string" optional>
  Short ID from availability list
</ResponseField>

<ResponseField name="--cloud-id" type="string" optional>
  Cloud ID from provider
</ResponseField>

<ResponseField name="--gpu-type" type="string" optional>
  GPU model (e.g., H100\_80GB, A100)
</ResponseField>

<ResponseField name="--gpu-count" type="integer" optional>
  Number of GPUs required
</ResponseField>

<ResponseField name="--name" type="string" optional>
  Instance name (alphanumeric and dashes only)
</ResponseField>

<ResponseField name="--disk-size" type="integer" optional>
  Storage size in GB
</ResponseField>

<ResponseField name="--vcpus" type="integer" optional>
  Number of virtual CPUs
</ResponseField>

<ResponseField name="--memory" type="integer" optional>
  RAM in GB
</ResponseField>

<ResponseField name="--image" type="string" optional>
  Operating system image
</ResponseField>

<ResponseField name="--team-id" type="string" optional>
  Team identifier for the instance
</ResponseField>

<ResponseField name="--env" type="string" optional>
  Environment Variable in form `KEY=value` - this can be used multiple times
</ResponseField>

<ResponseField name="--disks" type="string" optional>
  Attach existing disk IDs to the instance. Can be specified multiple times for multiple disks.

  * Example: `--disks disk-id-1 --disks disk-id-2`
</ResponseField>

<ResponseField name="--share-with-team" type="boolean" optional>
  Share the instance with all team members. Requires a team to be set via `--team-id` or `prime config set-team-id`. Team members' SSH keys will be added to the instance.
</ResponseField>

<ResponseField name="--add-members" type="boolean" optional>
  Interactively select specific team members to share the instance with. Displays a numbered list of team members and prompts for selection. Enter comma-separated numbers or `all` for everyone.
</ResponseField>

### Interactive Creation Process

If options are not provided, the CLI will guide you through:

1. GPU Selection
2. Configuration Options
3. Resource Allocation
4. Image Selection
5. Team Assignment

<Note>
  The CLI will show default values and valid ranges for resources like disk size, vCPUs, and memory based on the selected GPU configuration.
</Note>

### Using Custom Templates

To use a custom environment:

1. Select a template from the [Templates Page](https://app.primeintellect.ai/dashboard/templates)
2. Create instance with template:

```bash theme={null}
prime pods create \
  --image custom_template \
  --custom-template-id "template_id"
```

<Warning>
  Ensure your template is compatible with the selected GPU configuration.
</Warning>

### Attaching Persistent Disks

To attach existing persistent disks to your instance:

```bash theme={null}
prime pods create \
  --id 346663 \
  --disks disk-id-1 \
  --disks disk-id-2
```

This is useful for:

* Accessing shared datasets across multiple instances
* Persisting model checkpoints and training artifacts
* Resuming training from previous sessions

<Tip>
  Use `prime disks list` to see your available disks and their IDs. Learn more about creating and managing disks in [Managing Disks](/cli-reference/managing-disks).
</Tip>

## Sharing with Team Members

When working in a team, you can share instances so that other members' SSH keys are added to the instance, giving them direct access.

### Share with all team members

```bash theme={null}
prime pods create --share-with-team
```

### Interactively select members

```bash theme={null}
prime pods create --add-members
```

This displays a numbered list of team members (excluding yourself) and prompts you to select which members to share with. Enter comma-separated numbers (e.g. `1,3,5`) or type `all` to share with everyone.

### Auto-share by default

To always share new instances with your team without passing a flag each time:

```bash theme={null}
prime config set-share-resources-with-team true
```

<Note>
  Sharing flags require a team to be configured. Set one with `prime config set-team-id` or pass `--team-id` when creating the instance.
</Note>

## Managing Your Instance

Monitor instance status:

```bash theme={null}
prime pods status <pod-id>
```

SSH into your instance:

```bash theme={null}
prime pods ssh <pod-id>
```

<Warning>
  Configure your SSH key path in CLI settings and run chmod 400 on your private\_key.pm before using SSH.
</Warning>

Terminate instance:

```bash theme={null}
prime pods terminate <pod-id>
```

<Note>
  You'll be prompted to confirm before termination.
</Note>
