Retrieve Channel Information
You can retrieve information about a channel like this:
fetch(`https://kit.rtirl.com/api/${channelId}/${fieldName}`);Where ${fieldName} can be:
activeAgentIdobsControlLevelseems brokenobsRecordingobsReplaybufferobsSceneobsScenesobsSourceActiveobsSourceVisibleobsStreamingobsTransitionobsTransitionsobsVirtualcamupdatedAt
And ${channelId} is the channel id generated when opening the web app. This is a UUID. See how it’s generated here
See more about the response here.
Execute actions
Currently, the API only supports these commands:
- Replay Buffer
saveReplayBufferstartReplayBuffer
- Streaming
startStreamingstopStreaming
- Recording
startRecordingpauseRecordingunpauseRecording
- Virtual Camera
startVirtualcamstopVirtualcam
- Scene Selection
setCurrentScene
- Transition Selection
setCurrentTransition
The general format to perform an action is like this:
fetch(`https://kit.rtirl.com/api/${channelId}/${command}`, {
"headers": {
"content-type": "application/json",
},
"body": "[]",
"method": "POST",
});Note: The body currently has to be present, so for most commands it will be []
The only actions that currently support payloads are setCurrentScene and setCurrentTransition. These would look like:
fetch(`https://kit.rtirl.com/api/${channelId}/setCurrentTransition`, {
"headers": {
"content-type": "application/json",
"body": "[\"Cut\"]",
"method": "POST",
});The body must be one of the options returned in the matching fields, so for this example the response to the request for the field obsTransitions was ["Cut", "Fade"], so those would be the possibilities for the body.