The Anannas API supports streaming responses from any model, including OpenAI and Anthropic. This is useful for building chat interfaces where the UI updates as the model generates output in real time.To enable streaming, set the stream parameter to true in your request. Instead of waiting for the full completion, the API will stream chunks of the response.
{ "model": "openai/gpt-3.5-turbo", "messages": [ { "role": "user", "content": "Write a short story about a robot learning to paint." } ], "stream": true, "max_tokens": 500}