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:
Gauge checks the key on every request, so revoking or expiring it takes effect on the next call. Check a key’s access and expiry with gauge auth status. The Agents API also accepts the token from a gauge CLI sign-in. See CLI authentication.

Other places to use a key

  • Gauge CLI: set GAUGE_API_TOKEN to run gauge commands in CI without signing in. See Gauge CLI.
  • Gauge MCP: send the key as a bearer token to https://app.withgauge.com/mcp to work with evals and runs from an AI client. See Gauge MCP.

Use the Agents API

Make your first requests: list runs, launch an eval, and configure measurements.