LiveKit
title: LiveKit subtitle: Using OpenRouter with LiveKit Agents headline: ‘LiveKit Integration | OpenRouter SDK Support’ canonical-url: https://openrouter.ai/docs/guides/community/livekit og:site_name: OpenRouter Documentation og:title: ‘LiveKit Integration - OpenRouter SDK Support’ og:description: ‘Integrate OpenRouter using LiveKit Agents framework. Complete guide for LiveKit integration with OpenRouter to build voice AI agents with access to 500+ models.’ og:image: https://openrouter.ai/dynamic-og?title=LiveKit&description=LiveKit%20Integration og:image:width: 1200 og:image:height: 630 twitter:card: summary_large_image twitter:site: ‘@OpenRouterAI’ noindex: false nofollow: false
Using LiveKit Agents
LiveKit Agents is an open-source framework for building voice AI agents. The OpenRouter plugin allows you to access 500+ AI models from multiple providers through a unified API, with automatic fallback support and intelligent routing.
Installation
Install the OpenAI plugin to add OpenRouter support:
Authentication
The OpenRouter plugin requires an OpenRouter API key. Set OPENROUTER_API_KEY in your .env file.
Basic Usage
Create an OpenRouter LLM using the with_openrouter method:
Python
Advanced Features
Fallback Models
Configure multiple fallback models to use if the primary model is unavailable:
Python
Provider Routing
Control which providers are used for model inference:
Python
Web Search Plugin
Enable OpenRouter’s web search capabilities:
Python
Analytics Integration
Include site and app information for OpenRouter analytics:
Python