full-terabyte-95216
03/20/2026, 6:47 PMtall-airline-16756
03/20/2026, 6:47 PMtall-airline-16756
03/20/2026, 6:47 PMprompt_cache_key across calls. I can help, but I need a few specifics to give an accurate, actionable answer for your setup.
Could you tell me:
• Which API/SDK and version are you using (OpenAI REST, openai-node, openai-python, or a third party)?
• Which OpenAI endpoint/product are you calling (Chat Completions like gpt-3.5/gpt-4, the Responses API, or another)?
• Is prompt_cache_key a parameter from a library you use, or a key you implemented in your own code? If it’s from a library, what library and version?
• How are you currently sending turns: do you send the entire chat history every request, incremental messages, or use some session identifier?
• Do you want caching to persist across separate HTTP calls/processes (cross-call), or only within a single process/session?
If you prefer, paste a short example of the requests you send (no secrets or API keys) and I’ll explain exactly how caching behaves and whether a cross-call prompt_cache_key will work for your workflow. Once I have that, I’ll outline the recommended approach and steps you can use right away.
, with interactive elementsfull-terabyte-95216
03/20/2026, 6:49 PMtall-airline-16756
03/20/2026, 6:49 PMprompt_cache_key) works across calls when you’re using the LiveKit OpenAI plugin.
Short answer: I don’t have documentation that LiveKit’s OpenAI plugin implements or exposes a prompt_cache_key prompt-caching feature for chat requests, nor is there documentation showing OpenAI-side prompt caching being surfaced through the plugin. LiveKit docs do show OpenAI integrations for LLM, Realtime, STT, and TTS, and they include a TTS-specific cache example for audio reuse, but nothing about caching prompts or a prompt_cache_key for LLM/chat requests.
To give you practical next steps and a concrete recommendation, I need one quick clarification from you:
• Are you trying to reuse a key you control (your own cache layer) across separate HTTP calls/processes, or are you asking whether the LiveKit plugin / OpenAI provider itself supports a built-in prompt_cache_key parameter that persists across calls?
Based on which of those you mean, here’s what I can help with next:
• If you mean a built-in plugin/parameter (plugin/OpenAI supports prompt_cache_key): I’ll confirm that the plugin does not document such a feature and explain alternatives LiveKit supports (for example, re-sending chat history each turn or using the Realtime API session behaviors) and how to architect caching outside the plugin.
• If you mean your own cross-call caching (you want to implement prompt caching yourself): I can outline a simple, safe pattern to cache prompt+response pairs (or embeddings) on your side and reuse them across calls to reduce tokens — including what to cache, cache-key strategies, cache invalidation ideas, and where to insert that into the LiveKit plugin call flow.
Tell me which of the two you mean (built-in prompt_cache_key vs. your own cross-call cache), and if you want the self-managed approach, paste a short example of how you currently send turns (no keys or secrets). I’ll then give step-by-step guidance tailored to your workflow.
Sources: OpenAI Realtime API plugin guide | LiveKit Documentation | OpenAI LLM models | LiveKit Documentation | OpenAI STT plugin guide | LiveKit Documentation | OpenAI TTS plugin guide | LiveKit Documentation | Agent speech and audio | LiveKit Documentation, with interactive elementsfull-terabyte-95216
03/20/2026, 6:50 PMtall-airline-16756
03/20/2026, 6:51 PM