Inference

Create chat completion

OpenAI-compatible chat completion. Supports streaming via stream: true (returns SSE with data: {...} lines). The model field must match a stem from /v1/models.

post/v1/chat/completions

Request

  • Base URL: http://localhost:9998
  • URL: http://localhost:9998/v1/chat/completions
  • Auth: HTTP bearer

Request body

modelstring required

Model stem from /v1/models

streamboolean
temperaturenumber
top_pnumber
max_tokensinteger

Response

Chat completion response. When stream: false, returns a single JSON object. When stream: true, returns text/event-stream with data: {...} lines ending with data: [DONE].

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

Changes

No recorded changes to this operation across all 1 revision of this API.