Foundation Models

Prompt Apple's on-device and Private Cloud Compute models from Swift, in a few lines of code.

Introduced
2025
WWDC25
Kind
Framework
Runs on
Get it from
iOS
26.0+
iPadOS
26.0+
Mac Catalyst
26.0+
macOS
26.0+
tvOS
visionOS
26.0+
watchOS
27.0+

Overview

The Foundation Models framework gives your app direct access to the model behind Apple Intelligence. Guided generation turns responses into your own Swift types, tool calling lets the model reach into your app, and sessions keep the conversation's context.

Since WWDC26 it also takes images, offers a larger reasoning model on Private Cloud Compute, works with other providers through the LanguageModel protocol, and the core framework is open source.

Guided generation

Get typed Swift values back with @Generable, not strings to parse.

Tool calling

Let the model call into your app for data it doesn't have.

Private Cloud Compute

A larger reasoning model, with no API keys or accounts.

Evaluations

Measure quality as you change prompts and models.

TripPlanner.swift
import FoundationModels @Generable struct Itinerary { @Guide(description: "A short, catchy title") var title: String var days: [String] } let session = LanguageModelSession( instructions: "You plan short city trips." ) let trip = try await session.respond( to: "Three days in Kyoto", generating: Itinerary.self ).content

History

How it grew up.

2025

Introduced

On-device model access from Swift, announced at WWDC25.

2026

Vision and reasoning

Image prompts, a Private Cloud Compute model and an open source core.