v1
latestOpenAPI 3.1.0Apache-2.02026-07-13153158.0 KBopenai-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
Response
Chat completion (or SSE stream when stream:true).