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

# verial auth

> Manage CLI authentication with your organization API key.

The `verial auth` commands store and inspect the organization API key used for every CLI call. The key is read from `VERIAL_API_KEY` first, then from `~/.verial/config.json`. Commands requiring auth fail with a helpful message if no key is configured.

Solver keys (`vrl_slv_*`) use a separate auth path for running published benchmarks and are not managed by the CLI. See [Solver keys](/guides/solver-keys).

## Subcommands

| Command                     | Description                                                       |
| --------------------------- | ----------------------------------------------------------------- |
| `verial auth set-key <key>` | Store an API key in `~/.verial/config.json`.                      |
| `verial auth status`        | Check whether an API key is configured and show a masked preview. |

## verial auth set-key

Store an organization API key on disk so subsequent commands authenticate without `VERIAL_API_KEY` or `--api-key`.

Synopsis:

```bash theme={null}
verial auth set-key <key>
```

Arguments:

| Argument | Description                               | Required |
| -------- | ----------------------------------------- | -------- |
| `<key>`  | Organization API key (starts with `vk_`). | Yes      |

Example:

```bash theme={null}
verial auth set-key vk_live_abc123def456
```

```
API key saved.
```

The key is written to `~/.verial/config.json` under the `api-key` field. `VERIAL_API_KEY` still takes precedence when both are set.

## verial auth status

Report whether an API key is configured. Exits 0 if configured, 1 otherwise.

Synopsis:

```bash theme={null}
verial auth status
```

Example:

```bash theme={null}
verial auth status
```

```
Authenticated (key: vk_live_...f456)
```

If no key is found:

```
No API key configured. Run: verial auth set-key <key>
```

## Key precedence

Keys are resolved in this order:

1. `--api-key <key>` flag on the command.
2. `VERIAL_API_KEY` environment variable.
3. `api-key` field in `~/.verial/config.json` (written by `verial auth set-key`).

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    API key scopes, rotation, and Solver keys.
  </Card>

  <Card title="verial config" icon="gear" href="/cli/config">
    Persistent CLI configuration including `api-key` and `base-url`.
  </Card>
</CardGroup>
