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

Create a new api-key with restricted permissions. Can be sent to other users and teammates

## Usage

```bash theme={null}
vastai create api-key --name NAME --permission_file PERMISSIONS
```

## Options

<ParamField path="--name" type="string">
  name of the api-key
</ParamField>

<ParamField path="--permission_file" type="string">
  file path for json encoded permissions, see [https://vast.ai/docs/cli/roles-and-permissions](https://vast.ai/docs/cli/roles-and-permissions) for more information
</ParamField>

<ParamField path="--key_params" type="string">
  optional wildcard key params for advanced keys
</ParamField>

## Description

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](https://vast.ai/docs/cli/roles-and-permissions)

## Examples

```bash theme={null}
vastai create 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`) |
