> ## 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 set api-key

Set api-key (get your api-key from the console/CLI)

## Usage

```bash theme={null}
vastai set api-key APIKEY
```

## Arguments

<ParamField path="new_api_key" type="string" required>
  Api key to set as currently logged in user
</ParamField>

## Examples

```bash theme={null}
vastai set api-key <NEW_API_KEY>
```

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