> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runanywhere.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> RunAnywhere Flutter SDK for iOS and Android

The RunAnywhere Flutter SDK runs language, speech, and vision models on the device. Prompts,
audio, and images stay on the phone, and everything keeps working offline.

```dart theme={"theme":"css-variables"}
import 'package:runanywhere/runanywhere.dart';

await RunAnywhere.initialize(apiKey: '', baseUrl: '');

final result = await RunAnywhere.llm.generate('Name three colours');
print(result.text);
```

## Requirements

| Item | Minimum |
| - | - |
| Dart SDK | `>=3.12.0 <4.0.0` |
| iOS | 17.5 |
| Android | API 24, arm64 |

Run on a physical device. The Android emulator has no arm64 native libraries for these
backends, and Apple MLX only executes on physical iOS hardware.

## Packages

| Package | Published version | Role |
| - | - | - |
| `runanywhere` | 0.20.27 | Core SDK, FFI bridge, model registry, event bus. Required. |
| `runanywhere_llamacpp` | 0.20.27 | LLM and VLM on GGUF via llama.cpp |
| `runanywhere_onnx` | 0.20.27 | STT, TTS, VAD, embeddings via ONNX and Sherpa |
| `runanywhere_mlx` | 0.20.27 | Apple MLX, physical iOS devices |
| `runanywhere_qhexrt` | 0.20.19 | Qualcomm Hexagon NPU, Android only |

> [!NOTE]
>
> `runanywhere_qhexrt` publishes at **0.20.19** on pub.dev. Four of the five move together; QHexRT
> does not.

## The namespaces

Every capability is a static getter on `RunAnywhere`.

| Namespace | Type | What it does |
| - | - | - |
| `llm` | `LlmApi` | Text generation, streaming, tools, structured output |
| `vlm` | `VlmApi` | Image plus prompt |
| `stt` | `SttApi` | Speech to text |
| `tts` | `TtsApi` | Text to speech |
| `vad` | `VadApi` | Voice activity detection |
| `voice` | `VoiceApi` | A full spoken conversation |
| `rag` | `RagApi` | Retrieval over your own documents |
| `models` | `ModelsApi` | Registry, download, load, unload |
| `embeddings` | `EmbeddingsApi` | Text vectors |
| `rerank` | `RerankApi` | Reorder results against a query |
| `lora` | `LoraApi` | Adapters on the loaded base model |
| `images` | `ImagesApi` | Image generation |
| `diarization` | `DiarizationApi` | Who spoke when |
| `segmentation` | `SegmentationApi` | Labelled regions in an image |
| `cua` | `RunAnywhereCUA` | Computer-use prompt and parse scaffold |
| `solutions` | `RunAnywhereSolutions` | YAML-defined pipelines |
| `hybrid` | `RunAnywhereHybrid` | Local and cloud routing |

`hybrid` exists only on Flutter.

Streaming is `Stream<T>`; everything else returns a `Future`.

## Differences worth knowing up front

Dart has no method overloading, so Flutter's surface diverges from the other SDKs in ways that
break copied code:

* Four generation methods, not two: `generate`, `generateChat`, `generateStream`,
  `generateChatStream`.
* `generateStructured` takes the schema as a **`String`**, not an object.
* `ingestAll(documents)` for a list, where the others overload `ingest`.
* `RunAnywhere.deviceId` **throws** before `initialize()`.
* No `AudioInput.file` and no `ImageInput.rawRgba`.

## Where to go next

> [card] [Installation](https://docs.runanywhere.ai/flutter/installation.md)
>
> pubspec and platform setup

> [card] [Quick Start](https://docs.runanywhere.ai/flutter/quick-start.md)
>
> A working chat

> [card] [Text generation](https://docs.runanywhere.ai/flutter/llm/generate.md)
>
> Prompts and options

> [card] [Voice agent](https://docs.runanywhere.ai/flutter/voice-agent.md)
>
> Speech in, speech out


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.