Start a new conversation and stream the assistant reply (SSE).
const url = 'https://api.tradr.cloud/api/advisor/conversations/new/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/new/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" }'New-conversation variant of the streaming endpoint. The provider and model are seeded from the caller’s stored provider key. Same SSE frame shapes and rate limit (30 / 60 s) as the existing-conversation endpoint.
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.
Request body exceeds the byte-cap floor (PAYLOAD_TOO_LARGE).
Stream in progress or rate limit.
Provider-key decryption failure.