To close the stream, make a DELETE request to this endpoint. This will close the connection and end the stream. The stream will be closed automatically if no render requests are sent for 2 minutes with one stream.

await fetch(`/stream/${streaId}`,{ 
    method: 'DELETE',
     headers: {
      Authorization: `Bearer ${SECRET_KEY}`
    }, 
})

Language
Credentials
Header
Click Try It! to start a request and see the response here!