---
title: "Ollama-dialect chat (NDJSON stream) — successor: POST /v1/chat/completions"
method: POST
path: "/legacy/ollama/api/chat"
tags: ["Legacy: Ollama-compatible API"]
deprecated: true
---

# Ollama-dialect chat (NDJSON stream) — successor: POST /v1/chat/completions

`POST /legacy/ollama/api/chat`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/legacy/ollama/api/chat`
- Auth: HTTP bearer

> **Deprecated.**

Streams newline-delimited JSON deltas (application/x-ndjson, one object per line, terminal object carries done:true and stats); `"stream": false` long-polls the single terminal object. Dispatches through the same in-process inference seams as the OpenAI-compatible routes — same tier gate, same on-demand model load.

## Request body

- object
  - `model` string, required
  - `messages` object[], required
  - `stream` boolean
  - `tools` object[]
  - `format` unknown
  - `options` object: Sampler knobs (num_predict → max_tokens

## Response `200`

NDJSON delta stream; terminal object has done:true

## Other responses

- `404`: Model not found (pull guidance envelope)

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
