gemini-live-api-dev

Build real-time bidirectional audio and video streaming applications with the Gemini Live API over WebSockets.

Updated May 23, 2026
One-click install
npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill gemini-live-api-dev-kiranimmadi2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-live-api-dev
Source: https://github.com/kiranimmadi2/promptforge-ai/tree/main/gemini-skills/skills/gemini-live-api-dev
Command: npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill gemini-live-api-dev-kiranimmadi2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-genai, @google/genai.

What problem does it solve? Building low-latency voice and video assistants requires navigating WebSocket protocols, audio formats, session limits, and authentication patterns. This Skill provides the operational knowledge to implement real-time streaming applications with the Gemini Live API correctly, avoiding deprecated models and common integration mistakes. ## Core Features & Use Cases - Bidirectional Streaming: Send and receive audio, video, and text in real time using the google-genai Python SDK or @google/genai JavaScript SDK. - Session & Auth Management: Configure voice activity detection, context compression, session resumption, and ephemeral tokens for secure client-side deployments. - Migration Guidance: Migrate from deprecated Gemini 2.5 Live models to gemini-3.1-flash-live-preview with updated thinking and event-handling patterns. - Use Case: Build a browser-based voice assistant that streams microphone audio to Gemini, receives spoken responses, handles interruptions, and grounds answers with Google Search. ## Quick Start Ask the AI to create a Python script that connects to the Gemini Live API, streams microphone audio, and plays back spoken responses with interruption handling.

Frequently Asked Questions about gemini-live-api-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a real-time voice assistant with the Gemini Live API?

Connect via client.aio.live.connect in Python or ai.live.connect in JavaScript with response modality set to audio. Stream microphone input using send_realtime_input as 16-bit PCM at 16kHz, and process all parts in each server event for audio output and transcriptions.

Which SDK should I use for the Gemini Live API, Python or JavaScript?

Use google-genai for Python or @google/genai for JavaScript/TypeScript. The legacy SDKs google-generativeai and @google/generative-ai are deprecated and should not be used for new Live API projects.

Does the Gemini Live API support WebRTC connections?

The Live API only supports WebSockets natively. For WebRTC, use partner integrations such as LiveKit, Pipecat, Fishjam, Vision Agents, Voximplant, or the Firebase AI SDK.

How do I authenticate browser clients without exposing my API key?

Use ephemeral tokens, which are short-lived credentials generated server-side for client-side authentication. This lets browser or mobile apps connect to the Live API without embedding your API key in shipped code.

What are the session limits of the Gemini Live API?

Audio-only sessions last 15 minutes and audio-plus-video sessions 2 minutes without context compression, with connections limited to about 10 minutes. Enable context window compression and session resumption for longer conversations.

How do I migrate from gemini-2.5-flash-native-audio to gemini-3.1-flash-live-preview?

Update the model string, replace thinkingBudget with thinkingLevel, and process all content parts in each server event. Use send_realtime_input for conversation input, and remove proactive audio and affective dialogue configurations, which are not yet supported.