flaky-beard-91685
10/27/2025, 6:03 AMtall-airline-16756
10/27/2025, 6:03 AMtall-airline-16756
10/27/2025, 6:04 AMStopEgress API by providing the egressId of the session you'd like to end. Let me walk you through some simple examples:
• Using LiveKit CLI:
lk egress stop --id <egress_id>
Feel free to specify multiple IDs if you want to stop several egresses at once.
• Using Python SDK:
from livekit.api import LiveKitAPI
lkapi = LiveKitAPI()
await lkapi.egress.stop_egress(StopEgressRequest(egress_id="<egress_id>"))
• Using Node.js SDK:
await egress.stopEgress('');
Just a quick note: the egress can only be stopped if it's currently active (EGRESS_STARTING or EGRESS_ACTIVE). If it has already finished or failed, stopping it won't be possible. If you have any questions along the way, I'm here to help!
◦ egress.stop_egress('') Sources: Egress API | LiveKit Docs | cmd/lk/egress.go | pkg/service/egress.go