Vouch AI
Stream message
Send a message and receive the AI reply as a stream of events.
POST
Same behaviour as Send message, but the AI reply is streamed back token-by-token for real-time rendering. The user message and the final AI message are still persisted to the chat.
Requires a positive wallet balance. Billed at ₦100 per 1,000 tokens consumed by the request, and rate limited to 10 AI requests per minute.
Path parameters
The chat session ID.
Body
Your message, 1–4000 characters.
Response format
The response is sent withContent-Type: application/x-ndjson. The body is a sequence of newline-delimited JSON objects, one per line. Each object has the shape { "type": <string>, "data": <any> }. This is NDJSON, not Server-Sent Events, so read it with a streaming body reader rather than EventSource:
Event types
type | data | Description |
|---|---|---|
text | string | A text fragment of the reply. Concatenate all text events for the full message. |
tool_call | { toolName, args } | The AI invoked a tool (e.g. web search) mid-response. Informational. |
grounding_sources | { groundingChunks, searchEntryPoint? } | Sources used to ground the answer. Emitted once, before finish, only when present. |
finish | { complete: true } | The stream is complete. |
error | { message } | An error occurred mid-stream. The connection then closes. |
