POST /slippi/livestream
Connects to a Slippi livestream relay on the specified port to begin tracking live games.The port number where the Slippi relay is listening (typically 53742)
Request Body
Response
Returns a simple success response:200 OK
Example Request
Behavior
- If a connection already exists, it will be closed before creating a new one
- Connects to
127.0.0.1on the specified port - Automatically tracks game start, player deaths, and game end events
- Updates player scores when games complete (unless LRAS is detected)
- Integrates with OBS to switch scenes when configured
- Handles Zelda/Sheik transformations during gameplay
Automatic State Updates
When connected, the following data is automatically tracked:- Game Start: Character selections, ports, stocks, stage
- Stock Deaths: Remaining stocks for each player
- Game End: Winner, final stocks, game duration, stage
- Character Changes: Zelda ↔ Sheik transformations
Connection Events
The connection monitors for:- Disconnection: Automatically cleans up and sets
slippiConnectedto false - Errors: Handles connection errors gracefully
Notes
- Connection failures are handled silently and return
200 OK - LRAS (L+R+A+Start) detected games do not update scores
- Game results are stored in
state.slippi.gameResultsarray - The first game requires manual port assignment via the UI
POST /slippi/disconnect
Disconnects from the active Slippi livestream.Response
Returns a simple success response:200 OK
Example Request
Behavior
- Ends the active livestream connection if one exists
- Safe to call even if no connection is active
- Sets
slippiConnectedstate to false - Clears all game tracking data
State Structure
When connected, the Slippi state contains:Error Handling
Connection errors are handled gracefully:- Failed connections return
200 OKbut setslippiConnectedto false - Disconnection events trigger automatic cleanup
- State updates are delayed by 250ms to avoid conflicts with the UI