API reference
Streaming
Consume chat-completion output as Server-Sent Events.
Set stream to true to request an event stream. The response uses text/event-stream; read each data: record until the terminal data: [DONE] record. A disconnect can happen after partial output, so treat a dropped stream as an incomplete response.
curl --no-buffer --fail-with-body "$KISCH_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $KISCH_API_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg model "$KISCH_MODEL" '{model:$model,messages:[{role:"user",content:"Count from one to three."}],stream:true}')"Streaming availability depends on the configured upstream model and gateway. The response may contain multiple chunks; do not assume each chunk contains a complete word, sentence, or JSON value. Usage in the final stream chunk is not promised by this API contract.