Add AI to Your App Without AI Costs: The User-Pays Model (2026)
How to add AI features to your app with zero AI costs and zero billing development: HeFu Open Platform's OAuth user-pays model explained, with a three-step integration guide.
HeFu · Published 2026-10-096 min read
Core conclusion: As of October 2026, you can ship AI features in your app with zero AI costs and zero billing development by connecting to HeFu Open Platform over OAuth. Your users authorize with their own HeFu accounts and pay for their own model usage; you integrate the capability and never receive an AI invoice. It is the same access model proven by OpenRouter's OAuth PKCE flow and OpenAI's "Sign in with ChatGPT" (opened to third-party apps in September 2026) — and HeFu brings it to a multi-model gateway with a three-tier model pool.
Why "Just Add an LLM API" Usually Breaks Your Budget
Most apps fail to ship AI not because the models are weak, but because of who pays the invoice. Four traps dominate:
- You prepay for your users' usage. Every new user increases *your* API bill, so growth becomes a cost center before it becomes revenue.
- Billing development eats the roadmap. Metering tokens per user, invoicing, dunning, and abuse control is a billing product you never planned to build.
- BYOK filters out normal users. Asking each user to create a vendor account, deposit money, and paste an API key loses almost everyone who is not a developer.
- Oversized models. A flagship model answering simple prompts is like renting a truck to move a chair — you need tiers, and someone has to manage them.
The result: indie developers and small teams either eat unpredictable costs or quietly ship worse AI than they intended.
The User-Pays Shift: Users Bring Their Own Balance, Not Their Own Key
The user-pays model keeps the one good property of BYOK — the app developer pays nothing for model usage — and removes the bad one, the key-pasting friction. Instead of a key, the user authorizes your app once over OAuth, the way they would "Sign in with Google":
- For your app: one OAuth integration, one OpenAI-compatible endpoint, no metering, no invoicing, no AI cost line item.
- For your users: one click to authorize, transparent billing terms stated on the authorization page, per-app usage details in their console, and one-click revoke at any time.
- For the industry: this is the direction the two biggest names already validated — OpenRouter ships OAuth PKCE access for third-party apps, and OpenAI opened "Sign in with ChatGPT" in September 2026. HeFu Open Platform applies the same model to a multi-model catalog.
How Integration Works: Three Steps
The full walkthrough lives on the HeFu Open Platform page — the short version:
- Register your app as described on the Open Platform page to get your client credentials.
- Add the OAuth flow. Redirect users to HeFu's authorization page; after they approve, your app receives access tokens for the API. Desktop apps are supported too — loopback (localhost) redirect callbacks work out of the box, so an installed client needs no hosted backend.
- Call the API with the user's token at
https://api.hefu.hk/v1. It is OpenAI-compatible, so existing SDK code works after changing the base URL — the same pattern in our guide on switching from the OpenAI SDK to a multi-model gateway. Each call is billed to the *authorizing user's* balance, not yours.
That is the entire billing system. There is no step four.
Comparison: Prepaid by Developer, BYOK, and HeFu Open Platform
| Model | Who pays for usage | Billing dev work | User friction | Abuse risk for you |
|---|---|---|---|---|
| Developer-prepaid API | You | High (metering + invoicing) | None | High — runaway users run up your bill |
| BYOK | User | Low | Very high — most users never complete it | Low |
| HeFu Open Platform (user-pays OAuth) | User, with transparent consent | None | One-click authorization | Low — spend is capped by the user's own balance |
Who This Fits Best
- Indie developers and small teams who want AI features without a pricing page of their own.
- AI wrapper and tool apps — writing assistants, translators, summarizers, niche copilots — where per-user AI cost would otherwise destroy unit economics.
- Desktop applications, thanks to loopback callback support: an Electron or native app can offer "Connect AI" with no server component at all.
All access through the platform is covered by end-to-end content moderation, and the platform's terms of service include a dedicated third-party app access clause — the authorization page states the billing terms to users explicitly, so consent is informed rather than buried.
Realistic Expectations
User-pays removes your AI invoice, not all cost or all work. You still build the product experience, and users with empty balances will hit a top-up prompt — so design the moment when your app asks them to connect. HeFu softens that moment: new accounts receive a $0.5 trial credit (limited to the first 100 new sign-ups each month), which is usually enough for a user to feel your AI feature working before they pay anything.
For the architecture patterns behind multi-model routing once your app grows, see our guide on building an AI app with multiple LLM providers.
Get started: read the flow, the three-step code, and the model tiers on the HeFu Open Platform page — or create an account and register your first app today.
FAQ
How can I add AI to my app without paying for my users' AI usage?
Use HeFu Open Platform's OAuth access: your app connects to HeFu, users authorize with their own HeFu account, and each user's model consumption is billed to that user's own balance. You integrate the AI capability; you never see an AI invoice.
What is the difference between the user-pays model and BYOK?
With BYOK (bring your own key), every user must obtain and configure an API key from a model vendor themselves — a high-friction step most non-technical users never complete. With HeFu's user-pays OAuth, users authorize in one click, no key handling, and you still pay nothing for their usage.
Does this work for desktop apps without a backend server?
Yes. HeFu Open Platform supports loopback (localhost) redirect callbacks, so installed desktop clients can complete the OAuth flow locally without hosting a web backend.
Can users see and control what my app spends?
Yes. The authorization page states the billing terms explicitly, and users can view per-app usage details in their HeFu console and revoke access with one click at any time.
Which models can my app access through HeFu Open Platform?
Your app gets a three-tier model pool — compact, mid-tier, and flagship — covering the GPT, Claude, Gemini, DeepSeek, Qwen, Kimi and other families in the HeFu catalog, all through one OpenAI-compatible endpoint. The current catalog is on the models page.
FAQ
How can I add AI to my app without paying for my users' AI usage?
Use HeFu Open Platform's OAuth access: your app connects to HeFu, users authorize with their own HeFu account, and each user's model consumption is billed to that user's own balance. You integrate the AI capability; you never see an AI invoice.
What is the difference between the user-pays model and BYOK?
With BYOK (bring your own key), every user must obtain and configure an API key from a model vendor themselves — a high-friction step most non-technical users never complete. With HeFu's user-pays OAuth, users authorize in one click, no key handling, and you still pay nothing for their usage.
Does this work for desktop apps without a backend server?
Yes. HeFu Open Platform supports loopback (localhost) redirect callbacks, so installed desktop clients can complete the OAuth flow locally without hosting a web backend.
Can users see and control what my app spends?
Yes. The authorization page states the billing terms explicitly, and users can view per-app usage details in their HeFu console and revoke access with one click at any time.
Which models can my app access through HeFu Open Platform?
Your app gets a three-tier model pool — compact, mid-tier, and flagship — covering the GPT, Claude, Gemini, DeepSeek, Qwen, Kimi and other families in the HeFu catalog, all through one OpenAI-compatible endpoint. The current catalog is on the [models page](https://www.hefu.hk/models).