Only from your real app
Apple App Attest proves the request came from a genuine install.
Never put provider API keys in your iOS app.Anyone can extract them.
Keep them in App AI Gateway.Encrypted, and never shown again.
Apple App Attest proves the request came from a genuine install.
Verified with your identity provider.
Free users never reach the paid model.
Set a monthly budget per user and per app.
Set request limits per user, per minute and per day.
Block users who abuse AI usage with one click.
Scales automatically, worldwide.
Replies stream to the device token by token.
See what you spend on each provider, day by day.
Cost, tokens and requests for every model.
Cost and requests for every user.
Configure it once. It handles App Attest, the token exchange, and refresh, and returns a normal URLRequest.
let gateway = AppAIGatewayClient(
appID: "my-app",
baseURL: URL(string: "https://console.appaigateway.com")!,
issuerTokenProvider: { _ in try await session.idToken() }
)
let request = try await gateway.authorizedRequest(
provider: "openai",
providerPath: "v1/responses"
)Same paths, same bodies, same responses as the provider. Only the host changes, and the Swift client adds the authorization.
# Before
POST https://api.openai.com/v1/responses
# After
POST https://console.appaigateway.com/v1/apps/my-app/proxy/openai/v1/responses
# Same path, same body, same response.Switch the model in the console. The app you shipped keeps working, no App Store review.
If a provider is down, the request goes to the next model on your list.
Give a feature a name, like summarize. Pick its provider, model and settings in the console.
We also support server applications. Add one with an API key and it gets the same features: usage and cost, rate limits, budgets, and blocking.
When you add a provider key, it is encrypted and stored in a KMS in a separate Cloudflare account. No CI pipeline and no agent has access to that account, so the stored provider keys cannot be read out.
All the code is on GitHub under Apache 2.0, so it can be audited. Nothing about how keys are handled is hidden.
Audit the source$10per month
10,000 requests / month
$39per month
100,000 requests / month
$149per month
1,000,000 requests / month
You bring your own provider API keys and pay the providers directly. We do not sell or resell AI model access, tokens, or credits.
You can also self-host it. The same code, Apache 2.0, in your own Cloudflare account. You pay Cloudflare and your providers, nothing to us. Deploy to Cloudflare →
Yes, two ways. The hosted service has a free plan with 1,000 requests a month, no card and no expiry. Or you can self-host it: the code is open source under the Apache 2.0 license, and you pay only Cloudflare and your model providers.
On the hosted service, a flat monthly price for a request allowance. It covers the gateway itself: key storage, authentication, limits and usage. It is never a markup on tokens, because the provider keys and the provider bills are yours. Self-hosted, there is nothing to pay us. You pay Cloudflare for the Worker, database and Durable Objects, plus your model providers.
Only requests actually sent to a provider. Anything the gateway refuses on its own, such as a blocked user, an exhausted per-user limit or a disallowed model, costs nothing. The console warns once 80% of the allowance is used, and an exhausted allowance answers 429 with the exact time the next monthly allowance begins.
Requests get a 429 with the reset time until your next monthly allowance begins. Nothing else changes: your apps, keys and settings stay as they are. Upgrade to a paid plan whenever you want more.
Yes. It is the same code either way, so you can take your configuration to your own Cloudflare account, or the other way round.
A key inside an iOS app can be extracted. The gateway keeps the key on the server and only issues short-lived tokens to installs that pass Apple App Attest, so there is nothing durable to steal.
Encrypted, in a KMS in a separate Cloudflare account that no CI pipeline or agent can reach. A key is never shown again after you add it. Self-hosted, the encryption key is one you generate and keep.
No. Requests and responses keep the provider's own format, and streaming is passed straight through. You change the host, and the Swift client adds the authorization.
Through your identity provider: Firebase, Supabase, Auth0, Clerk, Sign in with Apple, or any custom issuer. The gateway verifies the token, and any claims you require, before it proxies anything.
Yes. A server app authenticates with an API key and can pass a user id, so per-user limits and usage attribution still work.
Try the hosted service, or self-host it in your own Cloudflare account.