API keys

Your server uses an API key to talk to UsageGate. One key covers your whole workspace.

Create one

  1. Open API keys and click Generate.
  2. Copy it right away: it is shown only once.
  3. Save it as an environment variable on your server.
.env
USAGEGATE_KEY=gk_live_...

Keys start with gk_live_. The SDK reads it from your code (new GateClient(process.env.USAGEGATE_KEY!)); the HTTP API takes it as Authorization: Bearer <key>.

Rotate or revoke

Create a new key, update your environment variable, deploy, then revoke the old key in API keys. A revoked key stops working immediately: every check says no and logs a [usagegate] error.