# @capacitor/local-llm

An experimental Capacitor plugin that runs large language models entirely on-device using Apple Intelligence on iOS and Gemini Nano on Android, for text and image generation with no network requests or API keys.

This Capacitor plugin runs on-device language models using each platform's own system framework: Apple's Foundation Models on iOS 26 and newer for text, plus Image Playground for image generation on iOS 18.4 and newer, and Gemini Nano through ML Kit on Android 9 and newer devices that support on-device AI. No network requests are made, no API keys are needed, and no data leaves the device.

A systemAvailability call lets an app check whether the on-device model is ready before sending a prompt, and on Android, where Gemini Nano is distributed through Google Play Services rather than bundled with the app, the same call reports whether the model needs to be downloaded first. It installs with npm and a Capacitor sync, and the project is explicitly labeled experimental with no committed support, requiring physical hardware since emulators are not supported for on-device inference.

Website: https://github.com/ionic-team/capacitor-local-llm
