Auth-aware proxy
Accept Firebase or Supabase user tokens directly from your app. Every AI request is tied to a verified user before provider spend starts.
An OpenAI-compatible proxy that verifies your users, enforces entitlements, and keeps provider keys server-side.
import OpenAI from "openai";const client = new OpenAI({ apiKey: MOBILEAIPROXY_APP_KEY, // public app key baseURL: "https://api.mobileaiproxy.com/v1", defaultHeaders: { Authorization: `Bearer ${userToken}` },});const res = await client.chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: prompt }],});Works with the stack you already ship.
Keep your auth stack, provider accounts, and app release flow. Add the controls that prevent client key leaks, entitlement bypasses, runaway usage, and untraceable provider bills.
Accept Firebase or Supabase user tokens directly from your app. Every AI request is tied to a verified user before provider spend starts.
Store OpenAI, Anthropic, OpenRouter, and other provider keys encrypted. The client only gets a public app key.
Set model, endpoint, token, request, and cost limits by app, user, and entitlement category.
Track cost by app, user, feature, model, endpoint, and RevenueCat category with request-level metadata.
Drop in your proxy URL. Your existing OpenAI SDK call works unchanged across web, mobile, and native.
import OpenAI from "openai";const client = new OpenAI({ apiKey: MOBILEAIPROXY_APP_KEY, // public app key, not your provider key baseURL: "https://api.mobileaiproxy.com/v1", defaultHeaders: { Authorization: `Bearer ${userToken}`, // Firebase/Supabase JWT },});const response = await client.chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: prompt }],});Your provider key never leaves the proxy. The client only holds a public app key.