> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withpaygent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpaygent.com/_mcp/server.

# API Keys

> Create, list, revoke, and delete API keys.

API keys authenticate the usage-tracking service. Managing them requires a signed-in session.

## `paygent api-key create`

```bash
paygent api-key create --name "production"
```

| Flag                   | Description                         |
| ---------------------- | ----------------------------------- |
| `--name <name>`        | What this key is for. Required.     |
| `--description <text>` | Longer note about where it is used. |

> **Warning**
>
> The secret is shown **once** and stored only as a hash. Capture it at creation:
>
> ```bash
> paygent api-key create --name "production" --output json > key.json
> ```

## `paygent api-key list`

```bash
paygent api-key list
```

## `paygent api-key revoke`

Disable a key's ability to authenticate.

```bash
paygent api-key revoke <id> --force
```

## `paygent api-key delete`

Remove the key record.

```bash
paygent api-key delete <id> --force
```