# Nosmai documentation — full corpus This file is the complete Nosmai documentation in a single response, intended for LLM-based agents that want one-shot ingestion of the entire knowledge base. Each section is one documentation page in raw Markdown, prefixed with its group and a Source URL pointing at the canonical page on https://nosmai-website-staging.pages.dev. A curated index is at https://nosmai-website-staging.pages.dev/llms.txt . The canonical HTML index is at https://nosmai-website-staging.pages.dev/docs/introduction . --- # Introduction > Nosmai is the AR & AI platform for mobile apps. One SDK, one key: real-time camera effects, on-device moderation, and a unified API for every LLM. Group: Get started Source: https://nosmai-website-staging.pages.dev/docs/introduction ## What is Nosmai? Nosmai turns months of computer-vision, GPU and ML infrastructure into a few API calls. You install one SDK, authenticate with a single key, and reach every Nosmai product from the same client, running in real time, on-device, across every platform. The platform is made of two products today, with more on the roadmap: - **Nosmai Effects**: real-time 2D & 3D filters, beauty and AR for cameras and live streams. - **Nosmai Moderation**: on-device moderation for images, video and text, with tunable thresholds. > [!NOTE] > New here? The fastest path is the [Quickstart](/docs/quickstart): install the SDK and make your first call in under five minutes. ## How it works Effects and Moderation run entirely on the device GPU. Frames never leave the phone, and no secrets ship inside your app binary. Every product shares one account, one API key, and a consistent call shape across iOS, Android, Web, React Native and Flutter. ## Supported platforms | Platform | Package | Min version | | --- | --- | --- | | iOS · Swift | `NosmaiSDK` | iOS 14+ | | Android · Kotlin | `ai.nosmai:sdk` | API 24+ | | Web · JS/TS | `@nosmai/web` | Evergreen | | React Native | `@nosmai/react-native` | RN 0.71+ | | Flutter | `nosmai` | Flutter 3+ | --- # Moderation · Flutter > Use Nosmai Moderation in a Flutter app — image, video, text and live-camera moderation. Group: Moderation Source: https://nosmai-website-staging.pages.dev/docs/moderation-flutter ## Install Add the plugin to `pubspec.yaml`, then `flutter pub get`. ```yaml title="pubspec.yaml" dependencies: nosmai_moderation_sdk: ^1.0.0 ``` **Android — bundle the native AAR in your host app.** Download `nosmai-detection.aar` from the [Android releases](https://github.com/nosmai/moderation-sdk-android/releases), put it in `android/app/libs/`, and reference it: ```kotlin title="android/app/build.gradle.kts" android { defaultConfig { minSdk = 24 ndk { abiFilters += "arm64-v8a" } } } dependencies { implementation(files("libs/nosmai-detection.aar")) } ``` **iOS** needs no extra step — `pod install` pulls the native SDK with the plugin. **Requirements:** Flutter 3+, Android `minSdk 24` (arm64-v8a), iOS 14+. For live camera add the camera permission to `AndroidManifest.xml` / `NSCameraUsageDescription` in `Info.plist` (the example uses `permission_handler`). For iOS App Store uploads also set `ITSAppUsesNonExemptEncryption` = `NO` in `Info.plist` (the SDK only encrypts its own bundled models — export-compliance exempt). > Distribute Android as an App Bundle (AAB) — the SDK ships `arm64-v8a` only, so Play hides it from 32-bit-only devices, and it won't run on x86_64 emulators. ## Initialize Call once at startup with your license key. It runs natively on a background thread. ```dart title="main.dart" import 'package:nosmai_moderation_sdk/nosmai_moderation_sdk.dart'; final res = await NosmaiModeration.initialize('NOSMAI-XXXX'); if (!res.success) { debugPrint('Nosmai init failed: ${res.error}'); } ``` ## Moderate an image Pass a file path (e.g. from `image_picker`). Returns a `NosmaiResult`. ```dart final r = await NosmaiModeration.analyzeImage(file.path); if (r.isUnsafe) { // r.detections -> [{category, confidence}], r.nsfw -> safe/warn/block for (final d in r.detections) { print('${d?.category?.name} ${(d!.confidence! * 100).round()}%'); } } ``` ## Moderate a video Samples one frame every `frameIntervalMs` and aggregates. ```dart final v = await NosmaiModeration.analyzeVideo(file.path, 500); if (v.isUnsafe) { print('categories: ${v.categories}, frames: ${v.framesAnalyzed}'); } ``` ## Moderate text Call `initialize` first (it validates the license), then load the text model once (it is larger), then moderate messages. ```dart await NosmaiModeration.initializeText(); // after initialize() final t = await NosmaiModeration.moderateText('some message'); if (t.blocked) { // t.layer (blocklist/classifier), t.category, t.matchedWord print('blocked: ${t.category?.name}'); } ``` ## Live camera The camera, frame capture and detection all run natively; only the per-frame `NosmaiResult` crosses to Dart. ```dart title="live_screen.dart" import 'package:permission_handler/permission_handler.dart'; // 1. show the native preview const NosmaiCameraPreview(); // 2. start + listen, after granting camera permission await Permission.camera.request(); final sub = NosmaiLive.results().listen( (r) => setState(() => _verdict = r.isUnsafe ? 'UNSAFE' : 'SAFE'), onError: (e) => debugPrint('camera failed to start: $e'), // permission / no camera ); await NosmaiLive.start(facing: NosmaiCameraFacing.back); // .front also supported; falls // back to the other if unavailable // 3. on leave — always stop, the camera does not stop itself on widget dispose await NosmaiLive.stop(); sub.cancel(); ``` ## Thresholds Adjust any object class or NSFW bar at runtime (lower is stricter). ```dart NosmaiModeration.setThreshold(NosmaiCategory.weapon, 0.7); NosmaiModeration.setNsfwThreshold(NosmaiNsfwClass.explicit, 0.45); // BLOCK NosmaiModeration.setNsfwThreshold(NosmaiNsfwClass.sexy, 0.55); // WARN ``` ## Cleanup ```dart NosmaiModeration.shutdown(); ``` > [!NOTE] > `analyzeImage`, `analyzeVideo`, `moderateText` and `initialize` are async — they run native inference off the platform thread, so the UI never blocks. --- # Moderation · Android > Use Nosmai Moderation in a native Android (Kotlin) app — image, video, text and live-camera moderation. Group: Moderation Source: https://nosmai-website-staging.pages.dev/docs/moderation-android ## Install 1. Download the latest `nosmai-detection.aar` from the [releases page](https://github.com/nosmai/moderation-sdk-android/releases). 2. Put it in your app module's `libs/` folder (e.g. `app/libs/nosmai-detection.aar`). 3. Reference it in Gradle (below). The SDK is self-contained — everything runs on-device and all models are bundled, so there are no extra dependencies to add. ```kotlin title="app/build.gradle.kts" android { defaultConfig { minSdk = 24 ndk { abiFilters += "arm64-v8a" } // the SDK ships arm64-v8a } } dependencies { implementation(files("libs/nosmai-detection.aar")) // CameraX — only needed for the live-camera path val camerax = "1.4.2" implementation("androidx.camera:camera-core:$camerax") implementation("androidx.camera:camera-camera2:$camerax") implementation("androidx.camera:camera-lifecycle:$camerax") implementation("androidx.camera:camera-view:$camerax") } ``` **Permissions** (`AndroidManifest.xml`): `INTERNET` (license check) and `CAMERA` (live only). ## Initialize `init` is blocking (network + model load) — call it off the main thread. Returns `false` if the license is invalid/expired. ```kotlin title="App startup" import com.nosmai.detection.NosmaiSDK Executors.newSingleThreadExecutor().execute { val ok = NosmaiSDK.init(context, "NOSMAI-XXXX") } ``` ## Moderate an image ```kotlin val bitmap = BitmapFactory.decodeFile(path) val r = NosmaiSDK.analyzeImage(bitmap) // NosmaiResult if (r.isUnsafe) { r.detections.forEach { Log.d("Mod", "${it.category} ${it.confidence}") } // r.nsfw -> SAFE / WARN / BLOCK } ``` ## Moderate a video ```kotlin NosmaiSDK.analyzeVideo( context, uri, frameIntervalMs = 500L, onProgress = { p -> /* 0..1 */ }, onComplete = { v -> /* v.isUnsafe, v.categories, v.flags */ }, ) ``` ## Moderate text Call `init` first — it validates the license; `initText` needs that before it can load the (encrypted) text model. ```kotlin NosmaiSDK.initText(context) // after init(), off the main thread val t = NosmaiSDK.moderateText("some message") // NosmaiTextResult if (t.blocked) Log.d("Mod", "${t.category} via ${t.layer} (${t.matchedWord})") ``` ## Live camera (CameraX) Feed CameraX frames to `pushFrame`; results arrive on the main thread via `NosmaiListener`. ```kotlin NosmaiSDK.startStream(object : NosmaiListener { override fun onResult(r: NosmaiResult) { /* every frame */ } override fun onUnsafe(r: NosmaiResult) { /* turned unsafe */ } override fun onSafe() { /* recovered */ } }) val analysis = ImageAnalysis.Builder() .setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST) .setOutputImageRotationEnabled(true) .build() .also { it.setAnalyzer(executor) { proxy -> NosmaiSDK.pushFrame(proxy) } } cameraProvider.bindToLifecycle(owner, CameraSelector.DEFAULT_BACK_CAMERA, preview, analysis) // on leave NosmaiSDK.stopStream() ``` ## Thresholds & performance ```kotlin NosmaiSDK.setThreshold(NosmaiCategory.WEAPON, 0.7f) NosmaiSDK.setNsfwThreshold(NosmaiNsfwClass.EXPLICIT, 0.45f) // BLOCK NosmaiSDK.setNsfwThreshold(NosmaiNsfwClass.SEXY, 0.55f) // WARN // Live-only: how often the (heavier) object detector runs. NSFW always runs // every frame. HIGH = snappiest, LOW = battery saver. NosmaiSDK.setPerformanceMode(NosmaiPerformanceMode.HIGH) ``` ## Cleanup ```kotlin NosmaiSDK.shutdown() ``` > [!NOTE] > All `NosmaiListener` callbacks are delivered on the main thread, so you can update UI directly. --- # Quickstart > Install the SDK, add your key, and render your first result. This guide uses Web; the same three steps apply on every platform. Group: Get started Source: https://nosmai-website-staging.pages.dev/docs/quickstart ## 1. Install Add the Nosmai SDK to your project with your package manager of choice. ```bash title="terminal · bash" npm install @nosmai/web ``` ## 2. Get your API key Create an app in the [dashboard](https://nosmai-customer-staging.pages.dev/login) and copy its key. Use a `nsk_test_…` key while developing and a `nsk_live_…` key in production. > [!WARNING] > **Never ship secret keys in your app binary.** The mobile SDKs authenticate with an app ID; secret keys stay on the Nosmai edge. See [Authentication](/docs/authentication) for details. ## 3. Initialize the client Create one client and reuse it across your app. ```js title="app.js" import { Nosmai } from "@nosmai/web" const nosmai = new Nosmai("nsk_live_...") ``` ## 4. Make your first call Pick the product you enabled and call it. Each returns in real time. ```js title="first-call.js" // Effects: apply a filter to a camera stream const cam = await nosmai.camera() cam.use("aurora-glow").attach(videoEl).start() // Moderation: check user content on-device const r = await nosmai.moderate("is this text safe?") ``` > [!TIP] > That's it, you're live. Next, dive into the product guide for [Effects](/docs/effects) or [Moderation](/docs/moderation). --- # Authentication > How Nosmai keys work, and why your secret keys never need to ship inside a mobile app. Group: Get started Source: https://nosmai-website-staging.pages.dev/docs/authentication ## Key types | Prefix | Use | Environment | | --- | --- | --- | | `nsk_test_` | Development & testing | Watermarked / sandbox | | `nsk_live_` | Production traffic | Billed, full quota | ## Web & server On the web or a server you control, pass the key directly when constructing the client. Store it in an environment variable, never commit it to source control. ```js title="server.js" const nosmai = new Nosmai(process.env.NOSMAI_KEY) ``` ## Mobile (recommended) Mobile binaries can be decompiled, so the iOS and Android SDKs authenticate with a public **app ID** instead of a secret. The SDK exchanges it for a short-lived token, and your secret provider keys stay on the Nosmai edge proxy. ```swift title="AppDelegate.swift" import NosmaiSDK Nosmai.configure(appId: "app_8f3a...") ``` > [!NOTE] > Manage keys, rotate them, and set per-key environments under **API keys** in the [dashboard](https://nosmai-customer-staging.pages.dev/login). ## Rotating keys Create a new key, deploy it, then revoke the old one. There is no downtime, and both work during the overlap. Revoked keys stop authenticating immediately. --- # Moderation · iOS > Use Nosmai Moderation in a native iOS (Swift) app — image, video, text and live-camera moderation. Group: Moderation Source: https://nosmai-website-staging.pages.dev/docs/moderation-ios ## Install Install via CocoaPods — add the pod to your `Podfile` and run `pod install`. The SDK and its bundled models come with the pod; everything runs on-device with no external dependencies. ```ruby title="Podfile" pod 'NosmaiModerationSDK', '~> 1.0' ``` **Requirements:** iOS 14+, arm64. In `Info.plist` add: - `NSCameraUsageDescription` — required for the live-camera path. - `ITSAppUsesNonExemptEncryption` = `NO` — the SDK only encrypts its own bundled models locally (export-compliance exempt). Without it, every TestFlight/App Store upload stalls on the encryption question. ## Initialize `initialize` is blocking (network + model load) — call it off the main thread. Returns `false` if the license is invalid/expired. ```swift title="App startup" import NosmaiDetection DispatchQueue.global(qos: .userInitiated).async { let ok = NosmaiSDK.initialize(licenseKey: "NOSMAI-XXXX") } ``` ## Moderate an image ```swift if let r = NosmaiSDK.analyzeImage(uiImage) { // NosmaiResult? if r.isUnsafe { // r.detections -> [NosmaiObjectDetection], r.nsfw -> .safe/.warn/.block } } ``` ## Moderate a video ```swift NosmaiSDK.analyze(videoURL: url, frameIntervalMs: 500, progress: { p in /* 0...1 */ }, completion: { result in /* result.isUnsafe, .categories, .flags */ }) ``` ## Moderate text Call `initialize` first — it validates the license; `initializeText` needs that before it can load the (encrypted) text model. ```swift try? NosmaiSDK.initializeText() // after initialize(), off the main thread if let t = NosmaiSDK.moderateText("some message") { if t.blocked { /* t.layer, t.category, t.matchedWord */ } } ``` ## Live camera (AVCaptureSession) Feed pixel buffers from your `AVCaptureVideoDataOutput` to `pushFrame`; results arrive via the `NosmaiListener`. ```swift NosmaiSDK.startStream(listener: self) // self: NosmaiListener // in captureOutput(_:didOutput:from:) if let pb = CMSampleBufferGetImageBuffer(sampleBuffer) { NosmaiSDK.pushFrame(pb, rotationDegrees: 90) // 90 makes a back-camera portrait buffer upright } // on leave NosmaiSDK.stopStream() ``` Show the preview with an `AVCaptureVideoPreviewLayer` backed by the same `AVCaptureSession`. ## Thresholds ```swift NosmaiSDK.setThreshold(.weapon, value: 0.70) NosmaiSDK.setNsfwThreshold(.explicit, value: 0.45) // BLOCK NosmaiSDK.setNsfwThreshold(.sexy, value: 0.55) // WARN ``` ## Cleanup ```swift NosmaiSDK.shutdown() ``` > [!NOTE] > `analyzeImage` and `moderateText` are synchronous (and fast) but still do inference — call them off the main thread. `analyzeVideo` is async with a completion handler. --- # Nosmai Effects > Real-time 2D & 3D filters, beauty and AR for cameras and live streams, rendered on the device GPU. Group: Products Source: https://nosmai-website-staging.pages.dev/docs/effects ## Overview Effects attaches to a camera or video source and applies a filter graph in real time. Filters are referenced by name and can be hot-swapped without re-initializing the session. ## Apply a filter ```swift title="Camera.swift" let session = nosmai.camera() session.load(filter: "aurora-glow") session.attach(to: previewView) session.start() ``` ## Filter categories - **2D filters & LUTs**: color grades, overlays, animated stickers. - **3D AR effects**: 468-point face mesh, world tracking, lit 3D assets. - **Beauty & retouch**: skin smoothing, reshape, relight. - **Segmentation**: background replace, blur or removal without a green screen. ## Performance Effects targets 60fps on mid-range devices with sub-8ms per-frame latency. Filters update live, so you can change looks without dropping a frame. > [!NOTE] > Browse the full catalog and preview every effect on the [Effects product page](/effects). --- # Nosmai Moderation > On-device moderation for images, video, text and the live camera. Tunable thresholds, no cloud round-trip. Group: Products Source: https://nosmai-website-staging.pages.dev/docs/moderation ## Overview Moderation runs entirely on the device — frames and messages never leave the phone. One license key unlocks four surfaces: | Surface | What it does | Call | | --- | --- | --- | | **Image** | Moderate a single photo | `analyzeImage` | | **Video** | Sample + aggregate a recorded clip | `analyzeVideo` | | **Text** | Moderate a chat message / comment | `moderateText` | | **Live camera** | Real-time per-frame moderation | `startStream` + `pushFrame` | ## What it detects **Visual — objects** (`NosmaiCategory`): `weapon`, `drug`, `cigarette`, `alcohol`. Each frame returns the best confidence per class; a class is *flagged* when it meets its threshold. **Visual — NSFW** (`NosmaiNsfwVerdict`): a whole-image verdict — - `safe` — clean. - `warn` — suggestive / swimwear (advisory; does **not** flag the frame on its own). - `block` — explicit (makes the frame unsafe). **Text** (`NosmaiTextCategory`): `profanity`, `toxic`, `hate`, `harassment`, `threat` (plus `safe`). A two-layer pipeline — a keyword **blocklist** then an AI **classifier**. ## Result shape Every image / live result is a `NosmaiResult`: | Field | Type | Description | | --- | --- | --- | | `isUnsafe` | bool | True if any object is flagged **or** NSFW is `block` | | `detections` | list | Flagged objects — `{ category, confidence }` | | `nsfw` | enum | `safe` · `warn` · `block` | | `nsfwScores` | object | `safe`, `sexy`, `explicit` (0–1) | | `rawScores` | object | Best object score per class (debug / tuning) | `moderateText` returns a `NosmaiTextResult` — `{ blocked, layer, category, score, matchedWord }`. `analyzeVideo` returns a `NosmaiVideoResult` — `{ isUnsafe, categories, flags[], framesAnalyzed, nsfw }`. ## Tunable thresholds Every object class and NSFW bar is adjustable at runtime — lower is stricter. Defaults are tuned for a balance of recall and false positives. ```text setThreshold(weapon, 0.70) // object class bar setNsfwThreshold(explicit, 0.45) // NSFW BLOCK bar setNsfwThreshold(sexy, 0.55) // NSFW WARN bar ``` > [!TIP] > Because moderation runs on-device, there is **no per-call cloud bill** and content never leaves the user — solving latency and compliance at once. ## Platform guides Pick your platform for install + full usage (image, video, text, live): - [Moderation · Flutter](/docs/moderation-flutter) - [Moderation · Android](/docs/moderation-android) - [Moderation · iOS](/docs/moderation-ios) ## On-device & licensing The license key is verified online on first launch (so the **first launch needs connectivity**), then cached for 24h with a further 24h offline grace — after that the app runs offline within the grace window. All inference is hardware-accelerated on-device — see your platform guide for requirements. --- # iOS (Swift) > Install and configure the Nosmai SDK in a native iOS app. Group: Platform SDKs Source: https://nosmai-website-staging.pages.dev/docs/ios ## Install Install via CocoaPods — add the pod to your `Podfile` and run `pod install`. The SDK and its bundled models come with the pod; everything runs on-device with no external dependencies. ```ruby title="Podfile" pod 'NosmaiModerationSDK', '~> 1.0' ``` ## Configure Initialize once with your license key, off the main thread — it verifies the key online (cached 24h, +24h offline grace) and loads the models. ```swift title="App startup" import NosmaiDetection DispatchQueue.global(qos: .userInitiated).async { let ok = NosmaiSDK.initialize(licenseKey: "NOSMAI-XXXX") } ``` ## Requirements - iOS 14.0 or later, `arm64` - `NSCameraUsageDescription` in Info.plist for live moderation - `ITSAppUsesNonExemptEncryption` = `NO` in Info.plist — the SDK only encrypts its own bundled models locally (export-compliance exempt); without it App Store uploads stall on the encryption question > [!NOTE] > Next: [Moderation · iOS](/docs/moderation-ios) — image, video, text and live usage. --- # Android (Kotlin) > Install and configure the Nosmai SDK in a native Android app. Group: Platform SDKs Source: https://nosmai-website-staging.pages.dev/docs/android ## Install The SDK ships as a self-contained AAR — everything runs on-device and all models are bundled, so there are no extra dependencies to add. 1. Download the latest `nosmai-detection.aar` from the [releases page](https://github.com/nosmai/moderation-sdk-android/releases). 2. Put it in your app module's `libs/` folder (e.g. `app/libs/nosmai-detection.aar`). 3. Reference it in Gradle: ```kotlin title="app/build.gradle.kts" android { defaultConfig { minSdk = 24 ndk { abiFilters += "arm64-v8a" } } } dependencies { implementation(files("libs/nosmai-detection.aar")) } ``` ## Configure Initialize once with your license key, off the main thread — it verifies the key online (cached 24h, +24h offline grace) and loads the models. ```kotlin title="App startup" import com.nosmai.detection.NosmaiSDK Executors.newSingleThreadExecutor().execute { val ok = NosmaiSDK.init(context, "NOSMAI-XXXX") } ``` ## Requirements - Android API 24 (7.0) or later, `arm64-v8a` - `INTERNET` permission (license check); `CAMERA` for live moderation - CameraX, only for the live-camera path - Distribute as an **App Bundle (AAB)** — the SDK ships `arm64-v8a` only, so Play hides it from 32-bit-only devices, and it won't run on x86_64 emulators > [!NOTE] > Next: [Moderation · Android](/docs/moderation-android) — image, video, text and live usage. --- # Web (JS / TS) > Use Nosmai in a browser or Node environment. Group: Platform SDKs Source: https://nosmai-website-staging.pages.dev/docs/web ## Install ```bash title="terminal · bash" npm install @nosmai/web ``` ## Import ```ts title="app.ts" import { Nosmai } from "@nosmai/web" const nosmai = new Nosmai("nsk_live_...") ``` > [!NOTE] > TypeScript types ship with the package, no extra `@types` install needed. --- # Errors > Error shape and the codes you may encounter. Group: Reference Source: https://nosmai-website-staging.pages.dev/docs/errors ## Error object All SDK errors share a consistent shape with a stable `code`, a human `message`, and the originating `product`. ## Common codes | Code | Meaning | Fix | | --- | --- | --- | | `auth_invalid_key` | Key missing or revoked | Check the key in the dashboard | | `rate_limited` | Too many requests | Back off and retry; see Rate limits | | `unsupported_input` | Bad media format | Convert to a supported format | --- # Flutter > Install and configure the Nosmai SDK in a Flutter app. Group: Platform SDKs Source: https://nosmai-website-staging.pages.dev/docs/flutter ## Install Add the plugin to `pubspec.yaml`, then `flutter pub get`. It wraps the native iOS + Android SDKs — the camera, frames and inference stay native; only results cross to Dart. ```yaml title="pubspec.yaml" dependencies: nosmai_moderation_sdk: ^1.0.0 ``` **Android — add the native library to your host app.** The Android SDK ships as an AAR your app bundles directly: 1. Download `nosmai-detection.aar` from the [Android releases](https://github.com/nosmai/moderation-sdk-android/releases). 2. Put it in `android/app/libs/nosmai-detection.aar`. 3. In `android/app/build.gradle.kts`: ```kotlin title="android/app/build.gradle.kts" android { defaultConfig { minSdk = 24 ndk { abiFilters += "arm64-v8a" } } } dependencies { implementation(files("libs/nosmai-detection.aar")) } ``` **iOS** needs no extra step — `pod install` pulls the native SDK with the plugin. ## Configure Initialize once with your license key. It runs natively on a background thread. ```dart title="main.dart" import 'package:nosmai_moderation_sdk/nosmai_moderation_sdk.dart'; final res = await NosmaiModeration.initialize('NOSMAI-XXXX'); if (!res.success) debugPrint('Nosmai init failed: ${res.error}'); ``` ## Requirements - Flutter 3 or later - Android `minSdk 24` (`arm64-v8a`); iOS 14+ (`arm64`) - Camera permission in `AndroidManifest.xml` / `NSCameraUsageDescription` in `Info.plist` for live moderation - iOS App Store: set `ITSAppUsesNonExemptEncryption` = `NO` in `Info.plist` (the SDK only encrypts its own bundled models — export-compliance exempt) - Distribute Android as an **App Bundle (AAB)** — the SDK ships `arm64-v8a` only (won't run on x86_64 emulators) > [!NOTE] > Next: [Moderation · Flutter](/docs/moderation-flutter) — image, video, text and live usage. --- # Rate limits > Default limits per plan and how to handle them. Group: Reference Source: https://nosmai-website-staging.pages.dev/docs/rate-limits ## Defaults | Plan | Requests / min | Monthly included | | --- | --- | --- | | Developer | 60 | 10,000 | | Growth | 600 | Metered | | Scale | Custom | Custom | ## Handling 429s When you exceed a limit, calls return `rate_limited`. Retry with exponential backoff; the SDK includes a `retryAfter` hint in seconds. > [!TIP] > On-device products (Effects, Moderation) are **not** rate-limited, limits apply to dashboard APIs.