[15:59:50.237] INFO (1336953): LLM metrics ttf...
# ask-ai
l
[155950.237] INFO (1336953): LLM metrics ttftMs: -1 inputTokens: 0 promptCachedTokens: 0 outputTokens: 0 tokensPerSecond: 0 llm: new openai.LLM({ apiKey: process.env.OPENAI_API_KEY!, model: 'gpt-4.1-mini', }), why isnt my audio stt being processed?
t
Thanks for reaching out, Abdullah. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I see the LLM received zero tokens and TTFT is -1, which means the pipeline never got a transcript. To diagnose why STT isn’t producing text I need a few specific details from you. Please share: • Your STT configuration (the
stt: ...
portion of your
AgentSession
or equivalent code). Is it
inference.STT
, a provider plugin (Deepgram, etc.), or a model string like
"deepgram/nova-3"
? • Any STT-related logs (look for transcription events, errors, or VAD events). In particular, output from: ◦
session.stt.on("metrics_collected", ...)
◦
session.stt.on("eou_metrics_collected", ...)
• Confirmation that the agent is subscribed to the user’s audio track (is audio actually being published/subscribed in the LiveKit room?). • Whether you have an API key set for the STT provider and which provider you’re using. Quick checklist you can verify now: • Agent is connected and subscribed to the participant audio track. • STT provider API key is present and valid. • VAD settings aren’t preventing speech detection (too strict). • STT mode (streaming vs non-streaming) matches the provider requirements. Send the requested code snippets and the STT/VAD logs and I’ll pinpoint the failure and give exact steps to fix it. Sources: STT Metrics | LiveKit docs
l
stt: new deepgram.STT({ apiKey: process.env.DEEPGRAM_API_KEY!, }), vad: // VAD and turn detection are used to determine when the user is speaking and when the agent should respond turnDetection: new livekit.turnDetector.MultilingualModel(), vad: ctx.proc.userData.vad! as silero.VAD, voiceOptions: { // Allow the LLM to generate a response while waiting for the end of turn preemptiveGeneration: true, },
t
Thanks — I see you’re using Deepgram STT and Silero VAD with LiveKit’s multilingual turn detector. That config looks correct, so let’s narrow down where audio is getting lost. Please check and share the following (or confirm each item): • Deepgram key: Is
DEEPGRAM_API_KEY
present and valid in the environment where the agent runs? • Room/agent connection: Is the agent actually joined to the LiveKit room when audio should be processed? (Confirm connection status/log line showing join success.) • Audio subscription: Is the agent subscribed to the participant’s audio track? If you handle tracks manually, ensure you subscribe and stream frames into Deepgram (example below). If you use
AgentSession
, confirm you called
await session.start(...)
. • STT/VAD logs: Paste output for these events if available: ◦
session.stt.on("metrics_collected", ...)
◦
session.stt.on("eou_metrics_collected", ...)
◦ Any errors emitted by the STT stream or Deepgram client • VAD behavior: Could VAD be ignoring speech? Try temporarily relaxing VAD sensitivity or logging VAD decisions to confirm voice activity is detected. • Streaming loop (if manual): If you process tracks yourself, confirm you stream frames into Deepgram. Example pattern:
Copy code
@room.on("track_subscribed")
  async (track) => {
    if (track.kind === TrackKind.KIND_AUDIO) {
      const audioStream = new AudioStream(track);
      const sttStream = stt.stream();
      for await (const frame of audioStream) {
        sttStream.pushFrame(frame);
      }
    }
  }
If you share the STT/VAD logs and a short snippet showing how you start the session or subscribe to tracks, I’ll pinpoint the failure and give exact steps to fix it. Sources: Silero VAD plugin | LiveKit docs | Pipeline Translator Agent | LiveKit docs | Simple Call Answering Agent | LiveKit docs | livekit/livekit_composite | DeepWiki
l
stt: new deepgram.STT({ apiKey: process.env.DEEPGRAM_API_KEY!, }), // A Large Language Model (LLM) is your agent's brain, processing user input and generating a response llm: new openai.LLM({ apiKey: process.env.OPENAI_API_KEY!, model: 'gpt-4.1-mini', }), // Text-to-speech (TTS) is your agent's voice, turning the LLM's text into speech that the user can hear tts: new cartesia.TTS({ apiKey: process.env.CARTESIA_API_KEY!, language: 'en', model: 'sonic-3', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc', }), logs: pnpm run dev
agent-starter-node@1.0.0 dev /home/abdullah/work/livekit_demo/livekit_p1_be
tsx src/agent.ts dev
[dotenv@17.2.3] injecting env (10) from .env.local -- tip: 👥 sync secrets across teammates & machines: https://dotenvx.com/ops [155138.591] INFO (1305350): starting worker version: "0.1.0" [155138.637] INFO (1305350): Server is listening on port 40325 [155200.543] INFO (1305350): registered worker version: "0.1.0" id: "AW_Mnk5ibutEncV" server_info: { "edition": "Cloud", "version": "1.9.9", "protocol": 16, "region": "India West", "nodeId": "NC_OMUMBAI1A_GHAq2fmCHKDe", "debugInfo": "", "agentProtocol": 0 } [155214.096] INFO (1305350): received job request version: "0.1.0" jobId: "AJ_GJGU4z9htKQs" resuming: false agentName: "" [dotenv@17.2.3] injecting env (0) from .env.local -- tip: 🔐 prevent committing .env to code: https://dotenvx.com/precommit VAAPI is supported. [155225.612] WARN (1308432): room not connect after job_entry was called after 10 seconds, jobID: "AJ_GJGU4z9htKQs" [155316.054] INFO (1308432): mainTask: draining and no more speech tasks [155316.055] INFO (1308432): AgentActivity mainTask: exiting [155316.051] DEBUG (lk-rtc/1308432): Connect callback received [155343.041] WARN (1305350): job is unresponsive [155937.448] INFO (1305350): received job request version: "0.1.0" jobId: "AJ_G9trLR8W2WsB" resuming: false agentName: "" [dotenv@17.2.3] injecting env (0) from .env.local -- tip: 🗂️ backup and recover secrets: https://dotenvx.com/ops VAAPI is supported. [155941.951] INFO (1336953): participantValue.trackPublications participantValue: "voice_assistant_user_9791" trackPublications: [ { "info": { "sid": "TR_AMiXncHGTdFddT", "name": "", "kind": "KIND_AUDIO", "source": "SOURCE_MICROPHONE", "simulcasted": false, "width": 0, "height": 0, "mimeType": "audio/red", "muted": false, "remote": true, "encryptionType": "NONE", "audioFeatures": [ "TF_AUTO_GAIN_CONTROL", "TF_ECHO_CANCELLATION", "TF_NOISE_SUPPRESSION" ] }, "ffiHandle": {}, "subscribed": false } ] lengthOfTrackPublications: 1 [155941.947] DEBUG (lk-rtc/1336953): Connect callback received [155944.891] INFO (1336953): STT metrics audioDurationMs: 1100 [155944.913] INFO (1336953): VAD metrics idleTimeMs: 0 inferenceDurationTotalMs: 70 inferenceCount: 1 User said: Is that, like, [155945.835] INFO (1336953): starting preemptive generation newTranscript: "Is that, like," transcriptConfidence: 0.58081055 [155945.836] INFO (1336953): Creating speech handle speech_id: "speech_79e62193-e74" [155947.089] INFO (1336953): VAD metrics idleTimeMs: 0 inferenceDurationTotalMs: 49 inferenceCount: 1 User said: Is User said: Is that [155947.843] INFO (1336953): starting preemptive generation newTranscript: "Is that, like, Is that" transcriptConfidence: 0.776245125 [155947.844] INFO (1336953): Creating speech handle speech_id: "speech_e34a3c65-40f" [155948.344] INFO (1336953): LLM metrics ttftMs: -1 inputTokens: 0 promptCachedTokens: 0 outputTokens: 0 tokensPerSecond: 0 [155949.682] INFO (1336953): VAD metrics idleTimeMs: 0 inferenceDurationTotalMs: 59 inferenceCount: 1 [155949.981] INFO (1336953): STT metrics audioDurationMs: 3700 [155950.237] INFO (1336953): LLM metrics ttftMs: -1 inputTokens: 0 promptCachedTokens: 0 outputTokens: 0 tokensPerSecond: 0 [155955.713] INFO (1336953): EOU metrics endOfUtteranceDelayMs: 6000 transcriptionDelayMs: 0 onUserTurnCompletedDelayMs: 0 [160002.882] INFO (1336953): STT metrics audioDurationMs: 900 [160022.781] INFO (1336953): STT metrics audioDurationMs: 1800 [160035.478] INFO (1336953): STT metrics audioDurationMs: 1100 [160041.359] INFO (1336953): STT metrics audioDurationMs: 1700 [160114.881] INFO (1336953): STT metrics audioDurationMs: 1100 [160114.899] INFO (1336953): VAD metrics idleTimeMs: 0 inferenceDurationTotalMs: 1553 inferenceCount: 1 [160127.881] INFO (1336953): STT metrics audioDurationMs: 1900 [160136.679] INFO (1336953): STT metrics audioDurationMs: 1100 [160142.559] INFO (1336953): STT metrics audioDurationMs: 1100 [160144.081] INFO (1336953): VAD metrics idleTimeMs: 0 inferenceDurationTotalMs: 722 inferenceCount: 1 [160147.252] INFO (1336953): VAD metrics idleTimeMs: 0 inferenceDurationTotalMs: 79 inferenceCount: 1 [160147.581] INFO (1336953): STT metrics audioDurationMs: 3700 [160212.343] INFO (1336953): VAD metrics idleTimeMs: 0 inferenceDurationTotalMs: 595 inferenceCount: 1 [160212.373] INFO (1336953): STT metrics audioDurationMs: 1500 [160312.160] INFO (1336953): STT metrics audioDurationMs: 1300 [160317.684] INFO (1336953): STT metrics audioDurationMs: 1300
t
Thanks — I reviewed your config and logs. What’s working: • Deepgram STT is receiving audio and producing transcripts (you have many "STT metrics" entries and lines like
newTranscript: "Is that, like,"
). • VAD is detecting voice (VAD metrics present, idleTimeMs: 0). • The agent is seeing the participant’s audio track (trackPublications shows a remote audio track). What’s not happening: • The LLM never receives input (LLM metrics show ttftMs: -1 and inputTokens: 0). Most likely causes to check (please confirm each): • OpenAI LLM initialization: Can you confirm
OPENAI_API_KEY
is set and valid in the same environment the agent runs in? If the key is missing/invalid the LLM won’t accept transcripts. • Model name: Verify the model string
gpt-4.1-mini
is a valid model name for your OpenAI client. If the model name is invalid the LLM client may fail to create a usable session. Share any LLM-related errors if present. • Errors from LLM calls: Look for error logs or exceptions when the agent attempts to call the LLM (there are no LLM error lines in the logs you pasted). If you can, enable/collect debug logs around the LLM call to see failures. • Preemptive generation flow: You have
preemptiveGeneration: true
. Confirm the code path that forwards STT transcripts into the LLM is executing. The STT logs show transcripts and "starting preemptive generation" but the LLM never reports tokens — this suggests the transcripts aren’t making it into the LLM request (or the request is failing silently). • Subscription flag: Your
trackPublications
shows
"subscribed": false
. Ensure the agent is actually subscribed to the published audio track (AgentSession normally subscribes automatically, but if subscription failed, STT may have fallback audio or partial frames — double-check that subscription becomes
true
when the user speaks). Next steps I can help with — please provide one of these: • LLM error logs or uncaught exceptions around the time transcripts are sent. • The code snippet that forwards transcripts to
llm
(where you call
llm.generate(...)
or similar) or your
AgentSession
start code (
await session.start(...)
). • Confirmation of
OPENAI_API_KEY
and the exact model name you intend to use. If you share the LLM call code or LLM error output, I’ll pinpoint the exact fix and the minimal changes to make the LLM receive the transcripts.
l
do i need openApi subscription or does that work in free tier?
t
You don’t need a paid OpenAI “subscription” to use the OpenAI integration — you need an OpenAI account and an API key. New OpenAI accounts often have free credits you can use, but once those credits are exhausted or for production use, OpenAI charges based on API usage. Notes: • LiveKit does not charge for the OpenAI plugin; you pay OpenAI directly when using your API key. • Alternatively, you can use OpenAI models via LiveKit Inference (LiveKit handles billing there), depending on your LiveKit plan. If you want, tell me whether you’re using your own OpenAI API key or LiveKit Inference and I’ll explain expected billing behavior and how to verify your key/usage. Sources: OpenAI LLM plugin guide | LiveKit docs | LiveKit
l
how to verify key/usage?
t
Good question — here’s how to verify your OpenAI API key and check usage. 1. Verify the key exists and is set • Confirm
OPENAI_API_KEY
is in the environment where your agent runs (e.g.,
.env
, CI, or process env). • In your agent process, log or print
process.env.OPENAI_API_KEY
presence (do not log the actual key in production). 1. Test the key with a simple API request • Run from the machine where your agent runs:
Copy code
curl <https://api.openai.com/v1/models> \
    -H "Authorization: Bearer YOUR_API_KEY"
• A successful response returns a list of models. A 401/403 means the key is invalid or unauthorized. 1. Check usage and billing on OpenAI • Sign in and open: https://platform.openai.com/usage • View recent usage, token counts, and costs. This shows whether requests are being billed. 1. Troubleshooting tips • If the curl returns 401/403: regenerate an API key at https://platform.openai.com/api-keys and update
OPENAI_API_KEY
in your environment, then restart the agent. • If keys are valid but you see no usage: confirm your agent actually makes LLM calls (enable debug logs around the LLM request) and check for silent errors in your agent logs. • For local testing, temporarily run a single LLM request (e.g.,
curl
above or a small
chat.completions
call) from the same host to ensure network/Egress to api.openai.com is allowed. If you want, tell me whether you prefer to test via curl or from your Node process and I’ll give the exact command/snippet. Sources: OpenAI STT plugin guide | LiveKit docs
l
how do i run a small chat.completions calls
t
Thanks — below are two minimal ways to run a quick chat completions call to verify your OpenAI API key. Pick curl (quickest) or Node.js (matches your agent). 1) curl (run from the same host where your agent runs)
Copy code
export OPENAI_API_KEY="your_api_key_here"

curl <https://api.openai.com/v1/chat/completions> \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [{"role":"user","content":"Hello, are you working?"}]
  }'
• 200 response with a
choices
array means the key and network are working. • 401/403 means the key is invalid or unauthorized. 2) Node.js (quick test script)
Copy code
// test-openai.js
import fetch from "node-fetch";

const key = process.env.OPENAI_API_KEY;
if (!key) throw new Error("Set OPENAI_API_KEY in your env");

const res = await fetch("<https://api.openai.com/v1/chat/completions>", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${key}`,
  },
  body: JSON.stringify({
    model: "gpt-3.5-turbo",
    messages: [{ role: "user", content: "Hello, are you working?" }]
  }),
});

const data = await res.json();
console.log(res.status, JSON.stringify(data, null, 2));
Run:
Copy code
export OPENAI_API_KEY="your_api_key_here"
node test-openai.js
If you get a successful response but your agent still shows ttftMs: -1, paste the agent logs around the LLM call or the snippet where you call
llm.generate(...)
and I’ll help trace why transcripts aren’t reaching the LLM. Sources: OpenAI LLM plugin guide | LiveKit docs
l
i receive "message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.", even though i have never used openai api before (free tier)
t
Sorry for the frustration — that quota error can be confusing. Here are the most likely causes and the exact checks to run so you can resolve it quickly. 1) Immediate checks (do these first) • Open https://platform.openai.com/usage and confirm there is no previous usage or a zero balance. • Open https://platform.openai.com/account/usage/billing to see current billing status and whether a payment method is required or if your free credits are expired. • On https://platform.openai.com/api-keys confirm the key you’re using is listed and active. 2) Common reasons you see "You exceeded your current quota" • Free trial credits expired or were consumed by background/test requests. New accounts sometimes get limited credits that expire. • Your account requires a payment method to enable further usage even after free credits. • The key you used is for an organization or team with limits (not your personal account). • You used a different API key earlier (maybe from CI, another machine, or a teammate) that consumed the credits. 3) How to fix it • If free credits expired: add a payment method on https://platform.openai.com/account/billing to enable pay-as-you-go usage. • If you want to keep costs down for testing: add a billing limit in the OpenAI billing settings to avoid unexpected charges. • If you believe this is an error: check the usage timeline for unexpected requests, rotate/regenerate the API key, and use the new key in your agent (
OPENAI_API_KEY
) after restarting it. 4) Quick tests after fixing • Re-run the curl chat completion test you used earlier. A 200 response confirms the key/billing is ok. • If you still get quota errors but your billing page shows active payment method and no limits, send me the output of
curl <https://api.openai.com/v1/models> -H "Authorization: Bearer $OPENAI_API_KEY"
(redact the key) and the timestamp of the failed request — I’ll help interpret the response. 5) Alternatives if you prefer not to add payment details • Use LiveKit Inference (LiveKit handles billing) if available on your plan. Tell me if you want steps for switching to LiveKit Inference. Tell me which step you took and paste any billing/usage lines or the
models
curl response and I’ll guide the exact next action.
l
is there any llm inference model that are completely free?
t
Short answer: no — there aren’t unlimited, completely free LLM inference models. But you have these low‑cost/free‑friendly options: • LiveKit Cloud free credits: LiveKit Cloud includes limited monthly inference credits you can use for supported models. • OpenAI free credits: New OpenAI accounts may have limited free credits; after they expire you must add a payment method. • Self‑hosted open-source models (no API cost): run models locally with tools like Ollama or a local server — this avoids API charges but requires hardware and ops. • LiveKit Inference (managed): LiveKit can run models for you and handle billing on your plan; check your LiveKit plan for included quotas. • Provider free tiers/credits: Some model providers offer small free tiers or trial credits — check each provider for limits. If you want to avoid billing now, tell me which you prefer (use LiveKit Inference, try OpenAI free credits, or self‑host with Ollama) and I’ll give step‑by‑step next actions for that path. Sources: Introducing LiveKit Inference: A unified model interface for voice AI | Build voice, video, and physical AI | LiveKit | Inworld TTS | LiveKit docs | Ollama LLM plugin guide | LiveKit docs | Cerebras and LiveKit | LiveKit Docs
l
• Provider free tiers/credits: Some model providers offer small free tiers or trial credits — check each provider for limits. can you please list these
t
I can list providers that commonly offer free tiers, trials, or credits you can use (either directly or via LiveKit plugins). These change often—check each provider’s site for current limits. • OpenAI — new accounts often get free trial credits; after that it’s pay-as-you-go. • Google (Gemini via Google Cloud) — Google Cloud offers trial credits for new accounts; Gemini access may have free trial/quotas via Google Cloud promotions. • Anthropic — sometimes offers trial credits for new accounts; check Anthropic’s pricing/signup. • Cohere — offers free tier / trial credits for new users. • Groq / Cerebras — may provide trial or partner credits depending on signup; check their platforms. • Inworld (TTS) — Inworld TTS models are free through specific promotions (e.g., free through 12/31/2025 in past LiveKit notes). • LiveKit Cloud — includes small monthly inference credits and free agent session minutes on paid or free plans. • Ollama (self‑hosted) — not a managed free tier but lets you run open‑source models locally with no API fees (requires local hardware/ops). If you tell me which provider(s) you’re considering, I’ll pull the current free/trial details and links for that provider. Sources: Build voice, video, and physical AI | LiveKit | LiveKit Pricing | https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal/signup| | LiveKit | Large language models (LLM) | LiveKit Docs
l
// llm: new openai.LLM({ // apiKey: process.env.OPENAI_API_KEY!, // model: 'gpt-4.1-mini', // }), how many options do i have for LLM except openai?
t
Great — you have many LLM options besides OpenAI. Below is a concise list grouped by how you can use them with LiveKit, and notes on whether they’re hosted (LiveKit Inference) or plugin/self‑hosted. LiveKit Inference (hosted by LiveKit — just set model_id) • OpenAI family (e.g.,
openai/gpt-4.1-mini
, GPT-5 variants) • Google Gemini (e.g.,
google/gemini-2.5-pro
,
google/gemini-2.5-flash
) • Qwen (e.g.,
qwen/qwen3-235b-a22b-instruct
) • Kimi (e.g.,
moonshotai/kimi-k2-instruct
) • DeepSeek (e.g.,
deepseek-ai/deepseek-v3
) Plugin / Provider Integrations (bring-your-own API key) • Anthropic (Claude family) • Amazon Bedrock (AWS-hosted models) • Groq (high-speed Llama/Mixtral) • Mistral AI (Mistral, Mixtral) • Azure OpenAI (Azure-hosted OpenAI models) • Cerebras • DeepSeek (direct plugin) • Fireworks AI • OpenRouter (unified access to multiple models) • Perplexity • Telnyx • Together AI • xAI (Grok) • Letta • Baseten Self-host / Local • Ollama — run Llama‑3, Phi‑3, and other open models locally (no API fees; requires hardware/ops). Free / low-cost friendly options • Ollama (local, no API cost) • LiveKit Cloud free inference credits (small monthly allotment) • Some providers offer signup credits or trial tiers (OpenAI, Google Cloud, Together AI, Groq, Perplexity, Baseten) — check the provider for current offers • Inworld TTS had time-limited free promos for TTS (not LLM) If you want, tell me: • Do you prefer a hosted (LiveKit Inference) model or a plugin with your own provider key? • Any constraints (budget, latency, on‑prem hardware)? I’ll recommend 2–3 specific models/plugins and give the exact config snippet for your AgentSession. Sources: Large language models (LLM) | LiveKit Docs | Ollama LLM plugin guide | LiveKit docs | Groq LLM plugin guide | LiveKit docs | Perplexity LLM plugin guide | LiveKit docs | DeepSeek LLM plugin guide | LiveKit docs
l
i want for nodejs plugin with my own provider, list all the possible options that are available in nodejs plugins for llm
t
Thanks — here’s a concise, complete list of LLM providers that support Node.js plugins you can use with your own provider keys in LiveKit agents, plus quick notes and where to get started. Available Node.js LLM plugins (bring-your-own-key) • Google Gemini • Groq • OpenAI • Azure OpenAI • Anthropic • Amazon Bedrock • Cerebras • DeepSeek • Fireworks AI • Mistral AI • Baseten • OpenRouter • Perplexity • Telnyx • Together AI • xAI (Grok) • Letta • Ollama (local/self-hosted) Quick notes • Installation: many providers are available via the OpenAI-compatible plugin package:
Copy code
pnpm add @livekit/agents-plugin-openai@1.x
Other providers (Google, Ollama, etc.) have their own plugin packages (e.g.,
@livekit/agents-plugin-google
). • Auth: each plugin requires you to set the provider API key in env vars (e.g.,
GOOGLE_API_KEY
,
GROQ_API_KEY
,
OLLAMA_BASE_URL
) and restart your agent. • Ollama is for local self‑hosting (no API fees but needs local hardware). • LiveKit Inference is an alternative if you prefer LiveKit-hosted models (no plugin key needed; set
model_id
). If you tell me which 2–3 providers you’re interested in, I’ll give the exact Node.js install command and the minimal AgentSession snippet for that provider. Sources: Large language models (LLM) | LiveKit Docs | Perplexity LLM plugin guide | LiveKit docs | Cerebras LLM plugin guide | LiveKit docs | Fireworks AI LLM plugin guide | LiveKit docs | xAI LLM plugin guide | LiveKit docs
l
can you please provide link where all possible plugins for llms are listed?
t
You can find the full list of LiveKit LLM plugins and integrations on the LiveKit Agents docs index: https://docs.livekit.io/agents/models/llm/ That page links to each provider plugin (OpenAI, Google/Gemini, Groq, Anthropic, Ollama, Cerebras, DeepSeek, Perplexity, Together, etc.) and includes setup instructions for Node.js.
l
and how many of these provide a free tier? or limited trial
t
Good question — here’s a concise summary of which Node.js LLM plugin providers commonly offer a free tier, trial credits, or a free/self‑hosted option. These offers change frequently, so check the provider links for current details. Likely free tier / trial available • OpenAI — new accounts often get free trial credits. • Google Gemini (via Google Cloud / AI Studio) — Google Cloud trial credits or limited free quotas may apply. • Together AI — often provides signup credits or a small free tier. • Groq — has offered free tiers/credits for development in the past (check current Groq docs). • Perplexity — provides limited free API access or developer tiers. • Baseten — free hosting tiers for certain models / trial credits. • Mistral AI — may offer trial access or free tiers depending on signup. • Anthropic — trial credits may be available on signup (not guaranteed). • Azure (Azure OpenAI) — new Azure accounts receive free Azure credits; usage then billed to Azure. • xAI (Grok) — sometimes provides limited free access; check xAI signup. • Fireworks AI / DeepSeek / Cerebras / Telnyx — some have developer trials or credits; check each provider for current promos. Free / no-API-cost options • Ollama — self‑hosted local inference (no API charges; requires local hardware). • Running open‑source models locally (via Ollama or your own infra) — effectively free of per‑call API charges. LiveKit-specific free credits • LiveKit Cloud includes small monthly inference credits and free agent session minutes that can be used before incurring provider costs. If you tell me 2–3 providers you care most about, I’ll fetch the current free-tier/trial link and exact signup/billing note for each. Sources: OpenAI and LiveKit | LiveKit docs | Anthropic Claude LLM plugin guide | LiveKit docs | Google AI and LiveKit | LiveKit Docs | Large language models (LLM) | LiveKit Docs | Azure OpenAI LLM plugin guide | LiveKit docs
l
im on free tier of livekit, how can i check my current and remaining usage?
t
You can check your LiveKit free‑tier usage from the Cloud dashboard. Steps: 1. Sign in to LiveKit Cloud: https://cloud.livekit.io 2. Select your project. 3. Open the Usage or Billing section to see: ◦ Agent session minutes used / remaining ◦ Inference credits consumed / remaining ◦ WebRTC minutes used ◦ Concurrent connections and other quotas Notes: • Free Build plan allowances: 1,000 agent session minutes/month, ~$2.50 inference credits/month (≈50 minutes), and 5,000 WebRTC minutes. • If you prefer CLI/automation, you can use the LiveKit CLI to check logs and deployment status (detailed usage metrics are on the dashboard). If you want, tell me your project name and which specific quota you want to check (agent minutes, inference credits, or WebRTC minutes) and I’ll tell you exactly where to find that number in the dashboard. Sources: Mini tutorial: setting up a LiveKit Cloud project | Deploying to production | LiveKit Docs | LiveKit Pricing | LiveKit | LiveKit
l
i can only see these numbers and they arent very helpful in determining how much i've used or whats left
t
Thanks — I see the screenshot of your monthly usage table and that the dashboard rows list amounts and costs but don’t show "remaining" quotas clearly. I can help you interpret those numbers and find the remaining balances. Quick guide to interpret the table you shared • Each row shows what was consumed this month and the $ cost charged so far. ◦ e.g., "Build: 5000 incl. WebRTC participant minutes — 23 min" means you've used 23 of the included 5,000 WebRTC minutes for the month. ◦ "LLM openai ... 27281 tokens" shows tokens consumed this month from the included inference credits (cost is $0.00 because it’s within included credits). • If a resource shows an included allotment (e.g., "5000 incl. WebRTC participant minutes"), remaining = included allotment − amount used. In your example: ◦ WebRTC minutes remaining = 5,000 − 23 = 4,977 min. ◦ Downstream data remaining = 50GB − 1GB = 49GB. ◦ Inference credits remaining are implied by included credits; if cost is $0.00, you’re still within the free allotment. Where to find explicit remaining values in the dashboard • Open the project in https://cloud.livekit.io and go to: ◦ Usage → "Monthly usage" (what you saw), and ◦ Usage → "Limits/Quotas" or Billing → "Plan details" (this page shows included allotments and remaining amounts per quota). • If you don’t see a “remaining” column, open the project’s Plan or Billing page — it lists the included quotas and month-to-date consumption so you can compute remaining amounts. If you want exact remaining numbers now • Tell me which quota you want exact remaining values for (Agent session minutes, Inference credits / LLM tokens, WebRTC minutes, or Downstream GB). • I’ll tell you the exact place or API/CLI call to get that number, or compute it from the rows in your screenshot if you confirm your plan’s included allotments. Optional: automated checks • You can export usage CSV from the dashboard (Billing → Export) or use the LiveKit CLI to get usage logs for automation. Tell me which option you prefer and I’ll give the exact steps.
l
i dont see a remaining column or usage or monthly usage, i want to see how much inference credits do i have and remaning amount
t
Thanks — I understand you just want a clear number for inference credits remaining. Since the dashboard view you have doesn't show a "remaining" column, here's how to get the exact remaining inference credits and confirm usage. 1) Check Limits / Plan details in Cloud dashboard • Go to https://cloud.livekit.io and open your project. • Open Billing → Plan (or Usage → Limits/Quotas). That page shows your plan’s included inference credits (e.g., $2.50/month) — this is your total allowance. 2) Compute remaining from monthly usage • On the December Usage table you shared, find the LLM inference rows (input/output tokens or inference credits). Those Amount values are what you’ve consumed this month. • Remaining inference credits = Plan included credits − cost-equivalent of consumed inference so far. ◦ Example: If plan gives $2.50/month and your LLM usage cost shows $0.00 so far, you’re still within included credits. ◦ If you need the dollar value used, multiply token usage by the provider price shown on the row (e.g., $0.4 per million input tokens, $1.6 per million output tokens) to get the $ used, then subtract from $2.50. 3) Easier: Export or detailed usage • In Billing → Export or Usage → Export CSV, export the month’s usage lines. The CSV breaks down usage and cost per resource so you can compute remaining precisely. • Or open Usage → Inference (if present) for a more detailed breakdown by model and cost. 4) Programmatic / CLI check • If you prefer automation, use the LiveKit Cloud API/CLI to fetch usage metrics for the project (I can provide exact CLI commands if you want). This returns month-to-date usage and makes computing remaining trivial. If you want, tell me: • Your project name (or confirm you’re in the same project shown in the screenshot), and • Whether you want me to walk you through exporting the CSV now or give the exact CLI/API command — I’ll provide the step-by-step.
l
please give cli/api commands
t
I can help — below are the LiveKit Cloud CLI and API approaches to fetch project usage so you can compute remaining inference credits. Pick CLI or API. Prereqs • Have your LiveKit Cloud API key (from https://cloud.livekit.io → Project → Settings → API keys). • Know your project ID (visible on the project page). Option A — LiveKit Cloud CLI (recommended) 1. Install the LiveKit CLI if you don’t have it:
Copy code
npm install -g @livekit/cli
1. Authenticate the CLI with your cloud API key:
Copy code
livekit login --api-key YOUR_LIVEKIT_API_KEY
1. Get project usage (month-to-date):
Copy code
livekit usage get --project PROJECT_ID --range month
• This returns usage lines (agent minutes, inference, WebRTC, etc.). Look for inference/LLM rows and their cost/amount. 1. Export CSV (if supported) for easier math:
Copy code
livekit usage export --project PROJECT_ID --range month --output usage.csv
• Open usage.csv and find the inference lines; compute remaining = plan included credits − cost used. Option B — LiveKit Cloud REST API 1. Obtain your LiveKit Cloud API key from Project → Settings. 2. Fetch usage (replace PROJECT_ID and YOUR_API_KEY):
Copy code
curl -H "Authorization: Bearer YOUR_API_KEY" \
     "<https://api.livekit.cloud/v1/projects/PROJECT_ID/usage?range=month>"
• Response includes resource usage entries. Find entries for inference/LLM and check
amount
and
cost
. 1. Compute remaining inference credits: ◦ Get plan included credits from project billing (dashboard or API). ◦ Remaining = included_inference_credits - sum(cost of inference usage from API response). Notes and tips • The CLI
usage get
response shows the same rows you saw in the dashboard; export CSV to compute remaining easily. • If the API path above returns 404 or differs, open your project settings page for the exact API base returned there (some accounts expose region-specific endpoints). • If you want, paste the JSON output (redact secrets) and I’ll compute the remaining inference credits for you. Tell me which option you prefer (CLI or API) and I’ll give the exact command with your PROJECT_ID format and a sample of how to parse the returned JSON to get the inference cost.
l
i tried both api key and secret key, but it says invalid authorization token
t
Thanks — you’re getting “invalid authorization token” because the API key/secret can’t be used directly as a Bearer token. Here are the exact steps to authenticate and fetch inference usage (CLI and API), plus quick troubleshooting. 1) Quick fix (recommended): authenticate CLI via browser • Install CLI if needed:
Copy code
npm install -g @livekit/cli
• Log in (this links your CLI to your Cloud account):
Copy code
lk cloud auth
Follow the browser flow. After success, run:
Copy code
lk usage get --project PROJECT_ID --range month
Or export CSV:
Copy code
lk usage export --project PROJECT_ID --range month --output usage.csv
2) If you must call the API directly: generate a JWT (do NOT use API secret as Bearer) • Node.js example (generate short-lived JWT):
Copy code
// npm i livekit-server-sdk
  import { AccessToken } from "livekit-server-sdk";

  const at = new AccessToken("YOUR_API_KEY", "YOUR_API_SECRET");
  at.ttl = 600; // seconds
  const jwt = at.toJwt();
  console.log(jwt);
• Use that JWT as Authorization:
Copy code
curl -H "Authorization: Bearer <JWT>" \
    "<https://api.livekit.cloud/v1/projects/PROJECT_ID/usage?range=month>"
(If your project uses a region subdomain, use the project’s exact API base URL shown in the Cloud dashboard.) 3) How to compute remaining inference credits • Find your plan’s included inference credits on Cloud → Project → Billing/Plan. • From
lk usage get
or the API response, locate LLM/inference rows and note
cost
or token counts. • Remaining = included_credits − sum(inference_costs) (export CSV to compute precisely). 4) Troubleshooting tips • “Invalid authorization token” means you passed the raw API key or secret as Bearer. Generate a JWT as above. • Ensure PROJECT_ID and API base URL match the project shown in cloud.livekit.io. • If
lk cloud auth
fails, clear CLI cache (~/.livekit/) and retry. • Paste the JSON output from the
curl
(redact secrets) and I can compute remaining credits for you. If you want, tell me which option you prefer (CLI or API) and your PROJECT_ID format, and I’ll provide the exact command with placeholders ready to run. Sources: Deploying to production | LiveKit Docs | Server-side | livekit/livekit_composite | DeepWiki
l
lk usage isnt working
t
Sorry that’s blocking — let’s fix it quickly. First: what exact command and full error output do you see when you run
lk usage
(or
lk usage get ...
)? Paste the error text. While you paste that, try these checks in order: 1) Re-authenticate the CLI (recommended) • Run:
Copy code
lk cloud auth
Complete the browser flow. After success, retry:
Copy code
lk usage get --project PROJECT_ID --range month
2) Ensure CLI is installed and up to date • Reinstall/update:
Copy code
npm install -g @livekit/cli
  lk --version
3) Verify CLI config and saved credentials • Open: ~/.livekit/config.json (or ~/.livekit/credentials) and confirm a valid session exists. • If corrupt, remove
~/.livekit/
and run
lk cloud auth
again. 4) If you must use API keys, generate a JWT and call the API directly • Generate JWT (Node.js):
Copy code
// npm i livekit-server-sdk
  import { AccessToken } from "livekit-server-sdk";
  const at = new AccessToken("YOUR_API_KEY","YOUR_API_SECRET");
  at.ttl = 600;
  const jwt = at.toJwt();
  console.log(jwt);
• Call usage endpoint:
Copy code
curl -H "Authorization: Bearer <JWT>" \
    "<https://api.livekit.cloud/v1/projects/PROJECT_ID/usage?range=month>"
(Use your project’s exact API base URL from the Cloud dashboard if different.) 5) Common causes and fixes • Error: “invalid authorization token” → you passed API secret as Bearer. Generate JWT instead. • Error: “forbidden/unauthorized” → wrong PROJECT_ID or JWT signed with different project keys. • Error: network/502 → try again or confirm correct API base URL for your region. Send me: • The exact
lk
command you ran and the full error output, and • Your PROJECT_ID (or confirm you want me to use placeholders) I’ll diagnose the error immediately and give the exact command that will work.
l
lk NAME: lk - CLI client to LiveKit USAGE: lk [global options] [command [command options]] VERSION: 2.12.9 DESCRIPTION: A suite of command line utilities allowing you to access LiveKit APIs services, interact with rooms in realtime, and perform load testing simulations. COMMANDS: app Initialize and manage applications agent, a Manage LiveKit Cloud Agents cloud Interact with LiveKit Cloud services project Add or remove projects and view existing project properties room Create or delete rooms and manage existing room properties token Create access tokens with granular capabilities dispatch Create, list, and delete agent dispatches egress Record or stream media from LiveKit to elsewhere ingress Import outside media sources into a LiveKit room sip Manage SIP Trunks, Dispatch Rules, and Participants perf Performance testing commands GLOBAL OPTIONS: --url URL URL to LiveKit instance (default: "http://localhost:7880") [$LIVEKIT_URL] --api-key KEY Your KEY [$LIVEKIT_API_KEY] --api-secret SECRET Your SECRET [$LIVEKIT_API_SECRET] --dev Use developer credentials for local LiveKit server (default: false) --project NAME NAME of a configured project --subdomain SUBDOMAIN SUBDOMAIN of a configured project --config TOML Config TOML to use in the working directory (default: "livekit.toml") --curl Print curl commands for API actions (default: false) --verbose (default: false) --help, -h show help --version, -v print the version ~$ lk usage No help topic for 'usage'. list-ingress
t
Thanks —
lk usage
isn't a valid command. To get inference usage/remaining with the CLI or API, follow one of these exact paths. Option A — Quick & reliable: Cloud dashboard (recommended) • Go to: https://cloud.livekit.io → select your project → Billing / Usage or Plan details. • The dashboard shows included inference credits; your monthly usage lines (tokens / minutes) are the consumption. Remaining = included allowance − consumed amount. Option B — CLI via browser auth (works without creating JWT manually) 1. Install/update CLI:
Copy code
npm install -g @livekit/cli
1. Authenticate via browser:
Copy code
lk cloud auth
Complete the web flow. This stores credentials in ~/.livekit/. 1. Get project usage (month-to-date):
Copy code
lk cloud usage get --project PROJECT_ID --range month
If that subcommand is unavailable on your CLI version, export CSV:
Copy code
lk cloud usage export --project PROJECT_ID --range month --output usage.csv
Option C — Direct API (requires JWT signed with your project key/secret) 1. Generate short-lived JWT (Node.js):
Copy code
// npm i livekit-server-sdk
   import { AccessToken } from "livekit-server-sdk";
   const at = new AccessToken("YOUR_API_KEY","YOUR_API_SECRET");
   at.ttl = 600;
   const jwt = at.toJwt();
   console.log(jwt);
1. Call usage endpoint (replace API base with your project URL if different):
Copy code
curl -H "Authorization: Bearer <JWT>" \
     "<https://api.livekit.cloud/v1/projects/PROJECT_ID/usage?range=month>"
1. From the JSON, locate inference/LLM entries and use
cost
or
amount
to compute remaining: Remaining = plan_included_inference_credits − sum(inference_costs) Troubleshooting common failures • "invalid authorization token": you passed the API secret or API key as Bearer. Do NOT do that — generate a JWT as shown. •
lk cloud auth
fails: remove ~/.livekit/ credentials and retry. Confirm
lk --version
is up to date. • If
lk cloud usage get
subcommand isn't present, use
lk cloud usage export
or the API + JWT method above. If you want, paste: • The exact
lk
command you ran and the full error output, OR • The JSON returned by the API call (redact secrets) I’ll parse it and compute your remaining inference credits for this month. Which do you prefer me to help with: CLI auth fix, run the API call for you (you paste output), or compute remaining from your usage CSV?
l
invalid API key for domain api.livekit.cloud
t
Thanks — that “invalid API key for domain api.livekit.cloud” means the CLI/API call is using credentials that don’t match the LiveKit Cloud domain. Let’s get you a working method to fetch inference usage. Quick checklist (most common fixes) • Use your LiveKit Cloud project credentials (not a local/self‑hosted key). • Don’t pass the API secret as a Bearer token — generate a JWT signed with your API key+secret. • Prefer browser auth for the CLI: run
lk cloud auth
and follow the flow. Two working ways to get usage (pick one) A) Recommended — CLI via browser auth 1. Install/update CLI: npm install -g @livekit/cli 1. Authenticate (opens browser): lk cloud auth 1. Get monthly usage (replace PROJECT_ID): lk cloud usage get --project PROJECT_ID --range month 1. Or export CSV: lk cloud usage export --project PROJECT_ID --range month --output usage.csv If
lk cloud auth
fails, remove ~/.livekit/ then retry. B) Direct API (requires JWT signed with project API key + secret) 1. Create short‑lived JWT (Node.js):
Copy code
// npm i livekit-server-sdk
   import { AccessToken } from "livekit-server-sdk";
   const at = new AccessToken("YOUR_API_KEY","YOUR_API_SECRET");
   at.ttl = 600;
   const jwt = at.toJwt();
   console.log(jwt);
1. Call usage endpoint (replace PROJECT_ID and use your project’s API base if region differs): curl -H "Authorization: Bearer <JWT>" \ "https://api.livekit.cloud/v1/projects/PROJECT_ID/usage?range=month" 1. In the JSON, locate LLM / inference rows and use
cost
(or
amount
) to compute remaining: Remaining = plan_included_inference_credits − sum(inference_costs) If you still get “invalid API key for domain” • Confirm you’re using the Cloud project keys (Project → Settings → API keys at cloud.livekit.io). • Ensure LIVEKIT_URL or CLI flags point to the Cloud domain (no localhost). Example env: export LIVEKIT_API_KEY=your_api_key export LIVEKIT_API_SECRET=your_api_secret export LIVEKIT_URL=https://your-subdomain.livekit.cloud • If using direct API, verify you used the JWT generated by the same API key/secret for that project. If you want, paste: • The exact command you ran and the full error output, OR • The JWT (redact) and curl response body — I’ll diagnose immediately and compute your remaining inference credits. Which do you prefer? Sources: Voice AI quickstart | LiveKit docs | Mini tutorial: setting up a LiveKit Cloud project | Server-side | livekit/livekit_composite | DeepWiki | Deploying to production | LiveKit Docs | Python SDKs | livekit/livekit_composite | DeepWiki