Skip to content
SETU by SUPREME AI

Models and voice

Streaming

Server-Sent Events in the OpenAI format: data lines, a usage chunk and [DONE].

How it works

  • Set "stream": true. The response is text/event-stream.
  • Each event is a line starting with data: and an OpenAI chat.completion.chunk.
  • The stream ends with data: [DONE].
  • When the provider reports usage, a final chunk carries it; billing uses it.
  • If the client disconnects, the call is billed for what was used so far.
curl -N https://setu.supremeai.services/api/setu/v1/chat/completions \
  -H "Authorization: Bearer $SETU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "quantum-lite",
    "stream": true,
    "messages": [{ "role": "user", "content": "Write a haiku about Kathmandu." }]
  }'

WebSockets

Not offered. Use Server-Sent Events.