The Foundation Models example is the finest way to use any ample tongue example in your app. Whether you’re generating a quick summary or creating energetic agents, the example has what you need.

Overview

The Foundation Models example is a native Swift API for integrating any ample tongue example into your app — including straightforward admission to the Apple Foundation Models on-device and in Private Cloud Compute. Powerful capabilities akin guided generation, tool calling, depiction understanding, and Dynamic Profiles are built in, so you have what you need to build distinctive experiences.

Image understanding

Multimodal prompts let you continue images alongside content so your app can logic concerning ocular content. This opens up new categories of experiences you can build alongside depiction understanding — it's as uncomplicated as attaching an depiction to your prompt. The Vision example is additionally unified directly, giving your example purpose-built tools akin OCR for exact content extraction and barcode readers for quick code scanning — all on-device.

Model support

The Foundation Models example gives you straightforward admission to the on-device basis example at the center of Apple Intelligence so you can build experiences that are smart, private, and activity without net connectivity.

On-device models are extremely helpful for many tasks, yet sometimes you need a larger example for a additional complex workflow. The Foundation Models example now extends to server models — akin Claude, Gemini, and additional — all through the identical Swift API, alongside complete assistance for features akin tool calling and guided generation. Any example provider can create a Swift bundle conforming to the Language Model protocol, a essential component of the example that allows you to choice the correct tongue example for your app.

Private Cloud Compute

For those fair getting started, developers who are enrolled in the App Store Small Business Program and have small than two myriad first-time App Store downloads can admission the Apple Foundation Models operating on Private Cloud Compute alongside no haze API cost.* This delivers frontier-level intellect alongside unparalleled privacy protections, ensuring that your users' data is not stored or accessible to Apple or anyone else.

Learn additional concerning Private Cloud Compute

Dynamic Profiles

Dynamic Profiles are new declarative APIs for continuously updating your session's model, tools, and instructions on the fly. Rather than creating a meeting alongside a fixed configuration, you define profiles — all alongside its own model, temperature, reasoning level, and toolset — and toggle between them inside a sole uninterrupted session. The meeting copy is shared throughout all overview switch, so your app gets additional contextual intellect alongside small prompting. Dynamic Profiles are designed to be elastic construction blocks: use them to build AI agents, skills, or any another high-level idea your app needs.

Evaluations framework

The Evaluations example gives you the capability to test your prompts and validate that your intelligence-powered features activity correctly throughout energetic conditions, going beyond what component tests solitary can catch. Whether you're iterating on instructions, switching models, or tuning a Dynamic Profile, Evaluations gives you confidence that your app's behavior holds up before you ship.

CLI

The new fm command row tool in macOS 27 lets you streamline scripting, automate example workflows, and accelerate your betterment without penning a row of app code. You can prototype quickly, giving you a accelerated way from idea to implementation.

Open source

To assistance you get started alongside adopting emerging AI patterns, the Foundation Models example utilities bundle adds experimental abstractions on top of the example — including tradition skills, environment administration helpers, and a Chat Completions client that connects to a hosted example of your choice.

The Foundation Models SDK for Python extends the example into the Python ecosystem, letting you merge alongside famous tooling and evaluation packages in Python.

Requirements

The Acceptable Use Requirements for the Foundation Models example outline prohibited uses of Apple Foundation Models. Additionally, pursuant to Article 53(1)(b) of the AI Act, we create accessible data and records to providers of AI systems who average to merge AFM 3 Cloud into their AI systems.