惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
WordPress大学
WordPress大学
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
C
Check Point Blog
P
Proofpoint News Feed
H
Help Net Security
月光博客
月光博客
博客园_首页
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理
U
Unit 42
美团技术团队
I
InfoQ
A
About on SuperTechFans

Show HN

Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code.
Wattfare — Connect your AI budget
bstrama · 2026-06-16 · via Show HN

OAuth for AI spend · Developer preview

Your users bring
their own
AI budget.

Wattfare drops a “Connect AI budget” button into your app. Users connect, set a spending cap, and you call any model through one SDK — charged to them, not you. You stop eating the inference bill.

OpenAI-compatible Works with the Vercel AI SDK ~5-min integration

Think “Sign in with Google”, but for AI spend. One button connects a user's inference budget to your app — metered, capped, and revocable. You never store a key. They never overspend.

The problem

AI costs are the one line item you can't predict.

Every AI app makes the same uncomfortable bet: price high enough to survive your power users, ration usage so nobody hurts you, or quietly lose money on the heavy ones. Tokens scale with usage — your subscription price doesn't.

Today You pay for their tokens

  • You eat unpredictable inference costs every month.
  • Your price = margin + a budget you guessed each user would burn.
  • Power users wreck your unit economics; free tiers bleed.
  • Side projects need a credit card you're scared to attach.

With Wattfare They bring their own budget

  • Inference is funded by the user, within a cap they set.
  • You charge for the product — your margin, nothing padded.
  • Power users fund themselves. Free tiers cost you nothing.
  • Ship anything. The worst case is their budget, not your bill.

Napkin math illustrative — drag the slider

Monthly active users 1,000 Usage profile

Your inference bill, today $750/mo

With Wattfare $0/mo

Users fund their own usage inside caps they set. Your COGS stops scaling with their curiosity.

How it works

Three steps. Your app code barely changes.

A claim like that needs receipts — so here's the whole integration, as the diff you'd ship.

feat: let users bring their own AI budget +9 −1

1Drop in the button frontend · +4

@@ main.tsx @@+ <WattfareProvider publishableKey="pk_live_…" session={getToken}>    <App />+ </WattfareProvider>@@ chat.tsx @@  const ai = useChat();+ const { connect, connected } = useWattfare();+ if (!connected) return <button onClick={connect}>Connect AI budget</button>;

2Mint sessions server · +4

+ const wf = new Wattfare({ secretKey: process.env.WATTFARE_SECRET_KEY });+ app.post("/api/ai-session", (c) =>+   c.json(wf.createSession(c.var.userId, { requestLimit: { monthlyUsd: 10 } }))+ );

3Swap the model chat route · +1 −1

  const result = streamText({-   model: openai("gpt-4o"),                                    // billed to: you+   model: wf.user(userId).model("anthropic/claude-sonnet-4"),  // billed to: them    prompt,  });  // the deleted line is the one where you were paying.

01 Publishable key in the browser. The secret key stays on your server and mints short-lived session tokens.

02 Consent happens on Wattfare's domain — a popup, a cap, ~30s. State lives with us, keyed by your existing user ids.

03 The returned model is AI-SDK-compatible. Stream like you already do — every token metered against their cap.

Two sides, one button

Good for the people who build it. Better for the people who use it.

Every mechanism in the middle is read from both ends. Same line, two balance sheets.

Inference is funded by the person using it. Your AI line item drops toward zero, and margins stop fighting compute.

the budget

One budget covers every connected app — no more paying five different markups for the same tokens.

Your worst case is their cap, never your card. The front page of HN stops being a financial event.

the cap

You pick a monthly number. It's enforced upstream — requests stop at your cap, not at an honor system.

No provider keys to collect, encrypt, rotate, or leak. Connection state lives on Wattfare, keyed by your user ids.

the key

You never paste a raw API key into a stranger's app. Consent happens on Wattfare's domain, like OAuth.

Disconnects surface as typed errors — the not-connected path is a normal flow state, not a 3am page.

the switch

Revoke any app in one click. The spending stops immediately, for that app only.

One SDK, hundreds of models, AI-SDK native. Same code in dev and prod — test keys auto-approve.

the models

Your prompts proxy straight through to the model. Wattfare meters cost; it isn't where conversations live.

Freemium that costs you nothing — give the whole product away and let usage fund itself.

the free tier

Try new AI apps in 30 seconds without a new account, card, or subscription each time.

Enterprise spend controls — per-seat budgets, finance-grade reporting — are on the roadmap.

OpenAI-compatible

Standard wire format, proxied to OpenRouter. No protocol to learn.

AI SDK native

Drop-in model for the Vercel AI SDK — stream as usual.

Real from day one

Connect your own budget on localhost — same consent flow your users see.

Edge-fast

Cloudflare Workers, streamed untouched, typed errors — no buffering.

FAQ

The honest answers.

Isn't this just BYOK with extra steps?

BYOK makes the user paste a raw provider key into your app. Wattfare is an OAuth-style consent flow: the user owns the budget, sets a cap, and can revoke it — and your app never sees or stores a key. Usage is metered for them.

How is this different from OpenRouter's OAuth or “Sign in with ChatGPT”?

Same conviction — users should fund their own inference — different layer. Provider sign-ins tie your app to one vendor's accounts and hand you a per-user key to store, scope, and babysit. Wattfare keeps all state on its side, keyed by the user ids you already have, and adds the parts apps actually need: monthly caps, usage status, one-click revocation, and an AI-SDK-ready model(). Inference currently routes through OpenRouter under the hood; the connection layer is provider-neutral by design.

Which models can I use?

It's an OpenAI-compatible proxy to OpenRouter, so hundreds of models across providers — Anthropic, OpenAI, Google, open-weights — all behind one AI-SDK-compatible model() call.

Do you see my prompts?

Inference is proxied through to read the final usage so we can meter cost — Wattfare isn't a place your conversations are meant to live. As an early preview, treat it accordingly; full data terms land before general availability.

How is the spending cap enforced?

The user picks a monthly cap. Wattfare meters usage against it, and the underlying provider key carries a hard ceiling as the real backstop — so requests stop at the cap, even mid-stream.

What does it cost?

Wattfare is in developer preview and free to build on while we shape it. Pricing for the hosted service will be simple and announced well before it kicks in.

What's the stack?

Cloudflare Workers + Hono on the edge, KV for connection state and soft metering. The SDK is a tiny TypeScript package with server, client, and react entry points.

Developer preview · free to start

Add a “Connect AI budget” button today.

Install the SDK, wrap your app, and let your users fund their own AI. Five minutes to your first capped, metered request.