Prompt Buddy logoPrompt Buddy

google · Google AI Docs

Gemini API Get started with Gemini Live API using WebSockets

Provides a step-by-step implementation guide for establishing a real-time connection to the Gemini Live API using raw WebSockets.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Gemini API Get started with Gemini Live API using WebSockets

Provides a step-by-step implementation guide for establishing a real-time connection to the Gemini Live API using raw WebSockets.

When To Use

Use when you need to implement a real-time, low-latency bidirectional communication channel with the Gemini Live API using WebSockets instead of a high-level SDK.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/gemini-api-get-started-with-live-using-websockets-workflow-guide.mdA guide explaining how to integrate with the Gemini Live API using WebSockets for real-time bidirectional audio, video, and text interaction.Questions about a guide explaining how to integrate with the Gemini Live API using WebSockets for real-time bidirectional audio, vide...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-live-websoc.textThe WebSocket URL endpoint used to establish a bidirectional connection with the Gemini Live API.Exact payloads, commands, or snippets shown in The WebSocket URL endpoint used to establish a bidirectional connection with the Gemini Live API.
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-live-websoc-2.textThe WebSocket URL endpoint used to establish a bidirectional connection with the Gemini Live API.Exact payloads, commands, or snippets shown in The WebSocket URL endpoint used to establish a bidirectional connection with the Gemini Live API.
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-live-websoc-3.textA Python script demonstrating how to establish a bidirectional WebSocket connection to the Gemini Live API using the websockets library.Exact payloads, commands, or snippets shown in A Python script demonstrating how to establish a bidirectional WebSocket connection to the Gemini Live API using the...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-websockets-.textA JavaScript code snippet demonstrating how to establish a WebSocket connection to the Gemini Live API using a specific model and API key.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to establish a WebSocket connection to the Gemini Live API using a specif...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-live-websoc-4.textA Python asynchronous function demonstrating how to format and send a realtimeInput text message over a Gemini Live API WebSocket connection.Exact payloads, commands, or snippets shown in A Python asynchronous function demonstrating how to format and send a realtimeInput text message over a Gemini Live A...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-websockets--2.textA JavaScript function demonstrating how to send a text message via a WebSocket connection to the Gemini Live API.Exact payloads, commands, or snippets shown in A JavaScript function demonstrating how to send a text message via a WebSocket connection to the Gemini Live API.
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-python-webs.textA Python function demonstrating how to base64 encode and send audio PCM chunks over a Gemini API WebSocket connection.Exact payloads, commands, or snippets shown in A Python function demonstrating how to base64 encode and send audio PCM chunks over a Gemini API WebSocket connection.
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-live-websoc-5.textA JavaScript function demonstrating how to encode raw PCM audio buffers into base64 and send them as realtimeInput messages over a WebSocket connection.Exact payloads, commands, or snippets shown in A JavaScript function demonstrating how to encode raw PCM audio buffers into base64 and send them as realtimeInput me...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-python-webs-2.textA Python function demonstrating how to encode and send video frames as base64 data over a Gemini API WebSocket connection.Exact payloads, commands, or snippets shown in A Python function demonstrating how to encode and send video frames as base64 data over a Gemini API WebSocket connec...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-websockets--3.textA JavaScript function demonstrating how to encode and send a JPEG video frame as a base64-encoded realtimeInput message over a WebSocket connection.Exact payloads, commands, or snippets shown in A JavaScript function demonstrating how to encode and send a JPEG video frame as a base64-encoded realtimeInput messa...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-live-websoc-6.textA Python asynchronous function demonstrating how to iterate through and parse incoming messages from a Gemini Live API WebSocket connection.Exact payloads, commands, or snippets shown in A Python asynchronous function demonstrating how to iterate through and parse incoming messages from a Gemini Live AP...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-websockets--4.textA JavaScript code snippet demonstrating how to handle and parse incoming server content messages from a Gemini Live API WebSocket connection.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to handle and parse incoming server content messages from a Gemini Live A...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-live-websoc-7.textA Python code snippet demonstrating a placeholder tool function implementation for use with the Gemini Live API via WebSockets.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating a placeholder tool function implementation for use with the Gemini Live API via W...
examples/gemini-api-get-started-with-live-using-websockets-gemini-api-live-websoc-8.textA JavaScript code snippet demonstrating a placeholder tool function implementation for handling tool calls within a Gemini Live API WebSocket session.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating a placeholder tool function implementation for handling tool calls within a G...

What This Skill Covers

  • The Gemini Live API allows for real-time, bidirectional interaction with Gemini models, supporting audio, video, and text inputs and native audio outputs. Th...
  • Main sections: Overview, Authentication, Authentication with Ephemeral Tokens, Connecting to the Live API, Python.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://ai.google.dev/gemini-api/docs/live-api/get-started-websocket