apfel
Arthur-Ficial
Expose the on-device Apple Intelligence model on macOS 26 as a zero-setup OpenAI-compatible local API.
What is apfel?
apfel wraps Apple's on-device Foundation Models framework (the ~3B model shipping with macOS 26 / Tahoe) as a CLI, REPL, and OpenAI-compatible HTTP server on localhost. No model download, no API key, no cloud. Supports tool calling, MCP, JSON output and nine languages.
apfel in depth
Every Mac running macOS 26 Tahoe now ships with a small language model baked into the operating system, but Apple does not expose it as a general-purpose endpoint you can point your own scripts and tools at. apfel closes that gap. It is a small Swift utility from Arthur-Ficial that wraps Apple's on-device Foundation Models framework and surfaces it three ways: as a UNIX-style command-line tool, as an interactive REPL, and as an OpenAI-compatible HTTP server on localhost. The pitch is zero setup in the most literal sense. There is no model to download, no API key to manage, and no cloud round trip, because the roughly 3B-parameter model is already present on the machine. You install apfel, enable Apple Intelligence, and you have a local LLM endpoint.
apfel is built in Swift 6.3 with strict concurrency and is structured around a shared core library, ApfelCore, that all three entry points route through. Under the hood it calls Apple's SystemLanguageModel and LanguageModelSession APIs, so inference runs on the Neural Engine and GPU rather than a bundled runtime. The distinctive part is the compatibility surface. The server implements /v1/chat/completions, /v1/models, and /health, defaults to the Ollama-style port 11434, and accepts familiar parameters like temperature, top_p, max_tokens, seed, and response_format for JSON object and JSON schema output. It supports tool calling in all contexts and can attach Model Context Protocol servers via a --mcp flag. Unsupported requests, such as n greater than 1, logprobs, or image inputs, are rejected with explicit 400 errors rather than silently mishandled.
The natural audience is developers already on macOS 26 who want a free, fully offline endpoint for prototyping and privacy-sensitive work. Because the server speaks the OpenAI protocol, existing clients and libraries can be repointed at localhost with little more than a base-URL change, which makes it useful for local testing of agent loops, classification, summarization, and structured extraction without metered API costs. The pipe-friendly CLI fits shell workflows: transforming clipboard contents, summarizing command output, drafting commit messages, or watching a log and flagging anomalies. MCP and tool calling open the door to on-device agentic tasks that touch local files or APIs while keeping data on the machine. For automation where confidentiality matters more than raw model strength, that local-only guarantee is the main draw.
The caveats are significant and apfel is honest about most of them. It requires macOS 26 Tahoe on Apple Silicon, which at the time of writing means developer betas, so this is not something you ship to a broad user base yet. The context window is fixed at 4,096 tokens for input and output combined, far smaller than most open-weight models, and long conversations will hit a length cutoff. The underlying model is Apple's quantized on-device AFM, so quality is bound accordingly: the project itself notes weak math, shaky factual recall, and limited code generation, and the model has no awareness of the current date. There are no embeddings and no vision. Apple's safety guardrails can also produce false refusals, which a --permissive flag only partly mitigates, and responses take a few seconds each.
Against a hosted OpenAI or Anthropic API, apfel is not competing on capability and does not try to. It competes on cost, privacy, and convenience: a zero-dollar, zero-download, zero-network endpoint that happens to already live on your laptop. If your workload is light, well within 4K tokens, and tolerant of a small model, apfel can quietly replace paid calls for prototyping, local automation, and offline tasks, and the OpenAI-compatible surface means switching back to a frontier model later is a config change. It is too early to rely on if you need macOS 15 support today, a larger context window, stronger reasoning, or production stability on a non-beta OS. For developers living on Tahoe who want to experiment without a bill or a network dependency, it is a genuinely useful piece of plumbing worth adopting as macOS 26 reaches general release.
Pros & Cons
Pros
- Zero model download and zero cost - uses the model already baked into macOS 26
- OpenAI-compatible server, so existing integrations work unchanged
- MCP support and tool calling enable on-device agentic workflows
Cons
- Requires macOS 26 (Tahoe), only on developer betas at the time of writing
- 4,096-token context window is small versus most open-weight models
- Quality is bound by Apple's on-device ~3B model - not for complex reasoning
License
MIT (OSI-open)
When it is interesting
Developers on macOS 26 who want a fully offline, zero-cost LLM endpoint for prototyping and privacy-sensitive automation.
When it is too early
If you need macOS 15 support today, a larger context window, or stronger model quality.
Commercial alternative & related
- Commercial counterpart: OpenAI / Anthropic API
This repo featured in the 2026-07 edition of the Open-Source AI Radar.
oMLX
jundot
macOS-native LLM inference server for Apple Silicon with continuous batching and SSD-tiered caching.
shimmy
Michael-A-Kuykendall
Pure-Rust local inference engine with an OpenAI-compatible API, shipped as one binary.
claude-code-local
nicedreamzapp
MLX-native proxy that runs the Claude Code CLI against local models on Apple Silicon, fully offline.