All docs pages

DocsTutorials

Run ModelDeck with no window

Start headless ModelDeck from a terminal, load a model with the modeldeck command, send one request and stop cleanly.

Coming in the next release

Everything on this page is merged into ModelDeck but is not in a published release yet.

This tutorial starts ModelDeck with no window, loads a model from the command line, sends it one request and stops it cleanly. It takes about ten minutes. The commands and output were recorded from real runs on macOS and on Windows.

What you will do
  1. Unpack the archiveIt carries its own runtime
  2. Start servingmodeldeck serve, in one terminal
  3. Look aroundstatus, engines, models, in a second terminal
  4. Load a modelmodeldeck load
  5. Send a requestTo the local server
  6. Stopmodeldeck stop

You need the headless archive, modeldeck-headless-<platform>-<arch>. It is unsigned and is not offered for download on this site yet. You also need at least one model in your model folder; models you downloaded with the app are already there, because headless mode uses the same folder. On a Mac, install the engine first with brew install llama.cpp.

Quit the ModelDeck app before you start. The app and headless mode cannot both own the same ModelDeck folder; see The app and headless mode.

1. Unpack the archive

macOS

tar -xzf modeldeck-headless-darwin-arm64.tar.gz
xattr -dr com.apple.quarantine modeldeck-headless-darwin-arm64
./modeldeck-headless-darwin-arm64/bin/modeldeck --version

The xattr line clears the quarantine flag macOS puts on unsigned downloads.

Windows

Unzip modeldeck-headless-win32-x64.zip. It contains one folder. In PowerShell, from the folder you unzipped into:

.\modeldeck-headless-win32-x64\bin\modeldeck.cmd --version

Linux

tar -xzf modeldeck-headless-linux-x64.tar.gz
./modeldeck-headless-linux-x64/bin/modeldeck --version

The rest of this tutorial writes modeldeck for that command. Add the bin folder to your PATH, or type the full path.

Expected result

One line that starts with modeldeck, then the version, the build and your platform, for example modeldeck 1.4.1 (build 10) node v24.21.0 darwin-arm64.

2. Start serving

modeldeck serve

It runs in the foreground and keeps the terminal. Leave it open.

Expected result

ModelDeck is serving without a window. API: http://127.0.0.1:8099/v1, MCP: http://127.0.0.1:8098/mcp. Stop with Ctrl+C or "modeldeck stop". Log lines follow as things happen.

If you see a message that ModelDeck is already running for this folder, and the command exits

The app or another modeldeck serve owns the folder. Quit that one first, then run modeldeck serve again.

3. Look around from a second terminal

Every command other than serve talks to the ModelDeck that is running.

modeldeck status
modeldeck engines
modeldeck models

Expected result

status names the owner as headless with its process id, and shows API server: http://127.0.0.1:8099/v1 and no models loaded. engines lists each engine with yes under AVAILABLE when it can run. models prints a table of your models with the columns ID, NAME, ENGINE, GB and QUANT.

4. Load a model

Use any part of a model's name that matches only one model. Replace qwen with part of a name from your own list.

modeldeck load qwen --ctx 4096

The same memory check as the app runs first, then the command waits until the engine is ready.

Expected result

Loading <name> with Default (...)..., then ready on http://127.0.0.1:8099/v1 as <model id>. Note the model id at the end. modeldeck ps now shows the model with the state ready.

If you see a usage error that says the name matches more than one model

Type more of the name, or use the full id from the ID column of modeldeck models.

5. Send a request

Replace MODEL_ID with the id from the previous step.

macOS

curl http://127.0.0.1:8099/v1/chat/completions \
  -H 'content-type: application/json' \
  -d '{"model":"MODEL_ID","messages":[{"role":"user","content":"Reply with: headless ok"}]}'

Windows

$body = @{ model = "MODEL_ID"; messages = @(@{ role = "user"; content = "Reply with: headless ok" }) } | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri http://127.0.0.1:8099/v1/chat/completions -Method Post -ContentType "application/json" -Body $body

Linux

curl http://127.0.0.1:8099/v1/chat/completions \
  -H 'content-type: application/json' \
  -d '{"model":"MODEL_ID","messages":[{"role":"user","content":"Reply with: headless ok"}]}'

Expected result

A JSON reply whose message content is headless ok. The first terminal logs the request.

If you see an error that the model is already loaded, for an MLX model

An MLX model answers to the id default_model. Send that as model.

6. Unload and stop

modeldeck unload MODEL_ID
modeldeck stop
modeldeck status

Expected result

unload prints Unloading <name>. stop prints Stopping ModelDeck (pid ...), and the first terminal returns to its prompt. The last status says no ModelDeck is running for this folder and exits with code 4. No engine process is left behind.

Where to go next

These docs describe ModelDeck as of app commit 7d38f80, checked 2026-12-03. Features merged after the latest release are marked Coming in the next release.