ClientsOllama, OpenAI and Anthropic

The model server answers three APIs on 127.0.0.1:36434, so a tool that already talks to Ollama, OpenAI or Anthropic can use your Mac's models. Change one address and you're done.

macOS 1.1.4127.0.0.1:364342 min read
On this page

What you need

  • RoachNet 1.1 running, with at least one model installed. List them with /v1/models or /api/tags.
  • A client on the same Mac. The server listens on loopback only and takes no token, like Ollama.
Terminal
MODELS=http://127.0.0.1:36434
curl -s "$MODELS/api/tags"

The examples below use qwen2.5-coder:7b; use a name from that list.

Ollama format

Terminal
curl -s "$MODELS/api/chat" -d '{
  "model": "qwen2.5-coder:7b",
  "messages": [{"role": "user", "content": "Three facts about Apple Silicon."}],
  "stream": false
}'

Ollama clients usually read the address from OLLAMA_HOST. Set it to 127.0.0.1:36434, or enter http://127.0.0.1:36434 wherever the tool asks for an Ollama URL.

OpenAI format

Terminal
curl -s "$MODELS/v1/chat/completions" \
  -H "content-type: application/json" \
  -d '{"model": "qwen2.5-coder:7b", "messages": [{"role": "user", "content": "Three facts about Apple Silicon."}]}'

In an OpenAI client, set the base URL to http://127.0.0.1:36434/v1. The server doesn't check API keys, so any placeholder works where a client insists on one. /v1/responses, /v1/completions, /v1/embeddings and /v1/models answer too.

Anthropic format

Terminal
curl -s "$MODELS/v1/messages" \
  -H "content-type: application/json" \
  -d '{"model": "qwen2.5-coder:7b", "max_tokens": 256, "messages": [{"role": "user", "content": "Three facts about Apple Silicon."}]}'

In an Anthropic client, set the base URL to http://127.0.0.1:36434. /v1/messages/count_tokens counts with the model's own tokenizer.

Tools, structured output and thinking

  • Tool calls come back in each API's own shape, and a stream never shows half a call as text. Forcing a tool (tool_choice set to required or a named tool, or Anthropic's any or tool) holds the reply to that tool's parameters.
  • Structured output is enforced while the model writes. Send format (Ollama) or response_format with json_schema (OpenAI), and the reply is valid JSON that matches the schema.
  • Thinking can be turned off for models that reason first: think: false (Ollama), reasoning_effort: "none" (OpenAI) or a disabled thinking block (Anthropic).
  • Made models. /api/create makes a new model from an installed one or a local .gguf, with its own system prompt and parameters. The weights are linked, not copied.

Plan models

When Claude or ChatGPT plans are turned on, claude:… and codex:… models are listed by /api/tags and /v1/models and answer on these APIs too. Those replies come from your own Claude Code or Codex CLI, not from your Mac's GPU. See Plans as models.

Limits

  • Only clients on the same Mac. A web page in a browser is refused unless its origin is loopback or an app scheme (app://, file://, tauri://, vscode-webview://).
  • Text only. A request that carries pictures, audio, video or files gets a 400 that says so: Ollama images, OpenAI image, audio, video and file parts, and Anthropic image and document blocks. Before 1.1.3 they were dropped without a word.
  • The model must be one RoachInference reads: Llama, Mistral, Qwen2 or Qwen3.
Checked against v1.1.4 · 5 November 2026
esc
↑ ↓ move↵ openesc closeSearches on your device. Nothing is sent anywhere.