Skip to main content
API keys authenticate the gavAI CLI, SDK, and any signed-API consumer you build. Each key carries a fixed set of scopes that constrain what it can read or mutate.

Mint a key

  1. Sign in to /console/settings/api-keys as a workspace admin.
  2. Click Mint new key, name it (e.g. ci-pipeline), pick the scopes it needs.
  3. Copy the secret immediately — it is shown exactly once.
Keys are stored hashed; gavAI cannot recover the plaintext. If you lose it, revoke and re-mint.

Scopes

Scopes are namespaced <surface>:<action>. Common ones: Issue the narrowest scope that satisfies the job — admin parity is rarely the right choice for automation.

Signing requests

The CLI / SDK sign requests with HMAC-SHA256 over a canonical string:
Send three headers:

Sample (Node)

Sample (Python)

Verification on the server side

gavAI rejects requests where:
  • The timestamp is more than 5 minutes off the server clock (replay protection).
  • The HMAC computed over the canonical string does not match.
  • The key_id is revoked or the scope does not cover the requested action.
Use a constant-time comparison for the HMAC check.

Rotation

When a key needs rotating:
  1. Mint a new key with the same scopes.
  2. Roll over the key in your secret store / config.
  3. Revoke the old key from /console/settings/api-keys.
Revoked keys reject immediately. There is no grace period — coordinate the rollover before revoking.

Audit trail

Each mint, revoke, and authenticated request is recorded in the tenant audit log (/console/activity). Use this to spot keys that aren’t doing what you expect.