w/01 · ai infrastructure · hypery.ai

Hypery

the identity and payments layer for ai products.

what

identity, ai gateway & billing for ai apps

codebase

158k lines · 665 commits

platform

web · react sdk · rest

stack

next.js 16 · mongodb · stripe · webgpu

move to bend the light

overview

Every AI product ends up rebuilding the same foundation before it can ship the interesting part: sign-in, access to models, metering, spending limits, a way to get paid. Hypery is that foundation as one product.

Developers drop in a React SDK for auth and checkout, point any OpenAI client at the Hypery gateway, and charge per use — with limits enforced before a single provider is called.

200+

models behind one endpoint

5

sign-in methods + oauth provider

100%

openai sdk compatible

the homepage backdrop is a live WebGPU shader that follows the cursor

the challenge

AI apps fail in boring ways: a stream dies halfway and nobody knows whether to charge; a webhook goes missing and credits get granted twice; a retry double-bills a customer.

Hypery had to make identity and money feel instant and trustworthy — and make the brand feel like the frontier it serves, not another dashboard.

01 · authentication

sign-in for ai apps, done properly.

Email and password, magic links, passkeys, TOTP two-factor, enterprise SSO and social sign-in with Google, GitHub and Apple — built on better-auth.

Hypery is also a full OAuth 2.0 provider: authorization code with PKCE (S256 only), scopes, a consent screen and co-branded sign-in, so apps can offer “Sign in with Hypery”.

  • →drop-in <SignIn/>, <UserButton/>, <AuthModal/>
  • →scoped api keys & team invitations
  • →popup flows that close themselves when another tab finishes
Hypery authentication page

02 · ai gateway

one endpoint, every model.

OpenAI-compatible /api/v1 routes for chat, embeddings, images, speech, transcription, realtime sessions and predictions — routed across OpenRouter, Replicate, Hugging Face and the Vercel AI Gateway.

Streams reconnect when a first byte stalls (with grace for reasoning models), and an abort sends a clean SSE error frame instead of a hung socket.

  • →function calling, vision & prompt caching
  • →model catalog synced hourly
  • →works with LangChain, Continue.dev and the Vercel AI SDK

03 · billing

money that can't double-count.

Pay-as-you-go by default — usage is metered straight to Stripe — or a credit ledger with atomic reserve and finalize, auto top-up, grants and per-app spending caps checked before the provider is ever called.

Developers can sell their own subscription plans to their users, with Stripe Connect handling payouts and a platform fee.

  • →idempotency keys claimed atomically per team
  • →credits granted once per payment intent
  • →reconciliation crons for missed webhooks & stale reservations
Hypery billing page

04 · models

switch models with one string.

Chat and image models from OpenRouter, Replicate and Hugging Face behind the same endpoint: change the model name, keep your code. Every page of the site gets its own variation of the shader — streaks, aurora, beams, waves, warp and more.

05 · pricing

$0 a month. pay for what you use.

No commitment and no seat tax: pricing is usage, with spending limits per app and per team so a runaway loop can never become a runaway bill.

Hypery pricing page

architecture

a modular monolith with very careful money.

One Next.js 16 app serves the marketing site, docs, dashboard, OAuth server and the gateway API — deployed on Vercel with crons doing the reconciliation work a queue would.

  1. 01

    sdk

    @hyperyai/sdk — React components + hooks, PKCE popup, SSE parsing

  2. 02

    oauth & auth

    better-auth, passkeys, SSO, consent, co-branded sign-in

  3. 03

    gateway

    OpenAI-compatible API → provider routing → streaming with reconnects

  4. 04

    metering

    reserve → call → finalize, rollback on failure, idempotent retries

  5. 05

    stripe

    meters, top-ups, subscriptions, Connect payouts, webhook backstops

  6. 06

    data

    MongoDB (native driver), Redis rate limits, S3 media, 11 Vercel crons

the developer experience

point any openai client at it.

adapted from the Hypery quickstart — the gateway speaks the OpenAI API, so existing code just works.

quickstart.ts
1import OpenAI from 'openai'
2
3const client = new OpenAI({
4 apiKey: process.env.GATEWAY_API_KEY,
5 baseURL: 'https://hypery.ai/api/v1',
6})
7
8const res = await client.chat.completions.create({
9 model: 'anthropic/claude-sonnet-4.5',
10 messages: [{ role: 'user', content: 'hello, hypery' }],
11 stream: true,
12})

brand & design system

A dark-first, navy-tinted system built in oklch, with a brand spectrum that runs from cyan through violet to warm orange — the colors of the icon, animated by the WebGPU backdrop.

accent

#00b6d1

blue

#3672e9

violet

#9c5eef

warm

#fda856

deep

#0c2352

night

#07101c

Space Groteskdisplay headlines
Instrument Sansinterface
JetBrains Monocode
  • ·10 hand-written WGSL backdrop styles, one shared GPU device, per-route styles
  • ·credits are always shown as credits — never converted to dollars
  • ·a CI ratchet blocks raw palette colors outside the token set

by the numbers

665

commits

158k

lines of typescript

209

api routes

58

docs pages

6

example apps

10

shader styles

counted from the source repositories

Hypery homepage
Hypery AI gateway page
The Hypery SDK auth modal
Hypery models page
Hypery docs
Hypery on mobile

what we did

development

  • gateway & streaming
  • billing ledger and Stripe integration
  • OAuth provider
  • React SDK

design

  • dashboard & patterns library
  • docs
  • SDK components

brand

  • identity & icon spectrum
  • WebGPU backdrop system
  • marketing site

ai

  • provider routing
  • model catalog sync
  • metering for streamed tokens

next world

PopCraftthe design app that pops. →

© 2026 knoe.one