preowned
A local HTTP server that puts the models built into macOS behind the OpenAI API, so any OpenAI client can use Foundation Models, Image Playground, NaturalLanguage embeddings, Speech and the system voices on your Mac.
View on GitHub ↗- Stars
- ★ 58
- Last commit
- 25 Nov 2026
- Maintenance
- Active
- Licence
- MIT
- Category
- On-device AI SDKs
- GitHub
- mattt/
preowned
Overview
Your Mac already ships with a language model, an image maker, a transcriber, a translator and a set of voices. preowned serves them through an OpenAI-compatible API at http://127.0.0.1:8027/v1, so code and tools written for the OpenAI SDKs can run against them without changes.
If a request asks for an OpenAI model such as gpt-4o or whisper-1, you get the Apple model for that endpoint, and the response reports the Apple model ID. GET /v1/models lists only the models that work on your Mac right now.
preowned is licensed under the MIT licence.
Features
- Chat completions through Foundation Models (apple-foundation-model), with streaming and structured output.
- Image generation, edits and variations through Image Playground (apple-image-playground).
- Embeddings through NaturalLanguage (apple-nl-embedding), with 512 dimensions.
- Transcription through Speech, and translation through Speech then Translation (apple-speech-transcriber).
- Text to speech through AVSpeechSynthesizer (apple-speech-synthesizer). Each OpenAI voice maps to a similar installed Apple voice, or you can ask for any installed voice by name.
- preowned inventory shows what works on your Mac and why anything else doesn't.
- Options for the host and port, a required API key (--api-key), strict model names (--strict-models), browser origins (--allow-origin) and language asset downloads (--allow-asset-downloads).
- Three image modes for macOS 27, where Apple no longer lets ImageCreator run in third-party processes: default, interactive (a person clicks Done in an Image Playground window) and auto-approve (Accessibility automation clicks Done, in English only).
- The README is clear about its limits. There's no tool calling, n must be 1, some chat parameters are accepted and ignored, structured output covers part of JSON Schema, and there's no Responses API, files, moderation or Realtime. MP3 output needs LAME or FFmpeg, otherwise you get AAC.
Requirements
- A Mac with Apple silicon.
- macOS 26 or later.
- Apple Intelligence turned on in System Settings, for chat and images.
- Xcode 27 or later, only if you build from source. The build needs the macOS 27 SDK, even on macOS 26.
- uv, only for make smoke.
Install
Homebrew. Run brew install mattt/tap/preowned. The formula installs a prebuilt binary, so you don't need Xcode.
From source. In a checkout of the repo, run make, then make install. That copies the binary to /usr/local/bin. If you can't write there, use sudo make install, or install somewhere else with make install PREFIX="$HOME/.local".
Example
1. Run preowned inventory to see which models work on your Mac.
2. Run preowned serve to start the server.
3. Point your OpenAI client at it by setting OPENAI_BASE_URL to http://127.0.0.1:8027/v1 and OPENAI_API_KEY to any value.
Then a chat request for gpt-4o to /v1/chat/completions is answered by Foundation Models on your Mac.
Works with
Listed in
Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.
More in this category
apfel
Command-line tool, chat mode and local OpenAI-compatible server for the on-device model in Apple's FoundationModels framework. Needs macOS 26 and Apple silicon.
Argmax OSS Swift (WhisperKit)
Argmax's open-source on-device speech toolkit for Apple silicon, and the home of WhisperKit.
MLX Swift Examples
Example apps and code showing how to use MLX Swift.
SwiftAgents