PlanGate
Type to search every docs page
↑ ↓ to move↵ to openesc to close
DocsSign in

How PlanGate works

PlanGate sells access to an AI model on your own provider key, with no server of your own. Below: where the key lives, how budgets work, why a plan can never lose you money, and how the free plan shares a fixed cost.

The key never ships

An app that calls an AI provider directly has to carry the provider key, and anything shipped in an app can be read out of it. PlanGate keeps your key on its side, encrypted. Your app holds only the signed-in user's own token, which works for that user, on that app, within their budget, and nothing else. A leaked user token costs at most that user's budget; a leaked provider key would cost whatever its finder wants.

The same idea keeps a system prompt out of the app: a preset stays on PlanGate and is applied there.

Budgets, not tokens

A plan sells a budget in dollars, not a number of tokens or requests. Every answer is billed at the real price of the model that gave it, so a plan doesn't need to change when you add a model or a provider changes its prices.

Each plan has two budgets over rolling windows. The 7-day budget is what the plan sells; the 5-hour one stops a user from spending a week's budget in one sitting.

Rolling means the window is always the last 5 hours or the last 7 days, never a calendar period: spending comes back bit by bit as it ages out, with no reset at midnight that heavy users could wait for.

PlanGate bills each answer at the most it could cost: long-context tiers, cache writes, reasoning tokens, no off-peak discounts. Before a call, it lowers max_tokens to what the remaining budget can pay, so an answer is cut short rather than going over it.

The margin guarantee

A plan is accepted only if its subscribers can never cost more than they pay.

In a month of 31 days, rolling 7-day windows let one user spend the weekly budget at most 5 times. Polar keeps at most 10% + $0.50 of a payment. So a plan is valid when:

5 × weekly budget ≤ price × 0.9 − $0.50

A $20 plan, for example, nets at least $17.50, which pays a weekly budget of up to $3.50. That is why the panel fills in the largest budgets a price allows and won't let you raise them.

Lowering the price of a plan that has subscribers lowers its budgets with it. Raising it doesn't raise them: the subscribers likely still pay the old price.

Store fees

The stores keep a larger share than Polar: at most 30% for the App Store, 15% for Google Play and the Microsoft Store. The same rule applies with the store's cut, so a store price that pays the plan's weekly budget is usually above the web price. The panel checks each store price against its own store's cut.

The free plan

A free plan has no price, so the margin guarantee can't hold it. Instead you fix two amounts: what it may cost in a month, and the least each user it serves gets in a day. It never costs more than the first.

Each UTC day gets an equal share of what is left of the month: a quiet day leaves more for the next ones. That day's budget is divided into places, one per daily minimum: with $5 left for the day and a $0.10 minimum, 50 users can be served. A user takes a place at their first call of the day, and keeps it until midnight UTC. When every place is taken, the next users are sent to your paid plans until tomorrow.

Beyond their minimum, users draw on what nobody is promised, up to a cap shared by all, computed from the last 7 days of real use: light users get all they want, heavy users share the rest. From 21:00 UTC the minimums and the cap are lifted, and whatever is left of the day goes to whoever uses it.

One user across platforms

PlanGate takes each identity provider's word that an email is verified, and a user who signs in with the same verified email from Google on Android and from Apple on iOS is one user with one plan. But a provider that marks emails verified without checking them would let anyone take over the user who has that email in your app. For the same reason, an email from Google is kept only for a Gmail or Workspace address, whose owner Google knows today, and anonymous users are refused, since anyone could make as many as they like.

Who pays whom

Your subscribers pay you, through your own Polar organization or your store accounts: PlanGate takes no cut of your sales. The AI runs on your provider key, billed to you by your provider. You pay PlanGate a flat monthly price for the service.

❌🕸️