Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions cli/reference/accept-price-increase.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: "vastai accept price-increase"
sidebarTitle: "accept price-increase"
---

Accept one or more pending host price increases

## Usage

```bash
vastai accept price-increase ID [ID ...] [--yes]
```

## Arguments

<ParamField path="ids" type="integer" required>
instance IDs to accept (one or more).
</ParamField>

## Options

<ParamField path="--yes" type="boolean">
skip the interactive prompt; required when stdin is not a TTY
</ParamField>

## Description

Review pending price increases with `vastai show pending-price-increases`
before accepting. The CLI fans out one PUT per instance ID (no batch
endpoint exists on the backend), and the new rate applies only after
each contract's current end_date — your remaining time on the current
term is billed at the original price.

## Examples

```bash
vastai accept price-increase 123 --yes
vastai accept price-increase 1 2 3 --yes

Exit codes:
0 — every requested row was accepted
1 — at least one row failed (non-stale)
2 — at least one row was stale (re-run `show pending-price-increases`)
```

## 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`) |
6 changes: 3 additions & 3 deletions cli/reference/attach-ssh.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Attach an ssh key to an instance. This will allow you to connect to the instance
## Examples

```bash
vast attach ssh 12371 AAAAB3NzaC1yc2EAAA...
vast attach ssh 12371 $(cat ~/.ssh/id_rsa.pub)
vast attach ssh 12371 ~/.ssh/id_rsa.pub
vastai attach ssh 12371 AAAAB3NzaC1yc2EAAA...
vastai attach ssh 12371 $(cat ~/.ssh/id_rsa.pub)
vastai attach ssh 12371 ~/.ssh/id_rsa.pub

All examples attaches the ssh key to instance 12371
```
Expand Down
2 changes: 1 addition & 1 deletion cli/reference/cancel-copy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Use this command to cancel any/all current remote copy operations copying to a s
## Examples

```bash
vast cancel copy 12371
vastai cancel copy 12371

The first example cancels all copy operations currently copying data into instance 12371
```
Expand Down
32 changes: 29 additions & 3 deletions cli/reference/cancel-maint.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
---
title: "vastai cancel maint"
sidebarTitle: "cancel maint"
description: "Host command"
---

import CancelMaintCLI from '/snippets/host/cli/cancel-maint.mdx';
[Host] Cancel maint window

<CancelMaintCLI />
## Usage

```bash
vastai cancel maint id
```

## Arguments

<ParamField path="id" type="integer" required>
id of machine to cancel maintenance(s) for
</ParamField>

## Description

For deleting a machine's scheduled maintenance window(s), use this cancel maint command.
Example: vastai cancel maint 8207

## 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`) |
2 changes: 1 addition & 1 deletion cli/reference/cancel-sync.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Use this command to cancel any/all current remote cloud sync operations copying
## Examples

```bash
vast cancel sync 12371
vastai cancel sync 12371

The first example cancels all copy operations currently copying data into instance 12371
```
Expand Down
21 changes: 8 additions & 13 deletions cli/reference/change-bid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,31 @@ vastai change bid id [--price PRICE]
</ParamField>

<ParamField path="--schedule" type="string">
try to schedule a command to run hourly, daily, or monthly. Valid values are HOURLY, DAILY, WEEKLY For ex. `--schedule` DAILY Choices: `HOURLY`, `DAILY`, `WEEKLY`
try to schedule a command to run hourly, daily, or weekly. Valid values are HOURLY, DAILY, WEEKLY For ex. --schedule DAILY
Allowed values: HOURLY, DAILY, WEEKLY
</ParamField>

<ParamField path="--start_date" type="string">
<ParamField path="--start_date" type="string" default="2026-09-09">
Start date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is now. (optional)
</ParamField>

<ParamField path="--end_date" type="string">
<ParamField path="--end_date" type="string" default="2026-09-16">
End date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is 7 days from now. (optional)
</ParamField>

<ParamField path="--day" type="integer" default="0">
Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. `--day` 0
<ParamField path="--day" type="parse_day_cron_style">
Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. --day 0
</ParamField>

<ParamField path="--hour" type="integer" default="0">
Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. `--hour` 16
<ParamField path="--hour" type="parse_hour_cron_style">
Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. --hour 16
</ParamField>

## Description

Change the current bid price of instance id to PRICE.
If PRICE is not specified, then a winning bid price is used as the default.

## Examples

```bash
vastai change bid <ID>
```

## Global Options

The following options are available for all commands:
Expand Down
34 changes: 31 additions & 3 deletions cli/reference/cleanup-machine.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
---
title: "vastai cleanup machine"
sidebarTitle: "cleanup machine"
description: "Host command"
---

import CleanupMachineCLI from '/snippets/host/cli/cleanup-machine.mdx';
[Host] Remove all expired storage instances from the machine, freeing up space

<CleanupMachineCLI />
## Usage

```bash
vastai cleanup machine ID [options]
```

## Arguments

<ParamField path="id" type="integer" required>
id of machine to cleanup
</ParamField>

## Description

Instances expire on their end date. Expired instances still pay storage fees, but can not start.
Since hosts are still paid storage fees for expired instances, we do not auto delete them.
Instead you can use this CLI/API function to delete all expired storage instances for a machine.
This is useful if you are running low on storage, want to do maintenance, or are subsidizing storage, etc.

## 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`) |
14 changes: 4 additions & 10 deletions cli/reference/clone-volume.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,19 @@ vastai clone volume <source_id> <dest_id> [options]

## Options

<ParamField path="-s" type="number">
Size of new volume contract, in GB. Must be greater than or equal to the source volume, and less than or equal to the destination offer. (alias: `--size`)
<ParamField path="--size" type="number">
Size of new volume contract, in GB. Must be greater than or equal to the source volume, and less than or equal to the destination offer.
</ParamField>

<ParamField path="-d" type="boolean">
Do not compress volume data before copying. (alias: `--disable_compression`)
<ParamField path="--disable_compression" type="boolean">
Do not compress volume data before copying.
</ParamField>

## Description

Create a new volume with the given offer, by copying the existing volume.
Size defaults to the size of the existing volume, but can be increased if there is available space.

## Examples

```bash
vastai clone volume <SOURCE> <DEST>
```

## Global Options

The following options are available for all commands:
Expand Down
22 changes: 14 additions & 8 deletions cli/reference/cloud-copy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Copy files/folders to and from cloud providers
## Usage

```bash
vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID -connection CONNECTION_ID --transfer TRANSFER_TYPE
vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID --connection CONNECTION_ID --transfer TRANSFER_TYPE
```

## Options
Expand Down Expand Up @@ -54,23 +54,24 @@ vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID -connection CONNECT
</ParamField>

<ParamField path="--schedule" type="string">
try to schedule a command to run hourly, daily, or monthly. Valid values are HOURLY, DAILY, WEEKLY For ex. `--schedule` DAILY Choices: `HOURLY`, `DAILY`, `WEEKLY`
try to schedule a command to run hourly, daily, or weekly. Valid values are HOURLY, DAILY, WEEKLY For ex. --schedule DAILY
Allowed values: HOURLY, DAILY, WEEKLY
</ParamField>

<ParamField path="--start_date" type="string">
<ParamField path="--start_date" type="string" default="2026-09-09">
Start date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is now. (optional)
</ParamField>

<ParamField path="--end_date" type="string">
End date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is contract's end. (optional)
</ParamField>

<ParamField path="--day" type="integer" default="0">
Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. `--day` 0
<ParamField path="--day" type="parse_day_cron_style">
Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. --day 0
</ParamField>

<ParamField path="--hour" type="integer" default="0">
Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. `--hour` 16
<ParamField path="--hour" type="parse_hour_cron_style">
Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. --hour 16
</ParamField>

## Description
Expand All @@ -87,10 +88,15 @@ vastai show connections
ID NAME Cloud Type
1001 test_dir drive
1003 data_dir drive
1004 hf_data hf

vastai cloud copy --src /folder --dst /workspace --instance 6003036 --connection 1001 --transfer "Instance To Cloud"
vastai cloud copy --src my-bucket/data --dst /workspace --instance 6003036 --connection 1004 --transfer "Cloud To Instance"

The example copies all contents of /folder into /workspace on instance 6003036 from gdrive connection 'test_dir'.
The first cloud copy example copies all contents of /folder on instance 6003036 into /workspace in gdrive connection 'test_dir'.
The second cloud copy example copies my-bucket/data from Hugging Face connection 'hf_data' into /workspace on the instance.

Note: Hugging Face cloud destinations must already exist as bucket paths; directories are not created automatically.
```

## Global Options
Expand Down
25 changes: 15 additions & 10 deletions cli/reference/copy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ vastai copy SRC DST

## Options

<ParamField path="-i" type="string">
Location of ssh private key (alias: `--identity`)
<ParamField path="--identity" type="string">
Location of ssh private key
</ParamField>

## Description
Expand All @@ -39,27 +39,32 @@ Supported location formats:
- cloud_service:path (cloud service format)
- cloud_service.cloud_service_id:path (cloud service with ID)
- local:path (explicit local path)
- V.volume_id:path (volume copy, see restrictions)
- V.volume_id:path (volume copy)

You should not copy to /root or / as a destination directory, as this can mess up the permissions on your instance ssh folder, breaking future copy operations (as they use ssh authentication)
You can see more information about constraints here: https://vast.ai/docs/gpu-instances/data-movement#constraints
Volume copy supports copying to other volumes, instances, and cloud services (via your Cloud Connections). Copying between a volume and a local path is not supported.
Volume copy is currently only supported for copying to other volumes, instances, or cloud services, not local.

## Examples

```bash
vast copy 6003036:/workspace/ 6003038:/workspace/
vast copy C.11824:/data/test local:data/test
vast copy local:data/test C.11824:/data/test
vast copy drive:/folder/file.txt C.6003036:/workspace/
vast copy s3.101:/data/ C.6003036:/workspace/
vast copy V.1234:/file C.5678:/workspace/
vastai copy 6003036:/workspace/ 6003038:/workspace/
vastai copy C.11824:/data/test local:data/test
vastai copy local:data/test C.11824:/data/test
vastai copy drive:/folder/file.txt C.6003036:/workspace/
vastai copy s3.101:/data/ C.6003036:/workspace/
vastai copy hf.101:/my-bucket/data/ C.6003036:/workspace/
vastai copy V.1234:/file C.5678:/workspace/
vastai copy V.1234:/file s3.101:/workspace/

The first example copy syncs all files from the absolute directory '/workspace' on instance 6003036 to the directory '/workspace' on instance 6003038.
The second example copy syncs files from container 11824 to the local machine using structured syntax.
The third example copy syncs files from local to container 11824 using structured syntax.
The fourth example copy syncs files from Google Drive to an instance.
The fifth example copy syncs files from S3 bucket with id 101 to an instance.
The sixth example copy syncs files from a Hugging Face bucket using connection id 101 to an instance.
The seventh example copy syncs files from volume 1234 to instance 5678.
The eighth example copy syncs files from volume 1234 to S3 bucket with id 101.
```

## Global Options
Expand Down
6 changes: 0 additions & 6 deletions cli/reference/create-api-key.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ vastai create api-key --name NAME --permission_file PERMISSIONS
In order to create api keys you must understand how permissions must be sent via json format.
You can find more information about permissions here: https://vast.ai/docs/cli/roles-and-permissions

## Examples

```bash
vastai create api-key
```

## Global Options

The following options are available for all commands:
Expand Down
12 changes: 3 additions & 9 deletions cli/reference/create-endpoint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ vastai create endpoint [OPTIONS]

## Options

<ParamField path="--min_load" type="number" default="0.0">
<ParamField path="--min_load" type="number">
minimum floor load in perf units/s (token/s for LLms)
</ParamField>

<ParamField path="--min_cold_load" type="number" default="0.0">
<ParamField path="--min_cold_load" type="number">
minimum floor load in perf units/s (token/s for LLms), but allow handling with cold workers
</ParamField>

Expand Down Expand Up @@ -57,13 +57,7 @@ vastai create endpoint [OPTIONS]

Create a new endpoint group to manage many autoscaling groups

Example: vastai create endpoint `--target_util` 0.9 `--cold_mult` 2.0 `--endpoint_name` "LLama"

## Examples

```bash
vastai create endpoint
```
Example: vastai create endpoint --target_util 0.9 --cold_mult 2.0 --endpoint_name "LLama"

## Global Options

Expand Down
Loading