https://livekit.io logo
Join Slack
Powered by
# server-api
  • i

    incalculable-ambulance-68856

    09/03/2025, 5:11 PM
    Hi Folks, I am running dockerized livekitserver. Is there a way to get sender report stats for a room that I create? I am looking for the number of bytes sent, connectionType etc. I am using golang on the server side to create a room that the main participant joins.
  • r

    rich-tent-61458

    09/03/2025, 8:04 PM
    Hi guys, Building with realtime voice to voice agents but now and then there is this annoying ~10s gap (time to 1st response)... Looking at the logs in Debug mode it seems its just server loading time or lag. Could it be I'm missing something like, set to prod env for lower agent deployment latency? Any light is appreciated
  • l

    lemon-twilight-33067

    09/04/2025, 6:53 PM
    Hi, is there a way to enforce max resolution of screensharing / webcamera?
  • a

    ancient-umbrella-90337

    09/05/2025, 1:48 PM
    @icy-policeman-64898 any idea when MCP will be available for the javascript sdk for livekit?
  • p

    powerful-activity-81417

    09/09/2025, 5:55 AM
    https://livekit-users.slack.com/archives/C07FY8WHGPM/p1757397305767139
  • f

    faint-noon-43612

    09/11/2025, 1:58 PM
    Hi, I had created a Cloud LK instance, while doing configuration using the api "twrip" it is asking SIP_ADMIN_TOKEN and server_API_KEY. can some help me get the same information from my cloud instance.
  • g

    glamorous-businessperson-673

    09/22/2025, 6:01 AM
    Hi, Can anyone help me with Go sdk realtime api example, i am facing media package issues.
    r
    • 2
    • 2
  • l

    lively-terabyte-73999

    09/25/2025, 6:55 AM
    Hi @refined-appointment-81829, two queries. 1. during one of our runs, even though we are subscribed to room, participant and track events it did not get fired, It has happened only once, is there a way to see the list of events fired for a particular interaction, apart from livekit dashboard. 2. When we get connection quality 0 or 3, how should we ideally handle it, will livekit automatically try to reconnect?, if yes and reconnection fails fully, what would be the behaviour in agent sdk and server sdk.
    r
    • 2
    • 1
  • r

    ripe-portugal-88932

    09/27/2025, 2:12 PM
    Hi , sorry might be a silly question, but do the node js realtime sdk and the rust sdk both have feature parity when it comes to ability to create rooms , join and receive audio from room , send audio to rooms? Node js realtime sdk https://github.com/livekit/node-sdks/tree/main/packages/livekit-rtc Rust: https://github.com/livekit/rust-sdks
  • b

    brave-portugal-27220

    09/28/2025, 6:11 PM
    hi, trying to build something like discord. is voice and video the same pricing? (by minutes or by packets sent)
    m
    • 2
    • 2
  • q

    quaint-caravan-55068

    09/29/2025, 10:20 AM
    Hi @refined-appointment-81829 We are using livekit transport with pipecat to join the livekit room but NVIDIA encoder/decoder takes almost 10 secs to initialise, anyway to reduce this time? 2025-09-29 091755.853 | DEBUG | pipecat.pipeline.task wait for pipeline start520 - PipelineTask#0: StartFrame#0 reached the end of the pipeline, pipeline is now ready. Nvidia Encoder is supported. Nvidia Decoder is supported. 2025-09-29 091804.821 | INFO | pipecat.transports.livekit.transportconnect251 - Connected to room-123
    r
    • 2
    • 5
  • f

    future-beard-52446

    09/29/2025, 10:49 AM
    Hello team, I have my own noise reduction algorithm, and I don't want to expose it to the client. How can I include it on the server? I'm running livekit/livekit-server:v1.9 in Docker.
    r
    • 2
    • 2
  • q

    quiet-solstice-74970

    09/29/2025, 8:30 PM
    Why Am i getting this project exceed free trail ?
  • f

    fast-jordan-16209

    09/30/2025, 1:40 PM
    Did anyone know how to connect fastapi backend and livekit server?
    r
    • 2
    • 1
  • o

    orange-dog-39581

    10/01/2025, 5:09 PM
    hey guys, I'm having a problem with token generation. I wrote the system myself in Swift to connect via live kit's server api. I've double and triple checked our api key and secret but I'm still getting a bad primitive message when I try and start a room instance. This is going from a client side web socket connection through a backend in vapor that connects directly to livekit.
    r
    • 2
    • 17
  • h

    hallowed-artist-66283

    10/08/2025, 11:06 AM
    Hi, can someone help me in dispatching AI agent(deployed on livekit cloud) to a meeting room while craeting access token. I am also trying to use aut-egress feature in meeting room. Everytime it picks self-hosted agent. Here is the code i am currently I am using : // Helper function to create a participant token function createParticipantToken(userInfo: AccessTokenOptions, roomName: string) { // 1) Ensure room exists with auto-egress const svc = new RoomServiceClient(LIVEKIT_URL!, API_KEY!, API_SECRET!); try { const room = svc.createRoom({ name: roomName, egress: new RoomEgress({ tracks: { filepath: "flo-ai-interviewer/{room_name}-{publisher_identity}-{time}", output: { case : "s3", value : { accessKey: process.env.S3_VIDEO_UPLOAD_ACCESS_KEY!, secret: process.env.S3_VIDEO_UPLOAD_SECRET!, bucket: "flo-ai-interviewer", region: "ap-south-1", }} } }), // (optional) dispatch your agent now instead of via token //agents: [ {agentName: "flo-ai-test", metadata: '{"user_id": "CA_RVPYRf6ayiPU"}',}], }); console.log(
    Created room
    ); } catch (err: any) { // If room already exists, ignore; otherwise rethrow if (!String(err?.message || "").toLowerCase().includes("already exists")) throw err; } //const dispatch = new AgentDispatchClient(LIVEKIT_URL!, API_KEY!, API_SECRET!); //dispatch.createDispatch(roomName, "flo-ai-test"); const at = new AccessToken(API_KEY!, API_SECRET!, userInfo); const grant: VideoGrant = { room: roomName, roomJoin: true, canPublish: true, canPublishData: true, canSubscribe: true, }; at.addGrant(grant); at.roomConfig = new RoomConfiguration({ agents: [ new RoomAgentDispatch({ agentName: "flo-ai-test", metadata: '{"user_id": "CA_RVPYRf6ayiPU"}', }), ], }); return at.toJwt(); }
    r
    • 2
    • 1
  • r

    rough-alligator-66451

    10/10/2025, 5:42 PM
    Pls help I cannot find secret key or API key
    r
    • 2
    • 1
  • o

    orange-dog-39581

    10/10/2025, 7:21 PM
    i'm having trouble in a multimedia chat feature. When my backend calls to update permissions for a given user in the room (granting an administrative role) i'm getting 401 errors leading to 500 errors. This uses the same JWT used at room creation (where opening/closing a room and A/V broadcast work fine) is there someone who can take a look and figure this out with me?
    • 1
    • 4
  • s

    stale-pillow-81140

    10/11/2025, 5:58 AM
    Hello Team, Our website integrates rrweb, and we’ve observed that each meeting session consumes around 3–4 GB of memory. I’m planning to record sessions from this website. Could you please advise if your web recording server is capable of supporting such memory consumption?
  • c

    colossal-airport-19101

    10/11/2025, 8:52 AM
    Can someone help me with an issue in my egress_ended webhook? Sometimes when I try to fetch room metadata, I get "room not found"—it looks like the room is being deleted before I can access its metadata. Here’s the relevant part of my code:
    Copy code
    export async function POST(req: NextRequest) {
      const { event, egressInfo } = await receiver.receive(body, authHeader, true);
    
      if (event === "egress_ended") {
        const { metadata } = await GetRoom({ roomname: egressInfo.roomName });
        await DeleteRoom({ room_id: egressInfo.roomName });
      }
    
      return new NextResponse("ok", { status: 200 });
    }
    Earlier, getting metadata before deleting the room worked fine. Any suggestions on why this is failing now, or how I can make sure metadata is always available before deletion?
  • a

    adorable-dream-8909

    10/14/2025, 1:11 AM
    How long does it usually takes for the account to reflect the upgrade from Build to Scale?
  • a

    adorable-dream-8909

    10/14/2025, 1:30 AM
    we are back online https://www.473999.net/pulse/back_up
  • o

    orange-dog-39581

    10/14/2025, 4:06 AM
    is it better or worse if I have youtube running pip in a live video chat window to pip it via youtube's api or to use livekit egress?
  • a

    adventurous-mechanic-33498

    10/14/2025, 3:48 PM
    hey all, thanks for having me, LK is amazing to work with! I have an agent written in TypeScript using Deepgram, OpenAI, and ElevenLabs all set up and mostly working perfectly - the one thing I'm trying to nail down that I can't seem to get right, is the timing of the transcribed responses - I'm using an AgentSession and it seems like they always get sent after TTS finishes speaking, so for a user that's hard of hearing or in a noisy place, the perception is that it's sitting doing nothing for ~15-30 seconds. Has anybody successfully configured a TS agent to send the text transcript before speech starts?
    • 1
    • 1
  • q

    quick-lizard-90069

    10/15/2025, 7:47 AM
    Is there a possible update to the ts @livekit/rtc-node package for the audiomixer to support multiple audio tracks coming from an agent?
  • b

    bored-airplane-78974

    10/15/2025, 3:49 PM
    Did anyone know how to use tencent cloud asr api instead of deepgram?
  • b

    best-battery-56004

    10/16/2025, 5:48 PM
    Hi team, QQ - After upgrading python-sdks from 1.0.13 → 1.0.16, data sent via the RoomService Server API no longer triggers my Python handler
    room.on("data_received", ...)
    , while data sent from a participant via
    local_participant.publish_data()
    still does. Tested and reproduced the issue using the basic_room.py example. Is this expected? Should
    SendData
    reach SDK listeners, or did behavior change? (Ref in ask-ai channel)
    r
    • 2
    • 3
  • g

    glamorous-finland-74321

    11/10/2025, 9:01 AM
    Copy code
    @router.get("/livekit/get-token")
    async def get_livekit_token_endpoint(
        request: Request,
        user: User = Depends(require_invite),
    ):
        print("get_livekit_token_endpoint", user)
        from livekit import api
    
        # Convert user model to dict and ensure all values are strings
        # since with_attributes expects dict[str, str]
        user_dict = user.model_dump()
        user_attributes = {k: str(v) if v is not None else "" for k, v in user_dict.items()}
    
        token = (
            api.AccessToken(settings.livekit_api_key, settings.livekit_api_secret)
            .with_identity(user.id)
            .with_name(f"notbf-stream")
            .with_metadata(json.dumps(user_attributes))
            .with_grants(
                api.VideoGrants(
                    room_join=True,
                    room="notbf-stream",
                )
            )
        )
    
        return {
            "participantName": f"{token.identity}",
            "participantToken": token.to_jwt(),
            "roomName": "notbf-stream",
            "serverUrl": settings.livekit_url,
        }
    how can I get the stuff from with_metadata() when user connects to the Agent
  • m

    many-actor-68876

    11/11/2025, 11:17 PM
    Hello Team, I’m not entirely sure if this is the right place to ask, but I’d appreciate some clarification on LiveKit room permissions. Context: I’m building a meeting service on top of LiveKit and rely heavily on room-level permissions. One of the requirements is to allow a user to join a meeting in a “waiting” state. During this state, the user should not be able to publish or receive any audio, video, or data until explicitly granted permission. Initially, I generated the user’s token with
    canSubscribe
    set to
    false
    . This correctly prevented them from receiving audio/video tracks. However, I noticed that the user can still receive messages sent to all participants through the data channel. I had assumed that
    canSubscribe
    would apply to all track types, including data. So my question is: Am I misunderstanding how
    canSubscribe
    is intended to work, or is there a specific reason data channel messages are treated differently?
    r
    • 2
    • 1
  • a

    astonishing-kangaroo-12980

    11/13/2025, 10:11 AM
    MUCH NEEDED. Seems like plugins are not avaialble in JS SDK. It is very limiting when we are not able to use many plugins like SONIOX or ASSEMBLY with JS SDK. Is there any timeline or planned sprint in this direction ?
    r
    • 2
    • 2