mere.run Local API

This page reflects the public Swift package. The API is not hosted by mere.run; it runs on the user's Mac after starting mere.run api serve.

Start the server

swift run mere.run api serve --engine text-chat-gemma4

Network-exposed mode

export MERERUN_API_KEY=change-me
swift run mere.run api serve \
  --engine text-chat-gemma4 \
  --host 0.0.0.0 \
  --port 11434 \
  --api-key "$MERERUN_API_KEY" \
  --rate-limit-per-minute 120

Routes

GET  /health
GET  /v1/models
POST /v1/chat/completions

/v1/models and /v1/chat/completions accept Authorization: Bearer <key> when the local operator starts the server with --api-key or MERERUN_API_KEY. This is API-key auth, not OAuth/OIDC.

Discovery