Skip to main content
GET https://api.raze.bot/stream/{channel} with the channel’s parameters in the query. The frames are the WebSocket’s, without an id; each one is an SSE event whose name is the frame type.
A comment line every 15 s keeps proxies from closing an idle stream. Before the stream starts, wrong parameters answer 400 JSON, a missing or unknown key 401 and a key over its limit 429. While the server is at capacity, a new stream answers 503 server_busy with Retry-After: 30 before it starts; streams already open keep running. Events carry no id: line, so a reconnect does not resume where the stream left off: it starts again with a fresh snapshot, which replaces what you hold.

Browser

EventSource cannot set headers: pass ?apiKey=. Because every event is named, onmessage never fires; listen to the types you want.
The error listener gets two things: a frame of type error (it has data) and the browser’s own connection error (no data). EventSource reconnects on its own after a network drop or when the stream ends, and the new stream starts with a fresh snapshot. It does not retry a refused stream (a 400, 401, 429 or 503): open a new EventSource after the wait, 30 s for a 503. On token, an error frame ends the stream (the token could not be read); close the EventSource then, or it reopens the stream and gets the same error again.

curl

URLs per channel

One stream is one channel. A page that needs several channels opens one EventSource each, and browsers allow only about six HTTP/1.1 connections per host: past two or three channels, use the WebSocket.