Skip to navigation

OpenAI-compatible chat completion

View as Markdown

Send an OpenAI-compatible chat completion request to the local PAIR proxy. PAIR forwards the entire request to a single eligible node and returns the engine’s response.

Request

This endpoint expects an object.
modelstringRequired
Model name that must be available on an eligible node.
messageslist of objectsRequired
streambooleanOptionalDefaults to false
temperaturefloatOptional
max_tokensintegerOptional>=1

Response headers

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

Response

Chat completion from the serving node.
idstring
objectstring
createdlong
Unix timestamp in seconds.
modelstring
choiceslist of objects
usageobjectOptional