Streaming Output

Set stream: true to enable streaming output. Responses are returned as Server-Sent Events (SSE).

SSE Data Format

Each data chunk starts with data: and contains a JSON object with incremental content (delta).

End Marker

Streaming response ends with data: [DONE].

Stream Chunk Example

SSE
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1700000000,"model":"deepseek-v4-flash","choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}]}

data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1700000000,"model":"deepseek-v4-flash","choices":[{"index":0,"delta":{"content":"!"},"finish_reason":null}]}

data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1700000000,"model":"deepseek-v4-flash","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: [DONE]
API Documentation - Ciyuano | Ciyuano