Android setup
Follow Get Started to install and build. All features are off by default: the library compiles only the options you turn on. It follows your app's minSdkVersion (Expo's floor is 24); the llm and speech options raise it to 26.
Build options
Enable only what your app uses. For example, to add every image operation:
{
"expo": {
"plugins": [["expo-ai-kit", { "vision": true }]]
}
}Or only face detection, which leaves the other ML Kit clients and models out of the build:
{
"expo": {
"plugins": [["expo-ai-kit", { "vision": ["face-detection"] }]]
}
}| Option | What it adds |
|---|---|
llm | Text generation and downloadable models: the ML Kit Prompt API client and the LiteRT-LM runtime (about 21 MB of arm64 code); minSdkVersion 26 |
speech | Speech recognition and microphone permission, including for file transcription |
vision | true for every image operation, or an array of background-removal, image-labeling, text-recognition, face-detection; each adds only its client and bundled model; no permissions |
androidEmbeddings | EmbeddingGemma runtime; model downloaded separately |
Every option change requires a new native build. An OTA update cannot add native modules or models bundled with the app.
Bare React Native
Without Expo prebuild, set the relevant properties directly in android/gradle.properties:
# Enable text generation:
expoAiKit.llm=true
# Enable every image operation:
expoAiKit.vision=true
# Or only some (comma-separated feature names):
expoAiKit.vision=face-detection,text-recognitionThe other properties are expoAiKit.speech and expoAiKit.androidEmbeddings. Speech also needs android.permission.RECORD_AUDIO in your manifest. The llm and speech options need minSdkVersion 26. iOS reads expoAiKit.llm from ios/Podfile.properties.json; see the config reference.
Model preparation
Await prepareBuiltInModel() for built-in text. Vision background removal and OCR need prepareVision() and Google Play services. Image labels and face detection work immediately after the native build.
See speech, vision, embeddings, and downloadable models for their lifecycles. For device restrictions and errors, see platform support and troubleshooting.