Docs navigation
API documentation
The Streamrun REST API lets you control configurations and server instances via HTTP. Query configurations, launch instances, manage destinations, and control running streams programmatically. The API is currently in beta. Feedback is welcome at team@streamrun.com.
Authentication
All requests use the base URL https://streamrun.com and must be made over HTTPS. The API uses Bearer authentication. Create API keys on the API Keys page.
Authorization: Bearer <API_KEY>
Example: list configurations with cURL
curl -H "Authorization: Bearer <API_KEY>" https://streamrun.com/api/v1/configurations
Configurations
Build configurations in the Streamrun Editor or copy a template to your account. Avoid launching instances via the API while the configuration is open in the editor — concurrent changes may be applied out of order.
/api/v1/configurationsList all configurations.
/api/v1/configurations/{configurationId}Fetch a single configuration.
/api/v1/configurations/{configurationId}/instancesList all instances running this configuration.
/api/v1/configurations/{configurationId}/instancesLaunch one or more instances of a configuration. Without a payload, one instance with default settings is started. The response includes a Location header pointing to the instance request.
{
"numberOfInstances": 1,
"instanceSettings": [
{
"name": "Instance name",
"overrides": {
"htmloverlay-1": {"url": "https://example.com"},
"inputstream-1": {"pullUrl": "rtmp://customserver"},
"outputstream-1": {"destinations": ["destination-id"]}
}
}
]
}Response header: Location: /api/v1/instance-requests/{requestId}
/api/v1/configurations/{configurationId}/instancesSet all output destinations live or offline for all instances running this configuration.
{ "outputs": "LIVE" | "OFFLINE" }/api/v1/configurations/{configurationId}/instancesStop all running or queued instances for this configuration.
Instance requests
When you launch instances, an instance request is created. It starts in the QUEUED state and transitions to RUNNING once a server has been allocated.
/api/v1/instance-requests/{requestId}Fetch an instance request by ID to check its status.
Instances
Each instance is a server running a configuration. Possible states:
QUEUED
Waiting for an available server.
RUNNING
Live in production mode. Outputs can go live.
PREVIEW
Configuration is open in the Streamrun editor.
/api/v1/instancesList all instances.
/api/v1/instances/{instanceId}Fetch a single instance.
/api/v1/instancesStop all instances.
/api/v1/instances/{instanceId}Stop a specific instance.
/api/v1/instances/{instanceId}/restartRestart a specific instance.
/api/v1/instances/{instanceId}/overridesGet the current setting overrides for an instance.
/api/v1/instances/{instanceId}/overridesUpdate setting overrides for a running instance. Changes apply immediately.
{
"htmloverlay-1": {"url": "https://example.com", "visible": true},
"switch-1": {"activeInput": 2}
}Outputs
Manage the live state of output stream elements and their individual destinations.
/api/v1/instances/{id}/outputsList all output stream elements for a running instance with their current state.
{
"outputs": [
{
"id": "outputstream-1",
"type": "outputstream",
"health": "OK",
"state": {
"destinations": [
{ "id": "dest-1", "status": "LIVE" }
]
}
}
]
}/api/v1/instances/{id}/outputsSet all output destinations for an instance to LIVE or OFFLINE.
{ "desiredState": "LIVE" | "OFFLINE" }/api/v1/instances/{id}/outputs/{outputId}Set all destinations for a specific output element to LIVE or OFFLINE.
{ "desiredState": "LIVE" | "OFFLINE" }/api/v1/instances/{id}/outputs/{outputId}/destinations/{destinationId}Set a single destination within a specific output element to LIVE or OFFLINE.
{ "desiredState": "LIVE" | "OFFLINE" }Instance actions
Trigger runtime behavior on a specific element inside a running instance. Actions are asynchronous and return 202 Accepted on success.
/api/v1/instances/{instanceId}/actions{
"elementId": "string",
"action": "string",
"params": {}
}HTML Overlay
RELOAD_OVERLAYReload the web page shown as the overlay.
{ "elementId": "htmloverlay-1", "action": "RELOAD_OVERLAY" }Input Stream
START_PULLStart RTMP/SRT pull.
STOP_PULLStop RTMP/SRT pull.
Video Player
PLAYStart or resume playback. If stopped, starts from the beginning. If paused, resumes from current position.
PAUSEPause playback at the current position. Playback position is preserved.
STOPStop playback and reset position to the beginning.
RESTARTSet position to the beginning without changing playback state.
Destinations
Destinations are the platforms you stream to (Twitch, YouTube, custom RTMP, etc.). Use destination IDs as override settings when launching instances to control where each instance streams. Changes to destinations are saved but not applied to already-running instances.
/api/v1/destinationsList all destinations.
/api/v1/destinationsAdd a new destination.
{
"platform": "twitch",
"name": "My Twitch channel",
"streamKey": "live_..."
}| Field | Type | Required | Description |
|---|---|---|---|
| platform | string | Yes | Platform identifier, e.g. "twitch", "youtube", "kick" |
| name | string | Yes | Display name to identify the destination, e.g. channel name. |
| streamKey | string | Yes | Stream key used to authenticate the stream. Stored encrypted. |
/api/v1/destinations/{destinationId}Update an existing destination.
| Field | Type | Required | Description |
|---|---|---|---|
| platform | string | Yes | Platform identifier. |
| name | string | Yes | Display name. |
| streamKey | string | No | Updated stream key. Omit to keep the existing key. |
/api/v1/destinations/{destinationId}Delete a destination.