cd /news/artificial-intelligence/foundation-models-sdk-for-python-doc… · home › topics › artificial-intelligence › article
[ARTICLE · art-173140] src=apple.github.io ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Foundation Models SDK for Python Documentation

Apple released a Python SDK, installable via `pip install apple-fm-sdk`, that gives Python developers access to the on-device foundation model at the core of Apple Intelligence on macOS. The bindings run Apple's Foundation Models framework in Swift under the hood, require macOS 26.0+, Xcode 26.0+ with the Xcode and Apple SDKs agreement accepted, Python 3.10+, and Apple Intelligence enabled on a compatible device, and are intended for evaluating a Swift app's Foundation Models features using Python's data and machine learning tooling. Apple states that developers remain responsible for designing AI experiences with care and points to its guidance on improving the safety of generative model output and its Human Interface Guidelines on Generative AI.

key takeaway

Apple's `apple-fm-sdk` package exposes the on-device Apple Intelligence model to Python 3.10+ on macOS 26.0+ through `SystemLanguageModel` and `LanguageModelSession`, running the Swift Foundation Models framework under the hood so evaluations match real on-device behavior.

read1 min views10 publishedNov 20, 2026

Platform Support: macOS

Python Version: 3.10+

Python bindings for Apple’s Foundation Models framework give you access to the on-device foundation model at the core of Apple Intelligence on macOS. You can use this Python SDK to evaluate your Swift app’s Foundation Models features, using Python’s rich ecosystem of tools and libraries for data and machine learning. These Python bindings run the Apple’s Foundation Models framework in Swift under the hood, so you can be confident that your evaluations reflect real on-device performance and behavior.

Keep in mind that it’s your responsibility to design AI experiences with care. To learn about practical strategies you can implement in code, check out: Improving the safety of generative model output and Apple’s Human Interface Guidelines on Generative AI.

Requirements# #

Since this SDK calls the on-device foundation model at the core of Apple Intelligence it requires:

Quick Start# #

Installation#

pip install apple-fm-sdk

Basic Usage#

import apple_fm_sdk as fm

model = fm.SystemLanguageModel()

is_available, reason = model.is_available()
if is_available:
    session = fm.LanguageModelSession(model=model)

    response = await session.respond(prompt="Hello, how are you?")
    print(f"Model response: {response}")
else:
    print(f"Foundation Models not available: {reason}")
── more in #artificial-intelligence 4 stories · sorted by recency
── more on @apple 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/foundation-models-sd…] indexed:0 read:1min 2026-11-20 · —