WebSocket Overview
WebSocket connections enable real-time streaming for both sync and async tiers.
Connection
const ws = new WebSocket('wss://sync.render.weyl.ai/ws');// orconst ws = new WebSocket('wss://async.render.weyl.ai/ws');Authentication
Authenticate after connection opens:
ws.onopen = () => { ws.send(JSON.stringify({ type: 'auth', token: 'wyl_sk_prod_1234567890abcdef' }));};Message Format
All messages are JSON:
interface Message { type: string; [key: string]: unknown;}Use Cases
Sync Tier WebSocket
- Progressive frame streaming
- Real-time progress updates
- Interactive generation
Async Tier WebSocket
- Job progress events
- Queue position updates
- Completion notifications
Next Steps
- Sync Tier WebSocket - Frame streaming
- Async Tier WebSocket - Job events
- Protocol Reference - Message specs