curl -N -X POST https://api.vouchmark.com/v1/chat/chat_aBcD.../stream \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"message": "Summarise my monitoring alerts from last week"}'
Vouch AI
Stream message
Send a message and receive the AI reply as a stream of events.
POST
/
v1
/
chat
/
{chatId}
/
stream
curl -N -X POST https://api.vouchmark.com/v1/chat/chat_aBcD.../stream \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"message": "Summarise my monitoring alerts from last week"}'
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
string
required
The chat session ID.
Body
string
required
Your message, 1–4000 characters.
curl -N -X POST https://api.vouchmark.com/v1/chat/chat_aBcD.../stream \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"message": "Summarise my monitoring alerts from last week"}'
Response format
The response is sent with Content-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:
{"type":"text","data":"Based on"}{"type":"text","data":" your monitoring"}{"type":"text","data":" data from the past week..."}{"type":"grounding_sources","data":{"groundingChunks":[{"web":{"uri":"https://...","title":"FIRS"}}]}}{"type":"finish","data":{"complete":true}}
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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Vouchmark","description":"Verify Nigerian businesses, monitor counterparty risk, and prove trust on the web.","colors":{"primary":"#6466AE","light":"#8B8DC4","dark":"#45478B"},"logo":{"light":"https://mintcdn.com/vouchmark/vyDGY2ihe3oA_T8z/logo/logo.png?fit=max\u0026auto=format\u0026n=vyDGY2ihe3oA_T8z\u0026q=85\u0026s=4b7f5d3a985c0d54dda118e5f3eb7c3c","dark":"https://mintcdn.com/vouchmark/vyDGY2ihe3oA_T8z/logo/logo.png?fit=max\u0026auto=format\u0026n=vyDGY2ihe3oA_T8z\u0026q=85\u0026s=4b7f5d3a985c0d54dda118e5f3eb7c3c","href":"https://vouchmark.com"},"favicon":"https://mintcdn.com/vouchmark/vyDGY2ihe3oA_T8z/favicon.png?fit=max\u0026auto=format\u0026n=vyDGY2ihe3oA_T8z\u0026q=85\u0026s=8ce46c42758c5a8875f8efd3bb924904","appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"mailto:support@vouchmark.com","label":"Support"}],"primary":{"type":"button","label":"Open Dashboard","href":"https://vouchmark.com"}},"footer":{"socials":{"x":"https://x.com/vouchmark","linkedin":"https://www.linkedin.com/company/vouchmark"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"browser","href":"https://vouchmark.com"},{"anchor":"Status","icon":"signal-bars","href":"https://status.vouchmark.com"},{"anchor":"Support","icon":"envelope","href":"mailto:support@vouchmark.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vouchmark","hasAudioNarration":false,"actualSubdomain":"vouchmark","customDomains":["docs.vouchmark.com"],"gitSource":{"type":"github","owner":"vouchmark-org","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae43def63718976c0ca212b","clientVersion":"0.0.4227","searchFilterCounts":[{"language":"default","tag":"API Reference","count":83},{"language":"default","tag":"Documentation","count":21},{"language":"default","tag":"Verifications","count":15},{"language":"default","tag":"Onboarding (KYB)","count":13},{"language":"default","tag":"Monitoring","count":9},{"language":"default","tag":"Vouch AI","count":9},{"language":"default","tag":"Core concepts","count":9},{"language":"default","tag":"Compliance","count":7},{"language":"default","tag":"Wallet \u0026 Billing","count":7},{"language":"default","tag":"Developers","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/vouch-ai/stream-message","slug":"/api-reference/vouch-ai/stream-message","pageMetadata":{"title":"Stream message","api":"POST /v1/chat/{chatId}/stream","description":"Send a message and receive the AI reply as a stream of events.","href":"/api-reference/vouch-ai/stream-message"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Send a message and receive the AI reply as a stream of events.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Same behaviour as `,_jsx(_components.a,{href:`/api-reference/vouch-ai/send-message`,children:`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.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`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.`})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsx(ParamField,{path:`chatId`,type:`string`,required:true,id:`param-chat-id`,children:_jsx(_components.p,{children:`The chat session ID.`})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`message`,type:`string`,required:true,id:`param-message`,children:_jsx(_components.p,{children:`Your message, 1–4000 characters.`})}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`response-format`,children:`Response format`}),`\n`,_jsxs(_components.p,{children:[`The response is sent with `,_jsx(_components.code,{children:`Content-Type: application/x-ndjson`}),`. The body is a sequence of newline-delimited JSON objects, one per line. Each object has the shape `,_jsx(_components.code,{children:`{ \"type\": \u003cstring>, \"data\": \u003cany> }`}),`. This is NDJSON, not Server-Sent Events, so read it with a streaming body reader rather than `,_jsx(_components.code,{children:`EventSource`}),`:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"text\",\"data\":\"Based on\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"text\",\"data\":\" your monitoring\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"text\",\"data\":\" data from the past week...\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"grounding_sources\",\"data\":{\"groundingChunks\":[{\"web\":{\"uri\":\"https://...\",\"title\":\"FIRS\"}}]}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"finish\",\"data\":{\"complete\":true}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`event-types`,children:`Event types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`data`})}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`A text fragment of the reply. Concatenate all `,_jsx(_components.code,{children:`text`}),` events for the full message.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tool_call`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ toolName, args }`})}),_jsx(_components.td,{children:`The AI invoked a tool (e.g. web search) mid-response. Informational.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`grounding_sources`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ groundingChunks, searchEntryPoint? }`})}),_jsxs(_components.td,{children:[`Sources used to ground the answer. Emitted once, before `,_jsx(_components.code,{children:`finish`}),`, only when present.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`finish`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ complete: true }`})}),_jsx(_components.td,{children:`The stream is complete.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ message }`})}),_jsx(_components.td,{children:`An error occurred mid-stream. The connection then closes.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`client-example`,children:`Client example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`29`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`29`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`/v1/chat/${chatId}/stream`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Authorization: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Bearer ${token}`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({ message: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` reader = response.body!.getReader();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` decoder = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TextDecoder();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` buffer = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { done, value } = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` reader.read();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (done) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`break`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` buffer += decoder.decode(value, { stream: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` lines = buffer.split(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\\\\n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` buffer = lines.pop() ?? `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` line `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` lines) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (!line.trim()) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`continue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event = JSON.parse(line);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (event.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` === `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appendToUI(event.data);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Stream message","api":"POST /v1/chat/{chatId}/stream","description":"Send a message and receive the AI reply as a stream of events.","href":"/api-reference/vouch-ai/stream-message"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,RequestExample,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Same behaviour as `,_jsx(_components.a,{href:`/api-reference/vouch-ai/send-message`,children:`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.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`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.`})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsx(ParamField,{path:`chatId`,type:`string`,required:true,id:`param-chat-id`,children:_jsx(_components.p,{children:`The chat session ID.`})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`message`,type:`string`,required:true,id:`param-message`,children:_jsx(_components.p,{children:`Your message, 1–4000 characters.`})}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -N -X POST https://api.vouchmark.com/v1/chat/chat_aBcD.../stream \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer $TOKEN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{\"message\": \"Summarise my monitoring alerts from last week\"}'`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`response-format`,children:`Response format`}),`\n`,_jsxs(_components.p,{children:[`The response is sent with `,_jsx(_components.code,{children:`Content-Type: application/x-ndjson`}),`. The body is a sequence of newline-delimited JSON objects, one per line. Each object has the shape `,_jsx(_components.code,{children:`{ \"type\": \u003cstring>, \"data\": \u003cany> }`}),`. This is NDJSON, not Server-Sent Events, so read it with a streaming body reader rather than `,_jsx(_components.code,{children:`EventSource`}),`:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"text\",\"data\":\"Based on\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"text\",\"data\":\" your monitoring\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"text\",\"data\":\" data from the past week...\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"grounding_sources\",\"data\":{\"groundingChunks\":[{\"web\":{\"uri\":\"https://...\",\"title\":\"FIRS\"}}]}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"finish\",\"data\":{\"complete\":true}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`event-types`,children:`Event types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`data`})}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`A text fragment of the reply. Concatenate all `,_jsx(_components.code,{children:`text`}),` events for the full message.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tool_call`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ toolName, args }`})}),_jsx(_components.td,{children:`The AI invoked a tool (e.g. web search) mid-response. Informational.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`grounding_sources`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ groundingChunks, searchEntryPoint? }`})}),_jsxs(_components.td,{children:[`Sources used to ground the answer. Emitted once, before `,_jsx(_components.code,{children:`finish`}),`, only when present.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`finish`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ complete: true }`})}),_jsx(_components.td,{children:`The stream is complete.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ message }`})}),_jsx(_components.td,{children:`An error occurred mid-stream. The connection then closes.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`client-example`,children:`Client example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`29`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`29`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`/v1/chat/${chatId}/stream`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Authorization: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Bearer ${token}`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({ message: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` reader = response.body!.getReader();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` decoder = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TextDecoder();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` buffer = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { done, value } = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` reader.read();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (done) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`break`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` buffer += decoder.decode(value, { stream: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` lines = buffer.split(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\\\\n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` buffer = lines.pop() ?? `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` line `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` lines) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (!line.trim()) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`continue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event = JSON.parse(line);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (event.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` === `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appendToUI(event.data);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Stream message","api":"POST /v1/chat/{chatId}/stream","description":"Send a message and receive the AI reply as a stream of events.","href":"/api-reference/vouch-ai/stream-message"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Path parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Response format","slug":"response-format","depth":2,"children":[{"title":"Event types","slug":"event-types","depth":3,"children":[]}]},{"title":"Client example","slug":"client-example","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -N -X POST https://api.vouchmark.com/v1/chat/chat_aBcD.../stream \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -H \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Authorization: Bearer $TOKEN\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -H \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> -d \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'{\"message\": \"Summarise my monitoring alerts from last week\"}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Stream message","path":"/v1/chat/{chatId}/stream","method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{"chatId":{"schema":[{"type":"string","description":"The chat session ID.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"message":[{"type":"string","description":"Your message, 1–4000 characters.","required":true}]}}],"examples":{"example":{"value":{"message":"\u003cstring>"}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"vouchmark","siteName":"Vouchmark","title":"Stream message - Vouchmark","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-27T23:31:24.059Z","originalFileLocation":"api-reference/vouch-ai/stream-message.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Send a message and receive the AI reply as a stream of events.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Vouchmark\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Stream message - Vouchmark\">\u003cmeta data-mint-head property=\"og:description\" content=\"Send a message and receive the AI reply as a stream of events.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Vouchmark\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vouchmark.mintlify.site/_mintlify/api/og/v2?division=Vouch+AI\u0026amp;title=Stream+message\u0026amp;description=Send+a+message+and+receive+the+AI+reply+as+a+stream+of+events.\u0026amp;theme=537dc3d63a6ec063e2d1a23f\u0026amp;signature=547f5f2ec588122e91f2280c3e624c086e7763acb1478baa63f3b622db072f59\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Stream message - Vouchmark\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Send a message and receive the AI reply as a stream of events.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vouchmark.mintlify.site/_mintlify/api/og/v2?division=Vouch+AI\u0026amp;title=Stream+message\u0026amp;description=Send+a+message+and+receive+the+AI+reply+as+a+stream+of+events.\u0026amp;theme=537dc3d63a6ec063e2d1a23f\u0026amp;signature=547f5f2ec588122e91f2280c3e624c086e7763acb1478baa63f3b622db072f59\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/vouchmark/oiIZI56Q3NT85JaQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Vouchmark\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6466AE\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/vouch-ai/stream-message.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vouchmark.com/#organization\",\"name\":\"Vouchmark\",\"url\":\"https://docs.vouchmark.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vouchmark/vyDGY2ihe3oA_T8z/logo/logo.png?fit=max\u0026auto=format\u0026n=vyDGY2ihe3oA_T8z\u0026q=85\u0026s=4b7f5d3a985c0d54dda118e5f3eb7c3c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vouchmark.com#website\",\"name\":\"Vouchmark\",\"url\":\"https://docs.vouchmark.com\",\"publisher\":{\"@id\":\"https://docs.vouchmark.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message#webpage\",\"url\":\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message\",\"name\":\"Stream message\",\"description\":\"Send a message and receive the AI reply as a stream of events.\",\"dateModified\":\"2026-06-27T23:31:24.059Z\",\"isPartOf\":{\"@id\":\"https://docs.vouchmark.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Vouch AI\",\"item\":\"https://docs.vouchmark.com/api-reference/vouch-ai/new-chat\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Stream message\",\"item\":\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message#apireference\",\"headline\":\"Stream message\",\"name\":\"Stream message\",\"description\":\"Send a message and receive the AI reply as a stream of events.\",\"url\":\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vouchmark.com/api-reference/vouch-ai/stream-message#webpage\"},\"dateModified\":\"2026-06-27T23:31:24.059Z\",\"publisher\":{\"@id\":\"https://docs.vouchmark.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vouchmark.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Vouchmark\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Vouchmark\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/vouch-ai/stream-message.md","siteName":"Vouchmark","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"browser","href":"https://vouchmark.com"},{"anchor":"Status","icon":"signal-bars","href":"https://status.vouchmark.com"},{"anchor":"Support","icon":"envelope","href":"mailto:support@vouchmark.com"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API overview","href":"/api-reference/introduction"}]},{"group":"Auth","pages":[{"title":"Sign up","api":"POST /v1/signup","href":"/api-reference/auth/signup"},{"title":"Log in","api":"POST /v1/login","href":"/api-reference/auth/login"},{"title":"Refresh token","api":"POST /v1/refresh-token","href":"/api-reference/auth/refresh-token"},{"title":"Log out","api":"POST /v1/logout","href":"/api-reference/auth/logout"}]},{"group":"Companies","pages":[{"title":"List my companies","api":"GET /v1/dashboard/my-companies","href":"/api-reference/companies/list"},{"title":"Get a company","api":"GET /v1/dashboard/company-details?companyId={companyId}","href":"/api-reference/companies/get"},{"title":"Edit a company","api":"POST /v1/edit-company/{companyId}","href":"/api-reference/companies/edit"},{"title":"Resolve FIRS TIN","api":"POST /v1/check-firstin","href":"/api-reference/companies/check-firs-tin"}]},{"group":"Verifications","pages":[{"title":"Verify TIN (upload TCC)","api":"POST /v1/verifyTin","href":"/api-reference/verifications/verify-tin"},{"title":"Verify JTB TIN","api":"POST /v1/verifyJtbTin","href":"/api-reference/verifications/verify-jtb-tin"},{"title":"Verify utility bill","api":"POST /v1/verifyBill","href":"/api-reference/verifications/verify-bill"},{"title":"Verify utility bill (image)","api":"POST /v1/verify-utility-bill/image","href":"/api-reference/verifications/verify-bill-image"},{"title":"Verify utility bill (manual)","api":"POST /v1/verify-utility-bill/manual","href":"/api-reference/verifications/verify-bill-manual"},{"title":"Verify CAC documents","api":"POST /v1/verifyCacAndReport","href":"/api-reference/verifications/verify-cac"},{"title":"Verify one CAC document","api":"POST /v1/verifyCacDocument","href":"/api-reference/verifications/verify-cac-document"},{"title":"Get CAC verification status","api":"GET /v1/cacVerificationStatus/{companyId}","href":"/api-reference/verifications/cac-status"},{"title":"Check verification progress","api":"POST /v1/checkVerificationProgress","href":"/api-reference/verifications/check-progress"},{"title":"Physical address verification","api":"POST /v1/physicalAddress","href":"/api-reference/verifications/physical-address"}]},{"group":"Onboarding (KYB)","pages":[{"title":"Module catalog","api":"GET /v1/kyb/modules","href":"/api-reference/onboarding/module-catalog"},{"title":"List widgets","api":"GET /v1/kyb/widgets","href":"/api-reference/onboarding/list-widgets"},{"title":"Create widget","api":"POST /v1/kyb/widgets","href":"/api-reference/onboarding/create-widget"},{"title":"Get widget","api":"GET /v1/kyb/widgets/{id}","href":"/api-reference/onboarding/get-widget"},{"title":"Update widget","api":"PATCH /v1/kyb/widgets/{id}","href":"/api-reference/onboarding/update-widget"},{"title":"Set widget status","api":"PATCH /v1/kyb/widgets/{id}/status","href":"/api-reference/onboarding/set-widget-status"},{"title":"Delete widget","api":"DELETE /v1/kyb/widgets/{id}","href":"/api-reference/onboarding/delete-widget"},{"title":"Widget cost estimate","api":"GET /v1/kyb/widgets/{id}/estimate","href":"/api-reference/onboarding/cost-estimate"},{"title":"List applicants","api":"GET /v1/kyb/applicants","href":"/api-reference/onboarding/list-applicants"},{"title":"Get applicant","api":"GET /v1/kyb/applicants/{applicantId}","href":"/api-reference/onboarding/get-applicant"},{"title":"Create applicant","api":"POST /v1/kyb/widgets/{id}/applicants","href":"/api-reference/onboarding/create-applicant"},{"title":"Run module","api":"POST /v1/kyb/applicants/{applicantId}/modules/{moduleId}/run","href":"/api-reference/onboarding/run-module"},{"title":"Submit applicant","api":"POST /v1/kyb/applicants/{applicantId}/submit","href":"/api-reference/onboarding/submit-applicant"}]},{"group":"Widget Embed (Runtime)","pages":[{"title":"Get embed config","api":"GET /v1/widget/embed/config","href":"/api-reference/onboarding/embed-config"},{"title":"Create embed session","api":"POST /v1/widget/embed/sessions","href":"/api-reference/onboarding/create-session"},{"title":"Resume embed session","api":"GET /v1/widget/embed/sessions/{sessionId}","href":"/api-reference/onboarding/resume-session"},{"title":"Save session answers","api":"PATCH /v1/widget/embed/sessions/{sessionId}/answers","href":"/api-reference/onboarding/save-answers"},{"title":"Upload session attachment","api":"POST /v1/widget/embed/sessions/{sessionId}/uploads","href":"/api-reference/onboarding/upload-attachment"},{"title":"Submit embed session","api":"POST /v1/widget/embed/sessions/{sessionId}/submit","href":"/api-reference/onboarding/submit-session"}]},{"group":"Trust Badge","pages":[{"title":"Verify a badge token","api":"GET /v1/trust-badge/verify","href":"/api-reference/trust-badge/verify"},{"title":"Get my badge","api":"GET /v1/trust-badge/my-badge","href":"/api-reference/trust-badge/my-badge"}]},{"group":"Monitoring","pages":[{"title":"List monitored vendors","api":"GET /v1/monitoring/vendors","href":"/api-reference/monitoring/list-vendors"},{"title":"Get vendor profile","api":"GET /v1/monitoring/vendors/{vendorId}","href":"/api-reference/monitoring/vendor-profile"},{"title":"List vendor events","api":"GET /v1/monitoring/vendors/{vendorId}/events","href":"/api-reference/monitoring/vendor-events"},{"title":"Vendor score history","api":"GET /v1/monitoring/vendors/{vendorId}/score-history","href":"/api-reference/monitoring/score-history"},{"title":"Media mentions","api":"GET /v1/monitoring/media-mentions","href":"/api-reference/monitoring/media-mentions"},{"title":"List alerts","api":"GET /v1/monitoring/alerts","href":"/api-reference/monitoring/alerts"},{"title":"Add to watchlist","api":"POST /v1/monitoring/vendors/watchlist","href":"/api-reference/monitoring/add-to-watchlist"},{"title":"Remove from watchlist","api":"DELETE /v1/monitoring/vendors/watchlist/{vendorId}","href":"/api-reference/monitoring/remove-from-watchlist"},{"title":"Get watchlist capacity","api":"GET /v1/monitoring/watchlist/capacity","href":"/api-reference/monitoring/watchlist-limits"}]},{"group":"Investigations","pages":[{"title":"List investigation reports","api":"GET /v1/investigation/reports","href":"/api-reference/investigations/list-reports"},{"title":"Get investigation report","api":"GET /v1/investigation/reports/{reportId}","href":"/api-reference/investigations/get-report"}]},{"group":"Disputes","pages":[{"title":"List disputes","api":"GET /v1/disputes","href":"/api-reference/disputes/list-disputes"},{"title":"Submit dispute","api":"POST /v1/disputes","href":"/api-reference/disputes/submit-dispute"},{"title":"Get dispute","api":"GET /v1/disputes/{disputeId}","href":"/api-reference/disputes/get-dispute"}]},{"group":"Vouch AI","pages":[{"title":"Start new chat","api":"POST /v1/chat/new","href":"/api-reference/vouch-ai/new-chat"},{"title":"Send message","api":"POST /v1/chat/{chatId}/message","description":"Send a message in a Vouch AI conversation and get the AI reply.","href":"/api-reference/vouch-ai/send-message"},{"title":"Stream message","api":"POST /v1/chat/{chatId}/stream","href":"/api-reference/vouch-ai/stream-message"},{"title":"Chat history","api":"GET /v1/chat/history","description":"List your Vouch AI conversations.","href":"/api-reference/vouch-ai/chat-history"},{"title":"Get chat","api":"GET /v1/chat/{chatId}","href":"/api-reference/vouch-ai/get-chat"},{"title":"Rename chat","api":"PATCH /v1/chat/{chatId}/title","href":"/api-reference/vouch-ai/rename-chat"},{"title":"Delete chat","api":"DELETE /v1/chat/{chatId}","href":"/api-reference/vouch-ai/delete-chat"},{"title":"Quick chat","api":"POST /v1/chat/quick","href":"/api-reference/vouch-ai/quick-chat"},{"title":"AI company overview","api":"POST /v1/company/ai-overview","href":"/api-reference/vouch-ai/ai-overview"}]},{"group":"Compliance","pages":[{"title":"List obligations","api":"GET /v1/compliance/obligations","href":"/api-reference/compliance/list-obligations"},{"title":"Upcoming obligations","api":"GET /v1/compliance/obligations/upcoming","href":"/api-reference/compliance/upcoming"},{"title":"Create obligation","api":"POST /v1/compliance/obligations","href":"/api-reference/compliance/create-obligation"},{"title":"Update obligation","api":"PATCH /v1/compliance/obligations/{obligationId}","href":"/api-reference/compliance/update-obligation"},{"title":"Complete obligation","api":"POST /v1/compliance/obligations/{obligationId}/complete","href":"/api-reference/compliance/complete-obligation"},{"title":"Delete obligation","api":"DELETE /v1/compliance/obligations/{obligationId}","href":"/api-reference/compliance/delete-obligation"},{"title":"Seed obligations","api":"POST /v1/compliance/seed","href":"/api-reference/compliance/seed"}]},{"group":"Wallet \u0026 Billing","pages":[{"title":"Get wallet","api":"GET /v1/wallet","href":"/api-reference/wallet/get-wallet"},{"title":"List transactions","api":"GET /v1/wallet/transactions","href":"/api-reference/wallet/transactions"},{"title":"Top up wallet","api":"POST /v1/wallet/topup","href":"/api-reference/wallet/topup"},{"title":"Verify top-up","api":"GET /v1/wallet/topup/verify","href":"/api-reference/wallet/verify-topup"},{"title":"Update auto top-up","api":"PATCH /v1/wallet/auto-top-up","href":"/api-reference/wallet/auto-topup"},{"title":"Update threshold","api":"PATCH /v1/wallet/threshold","href":"/api-reference/wallet/threshold"},{"title":"Pricing rates","api":"GET /v1/wallet/pricing-rates","href":"/api-reference/wallet/pricing-rates"}]},{"group":"Developers","pages":[{"title":"List API keys","api":"GET /v1/developers/api-keys","href":"/api-reference/developers/list-api-keys"},{"title":"Rotate API key","api":"POST /v1/developers/api-keys/rotate","href":"/api-reference/developers/rotate-api-key"},{"title":"List webhooks","api":"GET /v1/developers/webhooks","href":"/api-reference/developers/list-webhooks"},{"title":"Create webhook","api":"POST /v1/developers/webhooks","href":"/api-reference/developers/create-webhook"},{"title":"Rotate webhook secret","api":"POST /v1/developers/webhooks/{id}/rotate-secret","href":"/api-reference/developers/rotate-webhook-secret"},{"title":"Delete webhook","api":"DELETE /v1/developers/webhooks/{id}","href":"/api-reference/developers/delete-webhook"}]}]}]},"basePath":"","title":"Stream message - Vouchmark","deploymentId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","buildId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CrDfRf61.js","snippetPresets-Dv-cOUrx.js","utils-BUTreAgv.js","style-to-object-BY3JEAdk.js","utils-wsznt9RM.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-DEsMlaPy.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DontW4xJ.js","_Uint8Array-pP7X6_RM.js","isObject-FP1Yky1u.js","ApiExamples-CU_aGGP0.js","usePlaygroundInputsStore-7dNmUIbS.js","shallow-fTtruD8x.js","isEqual-BRfNFpSD.js","CodeSnippets-52884wUJ.js","CodeSnippet-eoRjC4Le.js","getApiPlaygroundDisplay-CZyAPlR2.js","Page-Cr9IwkK7.js","DynamicMarkdown-NFqqduU7.js","SectionHeading-DQ-mJoAt.js","icon-DXTBUt6s.js","MethodPill-2v-b3js5.js","getPastedJson-v_8Y1_4v.js","DuplicateIcon-DXIkhZIo.js","createIcon-DRpYuPZs.js","axios-CsQoIw0U.js"]}