> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokios.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Tokios exposes private local models through https://api.tokios.com using an outbound-only connector tunnel.
> Use 'connector' for the local tokios-connector process.
> Use 'deployment' for the public model name in the API model field.
> Use 'upstream model id' for the model served by Ollama, llama.cpp, vLLM, LM Studio, or another local backend.
> API keys use the prefix sk-tok-. Connector tokens use the prefix ct-tok-.

# Turn your Mac Studio into a team model endpoint

> Give the model in LM Studio, Ollama, MLX Studio, or MLX-LM Server on your Mac Studio's unified memory one authenticated endpoint that teammates and coding agents can call.

Your Mac Studio's unified memory can hold models a laptop can't, which is why it ends up running LM Studio, Ollama, MLX Studio, or MLX-LM Server as a headless inference box. The part that isn't solved for you is reaching that model from anywhere other than the Mac Studio itself. Run the Tokios connector next to your runtime and you get one authenticated endpoint at `https://api.tokios.com` — no binding the server to `0.0.0.0`, no VPN, no per-teammate network setup.

## LAN is not the same as your team

LM Studio's own docs cover **serve on local network** — binding the server beyond `127.0.0.1` so other devices on your Wi-Fi can reach it — with a warning attached, and its request-level auth is off by default. That gets a second machine on your home network talking to the Mac Studio. It doesn't get you:

* **A teammate who isn't on your LAN.** Someone working from another building, another city, or their own home network can't reach a server bound to your local subnet.
* **Per-person access control.** LM Studio's network server has no built-in API key, so anyone who can reach the bound port and path can call it — there's no way to hand one teammate access and not another, or to cut someone off later without restarting the server.
* **One address that survives you changing machines.** A LAN IP is tied to your network. Move the Mac Studio, change routers, or hand the job to a Mac mini instead, and every client's config breaks.

Tokios doesn't change how LM Studio, Ollama, MLX Studio, or MLX-LM Server runs — it adds a connector that dials out from the Mac Studio to `https://api.tokios.com`, so you never bind the runtime past loopback and never open an inbound port.

> [!TIP]
>
> **Want a GUI without the terminal?** [MLX Studio](https://docs.tokios.com/setup/supported-backends.md#mlx-studio) is a native macOS app that bundles the vMLX inference engine, a model manager, and an OpenAI-compatible API server — no `pip`, no `venv`, no command line. Download the app, pick a model from the [mlx-community](https://huggingface.co/mlx-community) on Hugging Face, and start the server from the **Server** tab. It listens on port `8000` by default.

## Mac Studio configurations and what they can run

The current Mac Studio ships with M4 Ultra, M5 Max, or M5 Ultra chips. Here is what each brings to local inference:

| Chip | Unified memory | Memory bandwidth |
| - | - | - |
| M4 Ultra | up to 192 GB | \~820 GB/s |
| M5 Max | up to 128 GB | 460–614 GB/s |
| M5 Ultra | up to 256–512 GB | 1,200 GB/s (50% above M3 Ultra) |

With that much unified memory, a Mac Studio handles model sizes that need a multi-GPU server on other platforms:

* **70B models** at Q4 or Q8 quantization run comfortably on M4 Ultra (192 GB) and every M5 config.
* **500B+ MoE models** like DeepSeek V4.1-Flash (552B) and Kimi K3 (2.8T at lower quant) need multi-device setups — see [DeepSeek V4.1-Flash local hardware](https://docs.tokios.com/blog/deepseek-v4-flash-local-hardware.md).
* **DeepSeek V4-Flash at native precision** (155 GB) fits the M5 Ultra 256 GB config with room for KV cache.
* **Multiple smaller models** simultaneously — run a coding model on Ollama and a general-purpose model on MLX Studio at the same time, each behind its own Tokios deployment.

> [!TIP]
>
> MLX-LM Server and MLX Studio are optimized for Apple Silicon. The M5 Ultra's Neural Accelerators deliver up to 4x faster prompt processing compared to previous generations, so MLX-based runtimes get the largest gains on M5 hardware.

Current Mac Studio pricing starts at $2,499 for the M5 Max and $5,499 for the M5 Ultra.

## Set it up on your Mac Studio

**1. Start your runtime on the Mac Studio**

Run the model server as you normally would, on loopback.

```bash LM Studio theme={"theme":{"light":"github-light","dark":"css-variables"}}
# Developer (Local Server) tab → Start Server
# Listens on http://127.0.0.1:1234/v1 by default
```

```bash Ollama theme={"theme":{"light":"github-light","dark":"css-variables"}}
ollama run gemma4:e4b
# Listens on http://127.0.0.1:11434/v1
```

```bash MLX-LM Server theme={"theme":{"light":"github-light","dark":"css-variables"}}
pip install mlx-lm
mlx_lm.server --model mlx-community/Qwen-3.5-4B-8bit
# Listens on http://127.0.0.1:8080/v1
```

```bash MLX Studio theme={"theme":{"light":"github-light","dark":"css-variables"}}
# Server tab → Start Server
# Listens on http://127.0.0.1:8000/v1 by default
```

Confirm it answers on its own OpenAI-compatible `/v1` API before adding the connector.

**2. Get a claim code and pair the connector**

In the [dashboard](https://tokios.com/console), open the **Setup** tab and select **Start pairing** to get a one-time claim code shaped `TKS-XXXX-XXXX` (valid about 15 minutes). On the Mac Studio, run:

```bash theme={"theme":{"light":"github-light","dark":"css-variables"}}
curl -fsSL https://tokios.com/downloads/install/macos | sh -s -- --code TKS-XXXX-XXXX
```

Tokios ships a native Apple Silicon (arm64) build of `tokios-connector`, which covers Mac Studio, Mac mini, and MacBook Pro on Apple Silicon. If Gatekeeper flags the binary, clear it with `xattr -d com.apple.quarantine ./tokios-connector`; the install one-liner above avoids this.

Back in the dashboard, **approve** the device on the **Setup** or **Connectors** tab. The connector's token is delivered over the tunnel — you never see it on screen or paste it into a file.

**3. Point the connector at your runtime's /v1 endpoint**

The connector's upstream is your runtime's own OpenAI-compatible API on the Mac Studio, still on loopback — not a port you expose to the network. Default ports: LM Studio `1234`, Ollama `11434`, MLX Studio `8000`, MLX-LM Server `8080` (all with `/v1` appended). No inbound firewall rule, no LAN binding, and no extra connector settings needed for this single-machine path.

**4. Register a deployment**

On the **Models** tab, map your upstream model id (for example, the LM Studio or Ollama model you loaded) to a public deployment name such as `studio-model`. Clients send this deployment name in the `model` field, not the upstream id.

**5. Create an API key**

On the **Keys** tab, create a key. Keys are `sk-tok-…` Bearer tokens, shown once, and can be scoped to specific deployment name patterns — so a teammate's key can be limited to just this deployment.

## Keep it always on

A terminal window works for testing, but a Mac Studio doing this job full time should keep the connector running across reboots and logouts. Run it as a **launchd** background service using a `~/Library/LaunchAgents/com.tokios.connector.plist` agent that points `ProgramArguments` at `tokios-connector --config` and your `tokios-connector.json`, with `RunAtLoad` and `KeepAlive` set so it restarts automatically. See [Connector config: running as a background service](https://docs.tokios.com/reference/connector-config.md#running-as-a-background-service) for the full plist and `launchctl load` / `launchctl start` commands.

For a machine no one ever logs into interactively, consider a `LaunchDaemon` instead of a `LaunchAgent` — check Apple's current guidance for your macOS version to confirm which is preferable for your setup.

## Use it from anywhere

Once the connector is paired and a deployment is registered, point your client at Tokios instead of the Mac Studio's IP address or hostname.

```bash Claude Code theme={"theme":{"light":"github-light","dark":"css-variables"}}
export ANTHROPIC_BASE_URL=https://api.tokios.com
export ANTHROPIC_API_KEY=sk-tok-YOUR_KEY
claude --model studio-model
```

```python OpenAI SDK theme={"theme":{"light":"github-light","dark":"css-variables"}}
from openai import OpenAI

client = OpenAI(
    base_url="https://api.tokios.com/v1",
    api_key="sk-tok-YOUR_KEY",
)

response = client.chat.completions.create(
    model="studio-model",
    messages=[{"role": "user", "content": "Hello from the team"}],
)
```

> [!NOTE]
>
> Claude Code's model picker only lists `claude*` ids, so your Tokios deployment won't appear in the list — pass `--model studio-model` explicitly.

If you run more than one model on the Mac Studio — say LM Studio for one model, Ollama for another, MLX Studio for a third, and MLX-LM Server for a fourth — use the [connector config file](https://docs.tokios.com/reference/connector-config.md) to define multiple routes and upstreams instead of the single-model pairing flow. See [Model routing](https://docs.tokios.com/guides/model-routing.md) for registering and switching between several deployments behind the same endpoint.

## Why one endpoint

* **Share the Mac Studio without sharing your network.** A teammate calls `https://api.tokios.com` with their own scoped key — they never need to be on your LAN or Tailscale tailnet.
* **Swap models without touching client config.** Point `studio-model` at a different upstream model or backend, and every agent and script that already targets it keeps working.
* **No inbound ports, no `0.0.0.0`.** LM Studio, Ollama, MLX Studio, and MLX-LM Server stay on `127.0.0.1`. The connector only makes outbound connections to Tokios.

## Next steps

> [card] [Team access](https://docs.tokios.com/use-cases/team-access.md)
>
> Full walkthrough for giving your team API access to your local models.

> [card] [What is a local LLM?](https://docs.tokios.com/guides/what-is-local-llm.md)
>
> Complete guide to running large language models locally.

> [card] [Quickstart](https://docs.tokios.com/quickstart.md)
>
> Go from zero to a working connector, deployment, and API key.

> [card] [Install the connector](https://docs.tokios.com/setup/connector-install.md)
>
> Full connector install and pairing reference for all platforms.

> [card] [Use Claude Code](https://docs.tokios.com/guides/claude-code.md)
>
> Configure `ANTHROPIC_BASE_URL` and `ANTHROPIC_API_KEY` in detail.

> [card] [Connector config reference](https://docs.tokios.com/reference/connector-config.md)
>
> Serve multiple models from one Mac with `tokios-connector.json`, and run it as a launchd service.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.