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

# Agent API Keys

> Add an API key to the agent so you can query and manage domains, endpoints, and other account resources from the command line.

The ngrok agent contains a [complete CLI for the ngrok API](/docs/gateway/agent/cli-api/).

To use it, [create an API key on your ngrok dashboard](https://dashboard.ngrok.com/api-keys) and then run:

```bash theme={null}
ngrok config add-api-key <API_KEY>
```

After you add the API key, try querying your list of domains or online endpoints:

```bash theme={null}
ngrok api endpoints list
ngrok api reserved-domains list
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.