The Local API
Short answer: M1K3 on the Mac can lend the brain it already has loaded to any tool that speaks the OpenAI API. Switch on Settings ▸ Server ▸ Local API, copy the key, and point your editor, script or client library at http://127.0.0.1:4141/v1. It is off by default, it listens on your Mac only, and it has a key of its own. A caller gets the raw brain under its own instructions: none of M1K3's memory, knowledge, personality or tools.
Set it up
- Open M1K3 on your Mac and go to Settings ▸ Server ▸ Local API. Switch it on.
- Copy the API key from the same pane. You can make a new key there at any time; the old one stops working.
- Point your tool at the base URL below and give it the key.
Base URL http://127.0.0.1:4141/v1 API key Settings ▸ Server ▸ Local API ▸ API key ▸ Copy Model mini-m1k3, lil-m1k3 or big-m1k3: whichever brain M1K3 has ready
A first call
With curl, streaming:
$ curl http://127.0.0.1:4141/v1/chat/completions \
-H "Authorization: Bearer $M1K3_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"lil-m1k3","stream":true,"messages":[{"role":"user","content":"Hello"}]}'With the OpenAI Python client. The brain on this Mac is always the first model listed, so you do not have to know which one is loaded:
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:4141/v1", api_key="<the key from Settings>")
models = [m.id for m in client.models.list()]
reply = client.chat.completions.create(
model=models[0],
messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(reply.choices[0].message.content)The model names
| Model id | What answers | Where |
|---|---|---|
| mini-m1k3 | Mini: Apple's on-device model | On this Mac |
| lil-m1k3 | Lil: Qwen3.5 4B on MLX | On this Mac |
| big-m1k3 | Big: Gemma 4 12B on MLX | On this Mac |
| cloud-m1k3 | Apple's Private Cloud Compute | Leaves the Mac. Off until you switch it on. |
/v1/models lists the brain that is ready. Asking for another one returns 404 model_not_found; switch brain in M1K3 itself. Which models these are, and how they score.
The rules
- Loopback only. The listener binds
127.0.0.1. Nothing on your network can reach it, and web pages are refused: any request with anOriginheader gets a 403. - Its own key. Not the MCP server's token, which also unlocks memory and speech.
- You go first. One call at a time. A call that arrives while you are chatting or in voice mode gets a
429withRetry-After, which OpenAI client libraries retry by themselves. - The raw brain. Your system message is the system prompt. Nothing you send is written to M1K3's chat history or turned into a memory. On the two Apple models one fixed line comes first, asking the model to keep to Apple's acceptable use requirements.
- Nothing is kept between calls. Each call re-reads the whole conversation, so a long history costs the same wait every turn. Measured on 2026-11-11 on an M1 Max: a short prompt starts in about 0.15 s on Lil and about 0.3 s on Big, and a 2,000-token history takes about 4 s on Lil and about 8.6 s on Big before the first word.
- Untested under your instructions. M1K3 chooses and tests its brains inside M1K3. How one behaves under another app's system prompt is yours to judge.
What it serves, and what it refuses
| GET /v1/models | The ready brain, then cloud-m1k3 if you offer it |
| POST /v1/chat/completions | Text chat, streamed or whole |
| Honoured | messages (system, developer, user, assistant), max_tokens, temperature, stop (up to four), stream_options.include_usage |
| Refused with a 400 | tools and functions, n above 1, image or audio content, tool messages, JSON-schema response formats |
| Not offered (404) | /v1/completions, /v1/embeddings, /v1/responses, audio and image endpoints |
Errors use OpenAI's shape. The full reference, with usage counts and finish reasons, is LOCAL_API.md in the repository.
The cloud model: Private Cloud Compute
For a job bigger than your Mac, there is one optional model that leaves it. Switch on Also offer Private Cloud Compute in the same pane (it also needs Settings ▸ Privacy ▸ Private Cloud Compute on, and the App Store build with Apple Intelligence), and /v1/models gains cloud-m1k3. A call that names it is answered by Apple's Private Cloud Compute.
- What leaves: the messages in that call, behind the one fixed acceptable-use line, and nothing else. M1K3 adds no memory, knowledge or history, and keeps nothing.
- You can see it: the Settings pane counts the calls that have left since M1K3 opened.
- It spends your daily limit. Apple limits Private Cloud Compute per day, and these calls count against the limit M1K3's own chat uses. A spent limit answers
429 insufficient_quota; retrying will not help until it resets. - M1K3 caps it too: 30 lent calls an hour, so a tool in a loop cannot spend your day. Over that is
429 rate_limit_exceededwith aRetry-After. - Unreachable for the moment is
503 service_unavailable, which OpenAI client libraries retry by themselves.
What Apple promises about Private Cloud Compute is on Apple's own page. M1K3 makes no claim beyond it. The privacy page has the same account in the policy's words.
Want the assistant, not the raw brain?
Memory, document search and voice live behind M1K3's MCP server, which has its own switch and its own token. Connect a coding agent, or read how Claude gets a local memory.
Questions
Does M1K3 have an OpenAI-compatible API?
Yes, on the Mac, from version 1.4. Switch on Settings ▸ Server ▸ Local API and M1K3 serves /v1/models and /v1/chat/completions at http://127.0.0.1:4141/v1, in the shape OpenAI clients already speak. It is off by default and has its own key.
Does anything I send leave my Mac?
Not with the on-device brains: the listener binds 127.0.0.1 only, refuses web pages, and a call to mini-m1k3, lil-m1k3 or big-m1k3 is answered on the Mac. The one exception is cloud-m1k3, which you have to switch on yourself: a call that names it sends that call's messages to Apple's Private Cloud Compute.
Which model names does it serve?
Whichever brain M1K3 has ready: mini-m1k3 (Apple's on-device model), lil-m1k3 (Qwen3.5 4B) or big-m1k3 (Gemma 4 12B). Ask /v1/models and use the first id. Asking for a brain that is not loaded returns 404 model_not_found; switch brain in M1K3 itself.
Does it support tool calls, embeddings or images?
Not in this version. It serves text chat, streamed or whole. Tools, functions, image and audio content and JSON-schema response formats are refused with a 400, and /v1/embeddings, /v1/completions and /v1/responses are not offered.
How is this different from M1K3's MCP server?
The Local API lends the raw brain: your system message, your messages, and none of M1K3's memory, knowledge, personality or tools. The MCP server is the assistant itself for agents: memory, document search and voice. They have separate switches and separate keys.
Does it work on iPhone or iPad?
No. The Local API is part of M1K3 on the Mac.
Get M1K3 for your Mac.
Free for humans, source-available. The Local API is in the app, off until you switch it on.