Skip to navigation

Ollama-compatible chat

View as Markdown

Send an Ollama-compatible chat request to the local PAIR proxy. PAIR forwards the request to one eligible node running a compatible engine with the requested model available. With streaming enabled the upstream engine returns newline-delimited JSON chunks; the final chunk sets done to true.

Request

This endpoint expects an object.
modelstringRequired
Model name that must be available on an eligible node.
messageslist of objectsRequired
streambooleanOptionalDefaults to true

When true (the Ollama default), the response is streamed as newline-delimited JSON chunks.

Response headers

X-PAIR-Served-BystringOptional
Stable host UUID of the node that served the request.

Response

Chat response from the serving node.
modelstring
messageobject
doneboolean
created_atdatetimeOptional
done_reasonstringOptional
total_durationlongOptional
Total request time in nanoseconds, as reported by the engine.