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

# logout

> Remove the saved Clay API key from the config file.

Remove the saved API key from the config file. Subsequent authenticated commands will fail with `auth_missing_api_key` (exit `3`) until you run `clay login` again.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay logout
```

The command is idempotent — if no key is saved (or the config file is missing), it is a no-op and still exits `0`. Only the `default` profile is removed; other profiles in the file are preserved.

## Output

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "ok": true }
```

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay logout
clay logout && clay whoami   # whoami now exits 3 with auth_missing_api_key
```
