The Ask I Didn’t Want to Make
I realized pretty fast that the only way to keep the real power users happy was to let them bring their own key. It’s not the most elegant answer, and I know it. Asking a non-technical writer to go generate an API key on some other website and paste it into mine is a genuinely big ask. But I don’t have investors, and if I want to keep my costs survivable, some things have to give. So for the people who live in this app, I built the BYOK flow.
How It Works
Alongside the free platform credits every new writer gets, there’s now a setting where you can plug in your own Gemini, Claude, or OpenAI API key. Once it’s saved, your requests skip the shared pool entirely and go straight to your provider, billed to you directly at whatever rate they charge. That means:
- No daily cap — generate as much as your provider allows.
- No waiting for tomorrow — you’re never throttled back to a shared quota.
- No competing with everyone else’s usage on a given day.
What Happens to Your Key
The part I was most careful about is what happens to that key once you hand it over. Here’s the whole lifecycle:
- Encrypted before it ever touches the database. A fresh random value scrambles it every single time, so the same key saved twice looks completely different in storage.
- Decrypted only in the moment. It’s unlocked for the few seconds it takes to make one AI call on your behalf, and nowhere else.
- Scoped to a single request. There’s a small trick under the hood: the decrypted key lives inside that one request only, scoped so tightly it can’t leak into someone else’s request running on the same server at the same moment.
- Wiped instantly. The moment the call finishes — whether it succeeded or failed — it’s gone.
I wanted to be able to say, honestly, that even I can’t casually go look up your key sitting in a database somewhere.
The Selfish Reason
The other reason I built this, and I’ll admit this one is more selfish, is that it’s basically free for me. A bring-your-own-key request costs me a tiny Firestore read and a one-line audit log entry, nothing else. Every dollar of actual model inference is on you and your provider, not on my credit balance. Which means the users who lean on TheTaleTribe the hardest — the ones generating chapter after chapter and chatting with the AI constantly, the exact people I’d otherwise be most nervous about — get turned into the cheapest users on the platform instead of the most expensive ones.
When Incentives Line Up
It’s a genuinely rare case where what’s good for the user and what’s good for the platform point in exactly the same direction. You get a key that never runs dry and a model you actually chose. I get to sleep better knowing my heaviest users aren’t the ones driving my bill.