AI & Tech

Keep your API keys off the phone: AI features, done safely

If your API key is inside your app, someone can take it. Here’s the simple setup that keeps it on a server instead.

Samuel AuduSamuel Audu

21 Oct 2026·2 min read

AI & Tech

Adding an AI feature to your app feels like it should be one line: paste your key, call the model, done. That works on your laptop. It’s a problem the moment real people install your app.

Why the key can’t live in the app

Anything shipped inside an app can be pulled out of it. If your key is there, anyone determined enough can copy it and run up a bill on your account.

Put a small server in the middle

The app talks to your own server function. The server holds the key and talks to the AI provider. In Kujua Focus that server is a Supabase Edge Function.

textPhone app  →  your server function (holds the key)  →  AI provider
  1. The key is stored as a secret on the server, never in your code
  2. The app only ever sees the AI’s answer
  3. You can add limits on the server so one user can’t burn your budget

Add one AI ability at a time

Start with one thing: a voice, a reply or a summary. Get it working and saved. Then add context, then memory. Each step stays small enough to test.

#Security#Supabase#API keys
Samuel Audu

Written by

Samuel Audu

I build real products with AI and teach the process in a live class. More about me

Live class · Starts 13 November

Build your own app with AI in 2 weeks.

A live class for total beginners. No coding experience needed. Starts 13 November. Only 30 seats.

See the class →

Keep reading

All posts →