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. Foundation Models SDK for Python Documentation foundation-models-sdk-for-python-documentation Platform Support: macOS Python Version: 3.10+ Python bindings for Apple’s Foundation Models framework https://developer.apple.com/documentation/foundationmodels 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 https://developer.apple.com/documentation/foundationmodels/improving-the-safety-of-generative-model-output and Apple’s Human Interface Guidelines on Generative AI https://developer.apple.com/design/human-interface-guidelines/generative-ai . Requirements requirements Since this SDK calls the on-device foundation model at the core of Apple Intelligence it requires: - macOS 26.0+ - Download Xcode 26.0+ https://developer.apple.com/xcode/ and agree to the Xcode and Apple SDKs agreement https://www.apple.com/legal/sla/docs/xcode.pdf in the Xcode app. - Python 3.10+ - Apple Intelligence turned on for a compatible device https://support.apple.com/en-us/121115 Quick Start quick-start Installation installation pip install apple-fm-sdk Basic Usage basic-usage python import apple fm sdk as fm Get the default system foundation model model = fm.SystemLanguageModel Check if the model is available is available, reason = model.is available if is available: Create a session session = fm.LanguageModelSession model=model Generate a response response = await session.respond prompt="Hello, how are you?" print f"Model response: {response}" else: print f"Foundation Models not available: {reason}"