Qloud Docs

Streaming

Receive tokens as Server-Sent Events while the model generates them.

Set stream to true to receive Server-Sent Events. The stream ends with data: [DONE].

Add "stream_options": {"include_usage": true} to receive token usage in the final chunk before [DONE].

curl -N https://api.qloud.sh/v1/chat/completions \
  -H "Authorization: Bearer $QLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "DeepSeek-V4-Flash-0731",
    "stream": true,
    "stream_options": {"include_usage": true},
    "messages": [{"role": "user", "content": "Count to five."}]
  }'

If the connection drops mid-stream you are billed for the tokens delivered before it dropped.