Launching today

App AI Gateway
Backend for AI features in iOS apps, so you don't build one
1 follower
Backend for AI features in iOS apps, so you don't build one
1 follower
Add AI features to your iOS app without exposing your AI provider API keys and without building a custom backend for each iOS app. Verify that requests to your AI provider come from your real iOS app installation. Set budgets and rate limits per user and per app. Use hosted cloud version of App AI Gateway or self-host open source version for free.









Hi Product Hunt!
While building iOS apps that use AI, I was worried about exposing AI provider keys in the app, where they could be stolen. I also didn't want to build a separate backend every time I wanted to try a new iOS app idea. And I wanted AI usage to be predictable, so one app or one user couldn't use up all my AI provider credits.
I built a gateway for myself, and now I'm sharing it with everyone: as a hosted cloud version and as a free open-source self-hosted version. It forwards requests unchanged, so any provider works through it with a one-line host change.
What App AI Gateway does
Encrypts AI provider keys before storing them in the built-in vault or a separate KMS for stronger security.
Checks requests before they reach your AI provider:
Uses Apple App Attest to verify that requests come from real iOS app installation.
Checks that the user is signed in (optional).
Checks that the user has an active subscription (optional).
Lets you set rate limits and budgets per user and per app to help keep your AI provider credits from running out.
Lets you block users who use too much.
Tracks usage and errors.
Can be self-hosted even on Cloudflare's free plan.
Lets you add multiple apps in under a minute.
Also supports server apps using API keys, so you can monitor all your apps in one place.
Try it in two CLI commands
Specially for this launch I've built a marvelously simple onboarding: with the CLI and anonymous accounts, you can give it a try in literally two commands.
1. Add a provider. An anonymous account is created automatically, and your provider key is stored in a separate KMS:
2. Add an application. For an easy test, add a server app:
That's it. Once the app is created you get a curl example to run a test request through the gateway. Since the request body is passed through unchanged, you can put GPT-6 Astra (which we are honoring today) or any other OpenAI model in it.
To get full access to your account in the UI, claim the anonymous account:
This opens the browser and lets you create an account that keeps the provider and app you created anonymously from the CLI.
The CLI uses the hosted cloud version by default, with a free account that allows 1000 requests per month.
Self-host
One command deploys the self-hosted version to Cloudflare. You need a Cloudflare account, and the free one is enough:
After this, all following commands use your self-hosted version. Providers and apps created earlier stay in the hosted version, so you would need to create them again.
iOS apps
The example above uses a server app so you can test the gateway without building an iOS app. To see how it works for iOS, create an iOS app and you'll get a minimal code example for integrating the gateway:
Or point your AI agent at the docs and ask it to integrate it for you: https://docs.appaigateway.com/in...
Final word
I've been using this gateway in my own iOS apps for a few months and it works great for me. The CLI onboarding is new and built specially for this launch, so please treat it as beta: there might be rough edges. If you hit any issues, let me know in the comments or open an issue on GitHub https://github.com/maxceem/app-ai-gateway.
Also, you can always just use hosted version via UI appaigateway.com or self-deploy to Cloudflare manually in one click using link from the repo https://github.com/maxceem/app-ai-gateway and then login to your self-hosted version via UI.