Your code asks for access. It never holds the key.

Grant gives developers, services and coding agents short-lived, revocable leases instead of API keys. The real key stays in an encrypted vault, and Grant adds it to each request on the way out.

Free to self-host. Node and Python SDKs. Works with Claude Code, Cursor, Codex and any tool that reads environment variables.

.env Lease register
  1. OPENAI_API_KEY
  2. ANTHROPIC_API_KEY
  3. STRIPE_SECRET_KEY
  4. GITHUB_TOKEN
Root keys held in vault: 4 Keys on this machine: 4
Each key is stamped void and replaced by a lease token that expires in minutes.

API keys were built for humans pasting into dashboards. Agents changed that.

Commits written with AI assistants leak secrets at twice the usual rate, and more than 24,000 secrets have been found sitting in MCP config files. Source

Coding agents read .env files on their own, because a plaintext key looks like useful context. Source

Keys live for months, carry full permissions and are shared across services. Rotating one tends to break production, so it rarely happens.

How a request gets through

  1. Add a capability once

    An admin stores the provider key in Grant. It is encrypted with AES-256-GCM and never shown again, not even to the admin.

  2. Ask for access in code

    grant.client("openai") returns the official SDK client. Grant issues a lease for each process and refreshes it before it expires.

  3. Approve what matters

    Mark live payments or production databases as approval-required. The request waits until a person approves a time window, then the lease cannot outlive it.

  4. Revoke in one click

    End one lease, every lease an agent holds, or every lease on a key. Rotate the key without restarting anything that uses it.

One line instead of a key

The SDKs return the clients you already use, pointed at Grant. No wrapper API to learn, and nothing to change when a key rotates.

// npm install @grant/sdk openai
import { grant } from "@grant/sdk";

const openai = grant.client("openai");   // self-refreshing, budget-capped

const reply = await openai.chat.completions.create({
  model: "gpt-4.1",
  messages: [{ role: "user", content: "Hello" }],
});

What you get on day one

Leases, not keys
Every credential is short-lived (15 minutes by default), tied to one identity and revocable at any moment.
A broker on the wire
Callers send a lease; Grant strips it and adds the real key. Works with any HTTP API, with recipes for OpenAI, Anthropic, Stripe and GitHub.
Approvals with a time limit
Sensitive capabilities wait for a person. Repeated requests reuse the same approval, so nobody gets spammed.
Budgets that stop runaway loops
Daily request and token caps per capability, enforced before the call reaches the provider.
Cost by agent and service
Requests, tokens and errors are recorded per identity, so you know which agent spent what.
A health score per key
One number from 0 to 100 with the reason: expiring soon, no owner, idle for 30 days, provider rejecting calls.
Errors an agent can act on
Every denial says what blocked it and what to do next, so an agent can ask for access instead of guessing.
An audit trail without secrets
Who asked for what, when, why and for how long. Never a key value.

Built for the day something goes wrong

Grant holds the keys, so it is designed to limit damage when any one part is compromised.

If this happensWhat Grant does
A prompt injection tells an agent to send its keys somewhereThe agent only has a lease token. It works against Grant, for one provider, for minutes.
A lease token leaks into a log or a commitIt expires on its own, and you can revoke it immediately from the admin panel.
Someone copies the databaseRoot keys are encrypted at rest, and each ciphertext is bound to its row. Tokens are stored only as hashes.
An agent loops and burns through creditsThe daily budget stops it with a clear error before the next request reaches the provider.
A key has to be rotated todayPaste the new key. Running clients pick it up on their next request, with no restart.

On your laptop or shared with your team

Local

Runs on 127.0.0.1 with storage in ~/.grant. Nothing to sign up for and nothing leaves your machine.

Shared

The same server behind your TLS, in your cloud. Point the SDKs at it with one environment variable.

Pricing

Team

Early access

  • Everything in self-hosted
  • Approvals on phone and Slack
  • Permission diff on pull requests
  • SSO and multiple admins
Ask for early access

Enterprise

Contact us

  • Customer-managed encryption keys
  • Data residency in the US, EU or UAE
  • Compliance evidence for SOC 2 and ISO 27001
  • Support agreement
Talk to ValueQue

Team and Enterprise features are on the roadmap and not yet generally available.

Try it in under a minute

  1. Start the server. It prints an admin token on first run.

    npx @grant/server
  2. Open http://127.0.0.1:7878, add your OpenAI key and create an identity.

  3. Use the identity token instead of the key.

    export GRANT_TOKEN=gnt_i_...
    grant run --cap openai -- node app.js

Questions

Does my application ever see the real key?

No, not in the default mode. Your process holds a lease token, and Grant adds the key to the outgoing request. If a capability allows it, grant.key() can return the raw key as an escape hatch. That is off by default and is recorded in the audit log.

What happens if the Grant server is down?

The SDKs keep using a lease that has not expired yet, and only fail once it has. Denials and revocations are never masked by the cache.

Which providers work?

Any HTTP API that authenticates with a header. OpenAI, Anthropic, Stripe and GitHub come preconfigured. For anything else, set the upstream URL and the header format.

How does it work with Claude Code or Cursor?

Start the agent with grant run. Tools that read OPENAI_BASE_URL and ANTHROPIC_BASE_URL work without changes, and the agent never receives your identity token. Add the Grant MCP server and the agent can also list, request and check access on its own. The MCP tools never return a key.

Where is my data stored?

In a SQLite file on the machine running the server: your laptop in local mode, your own infrastructure in shared mode. Keys are encrypted with a master key that you control.

Stop pasting keys.

Run it locally