Get Started

From zero to protected in under 3 minutes. Add real-time budget enforcement to your AI API.

Quickstart

3 min
1

Install

Add the SDK to your project

2

Configure

Add your API key from the dashboard

3

Protect

Wrap your API routes

app.use(holdify());
middleware.ts
import { withHoldify } from '@holdify/nextjs';

export default withHoldify();

export const config = {
  matcher: '/api/:path*',
};

You're protected!

Requests exceeding budget will receive a 402 Payment Required response.

What is Holdify?

Holdify is the revenue firewall for AI-first companies. We provide real-time budget enforcement that blocks requests the moment a customer exceeds their limit—not after.

Verify — Check API keys and return remaining quota
Enforce — Block requests when budget hits zero
Track — Real-time usage analytics per customer
Sync — Automatic webhook sync with Polar