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

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
J
Java Code Geeks
V
V2EX
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
博客园 - Franky
爱范儿
爱范儿
T
Tailwind CSS Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
博客园_首页
B
Blog RSS Feed
博客园 - 司徒正美
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
Wattfare — Connect your AI budget
bstrama · 2026-06-16 · via Hacker News: 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.