docs/5-CONFIGURATION/omlx.md
oMLX is a macOS-native inference server for Apple Silicon. It runs MLX models locally and exposes an OpenAI-compatible API at /v1, so Open Notebook can use it for language and embedding models without sending data to the cloud.
Open Notebook treats oMLX as a first-class provider in Settings → API Keys. Identity comes from Esperanto’s built-in omlx OpenAI-compatible profile (AIFactory.create_language("omlx", ...) / create_embedding("omlx", ...)). There is no remapping to the generic openai-compatible provider and no OPENAI_COMPATIBLE_* env mirroring.
/v1/chat/completions and /v1/embeddings--api-key if neededDMG (recommended): download from oMLX Releases, drag to Applications, and launch.
Homebrew:
brew tap jundot/omlx
brew install omlx
brew services start omlx
CLI:
omlx serve
# or with a custom port (recommended — see Port Conflict below):
OMLX_PORT=11435 omlx serve
Admin UI (when using oMLX’s own default port): http://localhost:8000/admin
oMLX and SurrealDB both default to port 8000. Open Notebook’s database uses 8000, so running oMLX on the default port will collide.
Recommended: run oMLX on 11435 (same idea as Ollama’s 11434):
OMLX_PORT=11435 omlx serve
Or set the port in oMLX’s admin settings / ~/.omlx/settings.json.
Then use this base URL in Open Notebook:
http://localhost:11435/v1
Always include the
/v1suffix — oMLX’s OpenAI API lives under/v1(e.g.GET /v1/models).
http://localhost:11435/v1 (prefilled by default)--api-key# Prefer Settings UI; env is for migration / headless setups
export OMLX_API_BASE=http://localhost:11435/v1
# Optional, only if oMLX was started with --api-key
# export OMLX_API_KEY=your-key
These match Esperanto’s profile env names (OMLX_API_BASE, OMLX_API_KEY).
oMLX itself must run on the Mac host. If Open Notebook runs in Docker:
| Setup | Base URL |
|---|---|
| Both on host | http://localhost:11435/v1 |
| Open Notebook in Docker, oMLX on host | http://host.docker.internal:11435/v1 |
Ensure oMLX listens on an interface Docker can reach.
| Modality | Supported |
|---|---|
| Language | ✅ |
| Embedding | ✅ |
| Speech-to-text | ❌ |
| Text-to-speech | ❌ |
For local STT/TTS, see Local STT and Local TTS (e.g. Speaches via OpenAI-Compatible).
| Symptom | What to check |
|---|---|
| Connection refused | Is oMLX running? Correct port? |
| Wrong port / SurrealDB errors | Don’t use 8000 for oMLX — use 11435 (or another free port) |
404 on /models | Base URL must end with /v1 |
| 401 Unauthorized | API key mismatch with oMLX --api-key |
| No models listed | Load/download models in the oMLX admin UI first |
| Docker can’t reach host | Use host.docker.internal and confirm oMLX bind address |
Quick connectivity check:
curl http://localhost:11435/v1/models