Certain API endpoints stream responses by default, such asDocumentation Index
Fetch the complete documentation index at: https://docs.ollama.com/llms.txt
Use this file to discover all available pages before exploring further.
/api/generate. These responses are provided in the newline-delimited JSON format (i.e. the application/x-ndjson content type). For example:
Disabling streaming
Streaming can be disabled by providing{"stream": false} in the request body for any endpoint that support streaming. This will cause responses to be returned in the application/json format instead:
When to use streaming vs non-streaming
Streaming (default):- Real-time response generation
- Lower perceived latency
- Better for long generations
- Simpler to process
- Better for short responses, or structured outputs
- Easier to handle in some applications

