Documentation · Overview
Developer documentation
Secure AI access. Cost controls.
Connect your mobile app to AI providers without embedding API keys. Gate/AI handles device authentication, request signing, and token refresh through the SDK that fits your app.
Choose your SDK
Five integrations, with native device security on iOS and Android.
Native apps
-
Available
iOS
Swift
Add the Swift package to your native Apple app.
iOS 16+
Read guide
-
Available
Android
Kotlin
Integrate the Kotlin SDK with your Android app.
Android API 24+
Read guide
Cross-platform apps
-
Available
React Native
TypeScript / JavaScript
Use native device security from your React Native app.
iOS + Android
Read guide
-
Available
Capacitor
TypeScript / JavaScript
Connect your Capacitor app through a native plugin.
iOS + Android
Read guide
-
Available
Flutter
Dart
Make authenticated requests from your Flutter app.
iOS + Android
Read guide
React Native, Capacitor, and Flutter support native iOS and Android builds. Browser, PWA, and desktop targets are not supported.
The same protection in every SDK
The framework SDKs call the native Swift and Kotlin implementations. Device keys and attestation stay in the platform's security APIs.
-
01
Verify the app
App Attest on iOS or Play Integrity on Android verifies your app during authentication.
-
02
Authorize the device
Gate/AI issues a short-lived access token bound to the device's signing key.
-
03
Make your request
The SDK signs each proxy request with DPoP, refreshes tokens, and retries nonce challenges.
Prepare your native app
Every SDK needs the same platform registration. Create a gate in the portal, add your provider credentials there, and register the app identifiers you ship.
iOS · App Attest
- Target iOS 16 or later and use Xcode 16 or later.
- Register your bundle identifier and Apple Team ID in Gate/AI.
- Enable App Attest for the app and configure its entitlement.
-
On the simulator, set
GATE_AI_DEV_TOKENin Xcode’s Edit Scheme (⌘⇧,) → Run → Arguments → Environment Variables. Physical devices use App Attest. Step-by-step simulator token setup →
Android · Play Integrity
- Target Android API 24 or later.
- Register your package name and signing certificate SHA-256 in Gate/AI.
- Link Play Integrity to a Google Cloud project and provide its project number.
- For Android emulator testing, use a development token. Set GATE_AI_DEV_TOKEN in the build environment or an ignored local properties file, add the Gradle configuration below, then rebuild and reinstall the debug app. The SDK reads the token automatically. Android development token setup →
After your first request
Understand your usage →
Attribute requests and costs to users, plans, and app features.
Set usage limits →
Configure gate limits, per-device budgets, and plan tiers.