Skip to main content
An API key lets scripts, scheduled jobs, and tools call Gauge without a person signing in. One key works with the Gauge Chat API, the Gauge Agents API, the Gauge MCP, and the gauge CLI. A key acts as its organization, not as the person who created it. It keeps working when that person leaves the organization. For an agency, a key also reaches the agency’s client organizations.

Create a key

Keys for both products are created in Gauge Chat.
1

Open API Keys

In Gauge Chat, go to Settings → Integrations and open API Keys.
2

Name the key

Select Create API key and give it a name that says where it’s used, such as Warehouse sync.
3

Choose access and expiry

Choose Read only or Read & write. Under Expires after, choose Never, 30 days, 90 days, or 1 year.
4

Copy the key

The key is shown once. Copy it and store it somewhere safe, such as a secrets manager. Gauge keeps only a hash of it.
Keys start with gauge_sk_. The API Keys table shows each key’s name, first characters, access, creator, last use, and expiry.

Access levels

A read-only key that attempts a write receives 403 with an insufficient_scope error.

Revoke a key

In API Keys, select the revoke icon next to the key and confirm. Anything using the key stops working on its next request. Expired keys stop working the same way. Records created with a key are attributed to api-key:<prefix>, so you can tell which key made a change.

Send the key

Send the key as a bearer token on every request. GET /me describes the credential in use:
The Chat API also accepts a Gauge CLI login token from gauge auth login. A login token acts as you, with read and write access, and is checked against your current memberships.

Other places to use a key

  • Gauge MCP: send the key as a bearer token to https://app.withgauge.com/mcp. See Gauge MCP.
  • Gauge CLI: set GAUGE_API_TOKEN to run gauge commands without signing in. See Gauge CLI.

Use the Chat API

Make your first requests: list prompts, create prompts, and run a report.