Guides
Streaming
Receive tokens incrementally over SSE.
Add "stream": true to the request body. The response is a Server-Sent Events stream of data: {...} lines, terminated by data: [DONE].
terminal.sh
curl -N https://api.sobatnetwork.com/v1/chat/completions \-H "Content-Type: application/json" \-H "Authorization: Bearer $SOBAT_API_KEY" \-d '{"model":"sobat/gpt-6-sol","stream":true,"messages":[{"role":"user","content":"Hi"}]}'
With the OpenAI SDK, simply pass stream: true and iterate over the incoming chunks.