Guides

Should your AI app let users bring their own API key?

In short: let users bring their own key if your users are developers or heavy users, and use your own keys on a paid plan if your users are casual. With your keys, you carry the AI cost and must price and limit for it. On GPT-5 mini, one chat action costs about $0.0010, so a user doing 1,000 a month needs a plan of at least $3.99 for a 70% AI margin. With their keys, that cost is theirs. Many apps offer both. Try your own numbers in the free pricing planner.

What the two options mean

Managed keys: your backend calls OpenAI, Claude or Gemini with your key. You bill the user and pay the provider. Your margin is the difference.

Bring your own key (BYOK): the user pastes their own provider key. The provider bills them directly. You charge only for the app, or nothing at all.

What managed keys cost you

The AI cost is your cost on every action. Using the same math as How to price an AI app: on GPT-5 mini, one action is about $0.0010. The lowest plan price that keeps a 70% AI margin after a 15% store fee depends on how much a user does:

Actions / monthAI cost on GPT-5 miniLowest price for 70%
100$0.101$0.99
300$0.302$1.99
1,000$1.01$3.99
3,000$3.02$11.99

A light user doing 100 actions needs $0.99. A heavy user costs thirty times more to serve and may pay the same price. That gap is the risk of managed keys, and it is why a plan needs a limit. At $9.99 a month, the limit that keeps the target margin is 2,531 actions. See why unlimited plans lose money on heavy users.

What BYOK costs you

Almost nothing in AI cost. The trade is elsewhere:

How to choose

If your users run large jobs, such as hundreds of documents a day, managed pricing gets hard to keep above a margin, and BYOK or a credits plan is easier. Credits or subscription compares the options.

If you offer both

Only the managed plans carry your AI cost, so give them a monthly AI limit by plan and check it on your backend before each AI call. FiscaLLM's meter.check returns the plan, what is left and when it resets (limits by plan). For a hard stop on one user's spend, add a per-user budget with Block (spending caps). Track the AI calls you pay for with one meter.track call and compare each user's cost with what they paid on the dashboard.

Questions

Is BYOK cheaper for me?

Yes for AI cost: you pay nothing to the model provider for those users, so there is no margin to protect on AI. You still pay for hosting, support and payment fees, and you give up the markup you could earn on usage.

Who is a BYOK app good for?

Developers and power users who already have a provider account, use the app a lot, and want to choose the model. Casual users usually do not have a key and will not create one.

Can I offer both a managed plan and BYOK?

Yes, and many apps do. Sell a managed plan with a monthly allowance to most people, and a cheaper plan or a free tier for users who bring their own key. Only the managed plan carries your AI cost, so only that plan needs a usage limit.

Is it safe to ask users for their API key?

Treat it like a password. Store it encrypted, never log it, never send it to your analytics, and make it easy to delete. If you can, keep the key on the user's device and call the provider from there.