raise APIStatusError("LiveKit STT quota exceeded",...
# ask-ai
s
raise APIStatusError("LiveKit STT quota exceeded", status_code=e.status) from e livekit.agents._exceptions.APIStatusError: LiveKit STT quota exceeded (status_code=429, request_id=None, body=None, retryable=False) {"message": "failed to recognize speech, retrying in 2.0s\nTraceback (most recent call last):\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/livekit/agents/inference/stt.py\", line 589, in _connect_ws\n ws = await asyncio.wait_for(\n ^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/vsk/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py\", line 520, in wait_for\n return await fut\n ^^^^^^^^^\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/aiohttp/client.py\", line 1093, in _ws_connect\n raise WSServerHandshakeError(\naiohttp.client_exceptions.WSServerHandshakeError: 429, message='Invalid response status', url='wss://agent-gateway.livekit.cloud/v1/stt?model=deepgram/nova-3'\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/livekit/agents/stt/stt.py\", line 318, in _main_task\n return await self._run()\n ^^^^^^^^^^^^^^^^^\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/livekit/agents/inference/stt.py\", line 523, in _run\n ws = await self._connect_ws()\n ^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/livekit/agents/inference/stt.py\", line 603, in _connect_ws\n raise APIStatusError(\"LiveKit STT quota exceeded\", status_code=e.status) from e\nlivekit.agents._exceptions.APIStatusError: LiveKit STT quota exceeded (status_code=429, request_id=None, body=None, retryable=False)", "level": "WARNING", "name": "livekit.agents", "exc_info": "Traceback (most recent call last):\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/livekit/agents/inference/stt.py\", line 589, in _connect_ws\n ws = await asyncio.wait_for(\n ^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/vsk/.local/share/uv/python/cpython-3.12.8-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py\", line 520, in wait_for\n return await fut\n ^^^^^^^^^\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/aiohttp/client.py\", line 1093, in _ws_connect\n raise WSServerHandshakeError(\naiohttp.client_exceptions.WSServerHandshakeError: 429, message='Invalid response status', url='wss://agent-gateway.livekit.cloud/v1/stt?model=deepgram/nova-3'\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/livekit/agents/stt/stt.py\", line 318, in _main_task\n return await self._run()\n ^^^^^^^^^^^^^^^^^\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/livekit/agents/inference/stt.py\", line 523, in _run\n ws = await self._connect_ws()\n ^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/vsk/Ritesh/X/AI_Collections-main/backend/listening-agent/.venv/lib/python3.12/site-packages/livekit/agents/inference/stt.py\", line 603, in _connect_ws\n raise APIStatusError(\"LiveKit STT quota exceeded\", status_code=e.status) from e\nlivekit.agents._exceptions.APIStatusError: LiveKit STT quota exceeded (status_code=429, request_id=None, body=None, retryable=False)", "tts": "livekit.agents.inference.stt.STT", "attempt": 2, "streamed": true, "pid": 361710, "job_id": "AJ_HwnyWCL5mp72", "room_id": "RM_FszVkyrhZkME", "timestamp": "2026-02-18T052750.114539+00:00"}
t
Thanks for reaching out, Mohan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I see you’re hitting a
LiveKit STT quota exceeded
429 error while the agent tries to open an STT WebSocket (model=deepgram/nova-3). I’ll help you get this working again. What’s happening • The 429 means you’ve hit LiveKit’s concurrent STT/inference session limit for your plan. The agent’s websocket connection is being rejected because too many inference sessions are active at once, so the library raises
APIStatusError("LiveKit STT quota exceeded")
. What you can do right now 1. Verify concurrent usage ◦ Open the LiveKit Cloud dashboard → Monitoring → Quotas and check current concurrent inference sessions. Look for spikes that match the timestamp in your logs. 1. Reduce concurrency quickly ◦ Limit how many agents/rooms create STT sessions at the same time. ◦ Add or increase backoff on retries so failed connections don’t rapidly re-attempt and pile up. ◦ If you spawn one agent per user, consider restricting simultaneous transcriptions or queueing incoming requests. 1. Short-term workaround: use a provider plugin ◦ If you need more immediate capacity and can manage provider billing, configure an STT plugin (Deepgram/AssemblyAI/etc.) so STT calls go to that provider directly rather than LiveKit’s inference gateway. You’ll manage the provider’s quota/billing yourself. 1. Consider upgrading plan ◦ Self-serve plans have hard concurrency caps (Build / Ship / Scale / Enterprise tiers). If your usage routinely needs more concurrent sessions, upgrading to a higher plan or Enterprise (custom limits) will resolve the quota block. Longer-term suggestion • Move to a multi-tenant agent architecture (single agent handling multiple users/sessions) to drastically reduce the number of concurrent inference sessions required by your system. To give a concrete recommendation tailored to your situation, can you tell me: 1. Which LiveKit plan are you on? 2. How many concurrent STT/inference sessions are typically active when this happens? 3. Are you using LiveKit Inference (agent-gateway) or an STT plugin/provider now? 4. Is this happening during normal production traffic or a specific load test? Once I have those details I’ll suggest the best immediate fix and a recommended path forward (configuration changes, throttling patterns, or upgrade options). Sources: How much can LiveKit scale? | LiveKit | Pricing | LiveKit | Speech-to-text (STT) models overview | LiveKit Documentation | Can you increase agent deployment limits? | LiveKit
s
we are using livekit free plan..we are STT Plugin
t
Thanks — that helps. Since you’re on the LiveKit free plan and using an STT plugin, here’s a focused set of actions and next steps to get past the “LiveKit STT quota exceeded” 429 error. Why this is happening • The free plan enforces a hard cap on concurrent inference/STT sessions. Even when using an STT plugin, LiveKit still gates concurrent inference connections through the agent gateway, so too many simultaneous STT sessions will return 429. Immediate actions you can take • Throttle concurrent STT sessions ◦ Limit how many STT sessions your system opens at once. Add a simple semaphore or pool so only N sessions run concurrently. • Add stronger retry/backoff ◦ Ensure retries use exponential backoff with a max retry limit so failed connections don’t continuously retry and consume quota. • Use your own provider API key (recommended workaround) ◦ If possible, configure your agent to connect directly to your STT provider (Deepgram, AssemblyAI, etc.) using your own provider API key. That moves quota enforcement to the provider (you control billing/limits) and avoids LiveKit’s gateway cap. ◦ Confirm you have a provider key available and can change the plugin config to use it. Medium-term options • Aggregate/queue requests ◦ Queue short audio segments and transcribe them in order rather than opening many concurrent sessions. • Multi-tenant agent ◦ Run fewer, multi-tenant agents that multiplex multiple users’ audio through a single STT session when possible to reduce concurrent sessions. If upgrading is an option • Upgrading from free to a paid tier (Scale or Enterprise) raises the concurrent inference cap and removes this hard limit. If you expect steady concurrent transcription needs, that’s the most straightforward fix. Quick checklist I can help with • Do you currently have an API key for your STT provider (Deepgram, etc.) to move to direct provider usage? • Approximately how many simultaneous transcriptions are you trying to run when the error appears? • Do you want an example of a simple semaphore/queue or exponential backoff snippet for your agent code? Tell me which of the checklist items you want help with and I’ll provide the exact steps/snippets.