An agent such as OpenClaw or Hermes Agent runs on your VPS day and night, with a MozOut key stored on the server. That key should be for that and nothing else. If the server is compromised, whoever takes the key can only use the AI, and the rest of the account stays out of reach.
Creating the key
| 1 |
In the API Center, create a new key with a name that says where it lives, such as "OpenClaw on the VPS".
|
|
| 2 |
Mode: Production. To check the setup first, create a Sandbox key before it: the answers are test ones and spend nothing.
|
|
| 3 |
Permissions: only ai:read, to see the models and the balance, and ai:write, to chat. No other area and no dangerous permission.
|
|
| 4 |
Validity: 30, 90 or 365 days, or no expiry; the default is 90. When the key expires, the agent starts getting 401 and stops.
|
|
| 5 |
IP list: the VPS IP address. That way the key only works from there; from anywhere else, the API answers 403 ip_not_allowed.
|
|
| 6 |
Confirm with your password and the 6-digit code sent by email. Copy the key straight away, because it is shown only once.
|
|
What about the spending limit?
The key's spending limit, in MT and over 30 days, counts what the API charges from the account credit: purchases and invoices paid with credit. A key with only ai:read and ai:write buys nothing, so that limit does not hold back AI use. To know what the agent spends, follow the key in History.
Storing the key on the VPS
Put the key in an environment variable or in the agent's variables file, never in code or in a repository. The steps are in using OpenClaw and in using Hermes Agent. Make the variables file readable only by the user that runs the agent. With OpenClaw, for example:
chmod 600 ~/.openclaw/.env
The spending in History
| 2 |
In the key filter, change All keys to the VPS key and choose the dates. Keys show up with the name you gave them in the API Center.
|
|
| 3 |
You see each request, with the model, the tokens and the credits used. The By key summary compares this key with the others.
|
|
| 4 |
To keep the data or work out totals elsewhere, use Export CSV.
|
|
|
If you suspect the key has left the server, revoke it at once in the API Center and create another. The agent stops until it gets the new one. See what to do, in the right order.
|
|
One key per agent and per server. With two agents, two keys: in History you see what each one spends, and if you have to revoke one, the other keeps working.
|
|
Want an agent on your VPS with its spending in plain sight? See All in One AI.
See All in One AI
|
RECOMMENDED PRODUCT VPS server with root access Resources of your own, the OS you choose, reinstall whenever you like. from $8.40/mo (3-year plan, with coupon) See plans |