Skip to main content
PymtHouse is the identity and billing layer for AI applications. You bring your users; PymtHouse handles authentication, usage metering, and payment collection so you can focus on your product.

What you can build

Metered AI API

Gate AI job requests by user balance. Charge per inference. Automatically track usage across pipeline and model.

CLI with device login

Let users authenticate your CLI with their browser. No password prompts, no API key management.

Multi-tenant SaaS

Provision users on sign-up, issue scoped JWTs per request, and show per-user billing dashboards.

How it works

Your backend registers as an OAuth client. PymtHouse becomes the OIDC issuer for your app — it authenticates your users, issues signed JWTs, and meters usage through OpenMeter. You never touch user credentials or billing infrastructure directly.
Three things you configure once and reuse everywhere:

Start here

5-minute quickstart

Provision a user, mint a signed JWT, and verify usage tracking with working curl commands.

Integration patterns

Pick your pattern: SaaS app, CLI device flow, or metered billing. Full working examples.

Build

Builder SDK

Official TypeScript SDK. Install in one line, works in Next.js, Node, and Edge.

Machine access

Client credentials and HTTP Basic auth for server-to-server calls.

User management

Provision, update, and deactivate users. Per-user API keys and subscriptions.

User tokens

Issue short-lived signed JWTs scoped to a specific user and capability.

Device flow

Browser-based login for CLIs, terminals, and limited-input devices.

Allowances

Per-user USD balance gates. Read entitlements, grant credits, check access.

Monitor and bill

Usage API

Per-user and per-pipeline usage. OpenMeter-backed, queryable by date range.

Billing summary

Cycle totals, timeline, overage, and USD breakdowns in one API call.

Plans

Pricing tiers with included allowances and overage rates. Synced to OpenMeter.

Stripe Connect

Let users pay you directly. Merchant Connect setup and checkout flows.

When things go wrong

Troubleshooting

400 invalid_scope, 404 on valid credentials, balance gate failures — common errors and how to fix them.

Discover endpoints at runtime

OIDC discovery publishes all endpoint URLs for your deployment. Always resolve from discovery rather than hard-coding paths:
Local development issuer: http://localhost:3001/api/v1/oidc