Initialization is two-phase. Phase 1 is the synchronous initialize() call and is all local
inference needs. Phase 2 handles authentication, device registration, and telemetry, and runs
in the background; completeServicesInitialization() awaits it when you need to be sure it
finished.
Reading state
Property
Type
Meaning
isReady
Bool
Local inference is usable
version
String
SDK version
environment
SDKEnvironment?
Configured environment
deviceId
String
Stable per-install identifier
isAuthenticated
Bool
Control-plane credentials are valid
if RunAnywhere.isReady { let result = try await RunAnywhere.llm.generate(prompt: prompt)}
isInitialized, areServicesReady, and isActive are deprecated. Use isReady.
Capabilities
let capabilities = RunAnywhere.capabilities()
Reports the modalities, backends, and audio formats this build can actually run, plus an
unavailable list explaining anything missing. It is generated from live probes, not from
namespace presence, so a namespace existing does not imply the engine behind it is linked.
Models
// What is availablelet models = try await RunAnywhere.models.list()let model = await RunAnywhere.models.get(id: "qwen3-0.6b")// Get one onto the devicefor try await event in try await RunAnywhere.models.download(id: "qwen3-0.6b") { if case .progress(let p) = event { progress = p.fraction ?? 0 }}// Load and unloadlet loaded = try await RunAnywhere.models.load(id: "qwen3-0.6b")try await RunAnywhere.models.unload(id: "qwen3-0.6b")try await RunAnywhere.models.unloadAll(category: .language)// Housekeepingtry await RunAnywhere.models.delete(id: "qwen3-0.6b")let state = await RunAnywhere.models.state()await RunAnywhere.models.refresh(rescanLocal: true)
isResumable(id:) reports whether an interrupted download can continue.You rarely need load directly. Generation auto-loads what it needs and downloads when
options.model names a model that is absent.
Ordered backend preference, each optionally required
accelerator
Accelerator policy
contextLength
Context window to allocate
threads
CPU threads
forceReload
Reload even if already resident
framework
Pin to one backend
useGpu
Request GPU execution
Registering your own model
let info = try await RunAnywhere.models.register(registration)
For models outside the catalog there are three shapes: a single file by URL, an archive with
a declared structure, and a multi-file model described by file descriptors.