{"slug": "foundation-models-sdk-for-python-documentation", "title": "Foundation Models SDK for Python Documentation", "summary": "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.", "body_md": "# Foundation Models SDK for Python Documentation[#](#foundation-models-sdk-for-python-documentation)\n\n**Platform Support:** macOS\n\n**Python Version:** 3.10+\n\nPython bindings for Apple’s [Foundation Models framework](https://developer.apple.com/documentation/foundationmodels)\ngive you access to the on-device foundation model at the core of Apple Intelligence on macOS. You can use this Python SDK to evaluate\nyour Swift app’s Foundation Models features, using Python’s rich ecosystem of tools and libraries for data and machine learning.\nThese Python bindings run the Apple’s Foundation Models framework in Swift under the hood, so you can be confident that your evaluations reflect\nreal on-device performance and behavior.\n\nKeep in mind that it’s your responsibility to design AI experiences with care.\nTo learn about practical strategies you can implement in code, **check out:**\n[Improving the safety of generative model output](https://developer.apple.com/documentation/foundationmodels/improving-the-safety-of-generative-model-output)\nand Apple’s [Human Interface Guidelines on Generative AI](https://developer.apple.com/design/human-interface-guidelines/generative-ai).\n\n## Requirements[#](#requirements)\n\nSince this SDK calls the on-device foundation model at the core of Apple Intelligence it requires:\n\n- macOS 26.0+\n- 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.\n- Python 3.10+\n- Apple Intelligence turned on for a [compatible device](https://support.apple.com/en-us/121115)\n\n## Quick Start[#](#quick-start)\n\n### Installation[#](#installation)\n\n```\npip install apple-fm-sdk\n```\n\n### Basic Usage[#](#basic-usage)\n\n``` python\nimport apple_fm_sdk as fm\n\n# Get the default system foundation model\nmodel = fm.SystemLanguageModel()\n\n# Check if the model is available\nis_available, reason = model.is_available()\nif is_available:\n    # Create a session\n    session = fm.LanguageModelSession(model=model)\n\n    # Generate a response\n    response = await session.respond(prompt=\"Hello, how are you?\")\n    print(f\"Model response: {response}\")\nelse:\n    print(f\"Foundation Models not available: {reason}\")\n```\n\n", "url": "https://wpnews.pro/news/foundation-models-sdk-for-python-documentation", "canonical_source": "https://apple.github.io/python-apple-fm-sdk/", "published_at": "2026-11-20 08:20:23+00:00", "updated_at": "2026-11-20 08:44:43.283013+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-products", "developer-tools", "ai-safety"], "entities": ["Apple", "Apple Intelligence", "Foundation Models framework", "Xcode", "macOS", "Python", "apple-fm-sdk"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/foundation-models-sdk-for-python-documentation", "markdown": "https://wpnews.pro/news/foundation-models-sdk-for-python-documentation.md", "text": "https://wpnews.pro/news/foundation-models-sdk-for-python-documentation.txt", "jsonld": "https://wpnews.pro/news/foundation-models-sdk-for-python-documentation.jsonld"}}