how can I close egress in Livekit
# ask-ai
c
how can I close egress in Livekit
t
Thanks for reaching out, NAJAM. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to close (stop) an egress in LiveKit — here are the ways you can do that. • Stop via API/SDK: call the StopEgress method with the
egress_id
using a token with
roomRecord
permission. ◦ JavaScript:
await egressClient.stopEgress(egressID);
◦ Go:
egressClient.StopEgress(ctx, &livekit.StopEgressRequest{EgressId: egressID})
◦ Python:
await lkapi.egress.stop_egress(egress_id="EGRESS_ID")
◦ Java/Ruby: similar `stopEgress`/`stop_egress` calls. • Stop via CLI: ◦
lk egress stop --id <egress_id>
• Alternative: delete the room tied to the egress. Deleting the room will remove all participants (including the egress participant) and stop recordings/streams. If you want, tell me which method/SDK you’re using and the
egress_id
(or whether the egress is room-based) and I’ll give the exact command/snippet and required token permissions. Sources: Egress API | LiveKit docs | Job lifecycle | LiveKit docs