Documentation

Everything you need to integrate KeyPass into your app.

Quick start

Get up and running in 5 minutes. KeyPass lets your users bring their own AI keys to your app, with zero-knowledge encryption and per-app budget controls.

  1. Create an account at keypass.dev and register your app to get a client_id and client_secret.
  2. Install the SDKs:
Terminal
npm install @keypass/node-sdk @keypass/link-sdk
  1. Create a Link session from your server, then open KeyPass Link in the browser.
  2. Exchange the public token for an access token, then make AI calls through the proxy.

Node SDK (Server)

The Node SDK handles session creation, token exchange, and proxied AI calls from your server.

TypeScript (Server)
import { KeyPassClient } from '@keypass/node-sdk';

const kp = new KeyPassClient({
  clientId: 'kp_cid_...',
  clientSecret: 'kp_cs_...',
  baseUrl: 'https://keypass-api.omerbese.workers.dev',
});

// 1. Create a link session
const session = await kp.createLinkSession({
  requestedProviders: ['openai', 'anthropic'],
  budgetSuggestionCents: 1000,  // $10/month suggestion
});
// Return session.linkToken to your frontend

// 2. Exchange public token for access token
const { accessToken } = await kp.exchangePublicToken(publicToken);

// 3. Make AI calls through KeyPass
const response = await kp.chatCompletion({
  accessToken,
  provider: 'openai',
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Hello!' }],
});

Chrome extension

The KeyPass Chrome extension provides a key vault popup, auto-detects API keys on provider pages, and can proxy AI requests transparently.

Features

  • Key vault popup — Log in, view, add, and delete API keys from any tab.
  • Auto-detect — Detects API keys on OpenAI, Anthropic, Google, and Groq key pages. One-click save.
  • Proxy intercept — Transparently routes AI API calls through KeyPass so your keys never touch the page.

API reference

The KeyPass API is hosted at https://keypass-api.omerbese.workers.dev. All endpoints return JSON with the shape { success, data?, error? }.

POST/v1/auth/register
POST/v1/auth/login
GET/v1/keys
POST/v1/keys
DELETE/v1/keys/:provider
POST/v1/apps
GET/v1/apps
POST/v1/link/sessions
POST/v1/link/authorize
POST/v1/link/exchange
POST/v1/proxy/chat/completions
POST/v1/proxy/passthrough/:provider/*
GET/v1/connections
DELETE/v1/connections/:id
GET/v1/usage