Protect your AI providers
inside iOS apps.

Start for free1,000 requests a month free. No credit card.orSelf-host
  • Secure your AI providers keys
  • Usage, cost, and limits per user
  • Add another app in minutes

Secure your app with App AI Gateway.

Never put provider API keys in your iOS app.Anyone can extract them.

Keep them in App AI Gateway.Encrypted, and never shown again.

Only from your real app

Apple App Attest proves the request came from a genuine install.

Only signed-in users

Verified with your identity provider.

  • Firebase
  • Supabase
  • Auth0
  • Clerk
  • Apple
  • Custom

Only active subscribers

Free users never reach the paid model.

  • RevenueCat
  • Custom claim

Control AI usage.

Control your budget

Set a monthly budget per user and per app.

Rate limits

Set request limits per user, per minute and per day.

Stop abuse

Block users who abuse AI usage with one click.

Performance

Hosted on Cloudflare

Scales automatically, worldwide.

  • Cloudflare Workers

Streaming support

Replies stream to the device token by token.

Observability

Cost per AI provider

See what you spend on each provider, day by day.

Cost per model

Cost, tokens and requests for every model.

Cost per user

Cost and requests for every user.

Easy to use

A Swift client included

Configure it once. It handles App Attest, the token exchange, and refresh, and returns a normal URLRequest.

Gateway.swiftSwift
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"
)

Requests stay the same

Same paths, same bodies, same responses as the provider. Only the host changes, and the Swift client adds the authorization.

Provider request
# 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.

Flexibility

Change models without a release

Switch the model in the console. The app you shipped keeps working, no App Store review.

Provider and model fallbacks

If a provider is down, the request goes to the next model on your list.

Custom endpoints

Give a feature a name, like summarize. Pick its provider, model and settings in the console.

Supported providers and gateways

  • OpenAI
  • Anthropic
  • Google Gemini
  • xAI (Grok)
  • Perplexity
  • DeepSeek
  • Moonshot (Kimi)
  • Groq
  • Mistral
  • Together AI
  • Fireworks AI
  • Cerebras
  • Hugging Face
  • Baseten
  • BytePlus ModelArk
  • OpenRouter
  • Cloudflare AI Gateway
  • Vercel AI Gateway
  • Any OpenAI-compatible API

All your apps in one 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.

ServerAppAIGateway

How your provider keys are stored

Encrypted provider keyKMSin a separate Cloudflare account

Encrypted and stored in a protected KMS

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.

Open source

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

Pricing

Free

$0per month

1,000 requests / month

  • No card, no expiry
Get started

Starter

$10per month

10,000 requests / month

  • Every gateway feature included
  • Unlimited apps and end users
  • Human support
Get started

Scale

$149per month

1,000,000 requests / month

  • Every gateway feature included
  • Unlimited apps and end users
  • Human support
Get started

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 →

Questions worth asking first.

Can I use it for free?

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.

What am I paying for?

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.

What counts against a hosted plan's monthly allowance?

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.

What happens when the free allowance runs out?

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.

Can I move between hosted and self-hosted later?

Yes. It is the same code either way, so you can take your configuration to your own Cloudflare account, or the other way round.

How is this different from calling the provider directly from the app?

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.

Where do the provider keys live?

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.

Do I have to use a specific model SDK?

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.

How does it know who a user is?

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.

Can I use it from a server rather than an iOS app?

Yes. A server app authenticates with an API key and can pass a user id, so per-user limits and usage attribution still work.

Protect your AI provider keys.

Try the hosted service, or self-host it in your own Cloudflare account.

Start for free1,000 requests a month free. No credit card.orSelf-host