Stream an assistant reply for an existing conversation (SSE).
const url = 'https://api.tradr.cloud/api/advisor/conversations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages/stream';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"attachments":[{"dataBase64":"example","format":"png","type":"image"}],"clientMessageId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","personaId":"example","text":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tradr.cloud/api/advisor/conversations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages/stream \ --header 'Content-Type: application/json' \ --data '{ "attachments": [ { "dataBase64": "example", "format": "png", "type": "image" } ], "clientMessageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "personaId": "example", "text": "example" }'Sends a user message to an existing conversation and streams the assistant reply as Server-Sent Events. Frames: event: token ({delta}), event: usage ({promptTokens, completionTokens}), event: done ({messageId, deduped?, source?}), event: error ({code, upstreamStatus, message}). Pre-stream failures return a JSON error envelope (no SSE) with the appropriate HTTP status. Rate limited to 30 requests per 60 s.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Responses
Section titled “Responses”Server-Sent Event stream.
Validation / image / cap error envelope (IMAGE_TOO_LARGE above the per-image byte cap).
Platform billing refusal — INSUFFICIENT_CREDITS / ALLOWANCE_EXHAUSTED (allowance model + allowance and credits exhausted) / INSUFFICIENT_CREDITS_ALLOWANCE_AVAILABLE (non-allowance model + free allowance turns remain) / MODEL_NOT_AVAILABLE / BILLING_NOT_AVAILABLE.
Monthly advisor image quota exceeded for the user’s tier (TIER_LIMIT_IMAGES) — text-only turns unaffected.
Conversation not found (or not owned).
Request body exceeds the byte-cap floor (PAYLOAD_TOO_LARGE).
Stream in progress
Provider-key decryption failure.