A team API key budgeting platform. Owners deposit master API credentials, set monthly credit allocations for team members, and members provision their own budget-limited sub-keys however they see fit.
Owners store master API keys (e.g., an OpenRouter key) in an encrypted vault, invite team members, and assign each member a monthly credit budget.
Members spend their allocated credits by provisioning sub-keys — scoped, time-limited API keys with hard spending caps. A member with a $100/month budget might allocate $20 to OpenRouter and $30 to cloud storage, keeping the rest for later.
Every key provisioned and every credit allocation is recorded in a full audit trail.
- Next.js 15 (App Router) with server components and server actions
- StackAuth for authentication, teams, and role-based permissions (
owner/user) - Postgres via the
postgreslibrary (raw SQL, no ORM) - AES-256-GCM encryption for master keys at rest
- ServiceAdapter pattern for pluggable provider integrations
| Route | Role | Description |
|---|---|---|
/my-keys |
All | View provisioned sub-keys; owners also manage master keys here |
/store |
Member | Provision new budget-limited sub-keys |
/vault |
Owner | Manage master API credentials |
/members |
Owner | View team members and allocate monthly budgets |
/audit |
Owner | Full transaction and provisioning log |
/dashboard |
All | Overview with stats and recent activity |
| Service | Status |
|---|---|
| OpenRouter | ✅ Live |
| AWS S3 | 🔜 Planned |
| RunPod | 🔜 Planned |
New providers are added by implementing the ServiceAdapter interface in src/lib/services/.
cp .env.example .env.local
# Fill in DATABASE_URL, ENCRYPTION_KEY, and StackAuth credentials
npm install
npm run devInitialize the database with schema.sql:
psql $DATABASE_URL < schema.sqlThree tables:
master_keys— Encrypted root credentials stored by owners, scoped to an orgapi_keys— Provisioned sub-keys with budget caps, usage tracking, and expirytransactions— Audit log of all credit allocations and key purchases
Roles are managed via StackAuth team permissions:
owner— Can store master keys, invite members, allocate budgets, view audit logsuser— Can provision sub-keys within their allocated budget