Streaming lets your app show a model's reply word by word as it is written, instead of waiting for the whole answer. For chat windows, trading dashboards and alerts, this makes the experience feel fast even when the answer is long.
How streaming works
The Jenvu API follows the familiar chat completions format. Send your request to https://jenvu.com/api/public/v1/chat/completions with "stream": true in the body. Instead of one JSON reply, the API sends a stream of small events (server-sent events). Each event carries the next piece of text, and the stream ends with a final [DONE] line.
curl https://jenvu.com/api/public/v1/chat/completions \
-H "Authorization: Bearer YOUR_JENVU_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"stream": true,
"messages": [{"role": "user", "content": "Summarise the London session for XAU/USD"}]
}'
Reading the stream in your app
Read the response body line by line. Every line that starts with data: holds a JSON chunk; append its text to what is already on screen. Stop when you receive data: [DONE].
- Keep a single buffer per reply so partial lines are joined correctly.
- Show a small typing indicator until the first chunk arrives.
- If the connection drops, show what you already received and let the user retry.
When to use it
Streaming is best for anything a person reads live: chat, explanations of a chart, or a written session recap. For background jobs, such as tagging many articles, a normal (non-streamed) request is simpler to handle.
Pricing
Streamed and non-streamed requests cost the same: $3 per million tokens, on every model. You only pay for the tokens actually produced.
Model output is information, not financial advice. Always check important decisions yourself.