v1

latestOpenAPI 3.1.0Apache-2.02026-07-13153158.0 KB
openai-compat

OpenAI-compatible chat completions (T41 wired)

Accepts the public OpenAI POST /v1/chat/completions request shape (system / user / assistant messages array) and dispatches to the function the operator has aliased to the requested model. The messages array is concatenated into a single role-tagged prompt string before dispatch (system: ...\nuser: ...\nassistant:).

Returns the standard OpenAI chat.completion envelope on success, or 404 model_not_found when the alias is unknown. Streaming framing matches /v1/completions, except the JSON delta uses the chat shape (choices[0].delta.content) and the object kind is chat.completion.chunk.

post/v1/chat/completions

Request body

modelstring
max_tokensinteger
temperaturenumber
streamboolean
ninteger
{"stackTrail":"components:schemas:ChatCompletionsRequest:properties:tools","oasType":"schema","type":"unknown","description":"OpenAI tool-calling array. Accepted on the wire for forward\ncompatibility but not yet honoured; v0.5 wires.\n"}
userstring

Response

Chat completion (or SSE stream when stream:true).

idstring required
object'chat.completion' required
createdinteger required
modelstring required