SCXSwiftKit
Open source · MIT licensed · Swift Package Manager
Your Apple code.
Our sovereign AI models.
SCXSwiftKit runs your Foundation Models code on SCX’s hosted models, with MAGPiE served from Australia. Keep your LanguageModelSession, @Generable, Tool and streaming code. Just change the model.
// Before: Apple’s on-device model
let session = LanguageModelSession()
// After: SCX hosted models
let model = SCXLanguageModel(model: "MAGPiE", apiKey: key)
let session = LanguageModelSession(model: model)Apple’s framework.
SCX’s infrastructure.
SCXSwiftKit sits behind Apple’s Foundation Models API as a model provider, routing calls to SCX’s inference service with full fidelity to Apple’s response shapes.
Drop-in replacement
SCXSwiftKit conforms to Apple’s LanguageModel protocol. Your existing LanguageModelSession, @Generable, Tool and streaming code works without modification.
Native Apple integration
Streaming, tool calling, structured output and reasoning levels all surface through Apple’s own API, so your app keeps the behaviours it already has.¹
No lock-in
SCXSwiftKit implements the standard Apple protocol. To switch back to Apple’s on-device model or another provider, just change the model.
Sovereign inference
MAGPiE is served from Australia, and your prompts and completions never leave SCX’s infrastructure. No training data collection. No third-party sharing.
Get started in minutes.
One package, one API key, one model name. The rest of your code stays exactly as it is.
Step 1
Add the package
In Xcode: File, Add Package Dependencies, then paste the repository URL. Or declare it in Package.swift:
dependencies: [
.package(
url: "https://github.com/SouthernCrossAI/SCXSwiftKit",
from: "1.0.0"
),
]Step 2
Get an API key
Sign up at platform.scx.ai and create a key. Store it in the Keychain or fetch it from your backend; never hardcode it in your app.
import FoundationModels
import SCXSwiftKit
let model = SCXLanguageModel(
model: "MAGPiE",
apiKey: key
)Step 3
Keep your code
Every session, tool, schema and stream you already have works unchanged.
let session = LanguageModelSession(model: model)
let answer = try await session.respond(
to: "What does APRA do?"
)What works today
- Streaming and non-streaming responses
- Tool calling with standard Foundation Models Tools
- Structured output with @Generable²
- Reasoning levels and token usage reporting
- Any SCX text model, including ones that do not exist yet
- Image input (vision)¹
Open source under MIT.
The package is public, contributions are welcome, and the test suite runs live against api.scx.ai on every pull request, so what you read is what ships.
SCXSwiftKit on GitHubEvery SCX model.
One session API.
MAGPiE is the default. Pass any other model id to SCXLanguageModel and the same session code runs OpenAI, Google, Meta and DeepSeek models, plus SCX’s own sovereign models like MAGPiE and SCX-coder.
Capabilities resolve from the live catalogue at runtime, so models SCX adds next month work with no package update. Each model lists its hosting regions, and MAGPiE is served from Australia.³
Plus many other open-weight and custom fine-tuned models.
Everything Apple developers expect.
Streaming token output
Tokens stream into your UI as they arrive, through Apple’s own snapshot-based AsyncSequence API. No custom parsing, no protocol glue.
Sovereign hardware
SCX models run on SCX SN40L ASIC chips, purpose-built for AI inference with 2.5x to 5.6x better performance-per-watt than GPU alternatives.
On-device or sovereign, per session
The same session code runs on Apple’s on-device model or on SCX. Keep short, private tasks on-device and send long documents to MAGPiE’s 131k context. You choose per session.
No training data collection
Prompts and completions are never stored, never used for training, and never shared with third parties. Full data sovereignty, by design.
Infrastructure
Built on SCX SN40L ASIC.
Every SCX model runs on SCX’s SN40L ASIC, delivering GPU-comparable inference quality at a fraction of the energy draw. No NVIDIA dependency. No spot instance interruptions.
Architecture
SCX SN40L ASIC
Context window
131k tokens on MAGPiE
Throughput
High-volume batch & streaming
Use cases
Coding, agents, long-doc analysis
SCXSwiftKit is open source under the MIT licence. Contributions are welcome, from SCX’s own engineers and from anyone else.
SCXSwiftKit on GitHubWhat you need to get started.
- Frameworks
- Foundation Models framework on iOS 27, macOS 27, visionOS 27 or watchOS 27
- Tools
- Xcode 27 or later
- Package
- Swift Package Manager, from version 1.0.0
- API key
- Sign up at platform.scx.ai and create a key in minutes
- Supporting iOS 26?
- The package still builds on older toolchains: the Apple provider compiles out and SCXRuntime, the plain OpenAI-compatible client, remains available. Gate usage with if #available(iOS 27, *).
- Also included
- scx-chat, a command-line streaming demo. Run swift run scx-chat --models to list the catalogue with regions and capabilities.
- tvOS
- Not currently supported.
Frequently asked questions.
Start building with SCXSwiftKit.
Open source under MIT. One package, every SCX model, with MAGPiE served from Australia.
- 1 Image input (vision) is not currently supported by SCXSwiftKit.
- 2 Structured output is best-effort: SCX runs schemas non-strictly, so validate on the app side for critical paths.
- 3 Hosting regions vary by model and account tier. Region listings are available through the SCX API and at scx.ai/models.
Apple, iOS, macOS, visionOS, watchOS, Xcode and Foundation Models are trademarks of Apple Inc., registered in the US and other countries and regions.