본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)22k · #10263

gemini-live-api

하는 일

이 스킬은 스트리밍 오디오, 영상, 텍스트를 처리하는 실시간 Gemini 클라이언트 코드를 만듭니다. Google Cloud에서 음성이나 영상 비서를 만드는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓Google Cloud에서 Gemini용 실시간 음성 또는 영상 클라이언트를 만들고 싶을 때.
  • ✓세션 재개와 토큰 갱신을 처리하는 Live API 클라이언트가 필요할 때.
  • ✓Gemini 실시간 연결을 테스트할 샘플 프런트엔드와 백엔드가 필요할 때.

스킬 링크

https://github.com/google/skills/blob/main/skills/cloud/gemini-live-api/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/gemini-live-api/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“마이크 소리를 모델로 스트리밍하고 모델의 답변을 재생하는 Gemini Live API 클라이언트를 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Google 로그인에서 받은 토큰으로 WebSocket 연결을 열고, 메시지를 주고받으며 세션을 재개하는 클라이언트 클래스를 작성합니다. 테스트할 수 있도록 데모 프런트엔드와 백엔드도 만듭니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

LiveAPI Service Skill

This skill provides instructions for generating a LiveAPI client service class that connects to the Gemini Enterprise Live API over WebSockets. The generated client handles bidirectional streaming, bearer-token authentication via Application Default Credentials (ADC), transparent session resumption, and ClientMessage / ServerMessage proto exchange.

The skill also produces a demo frontend + backend service so the user can interactively validate the generated client (text, audio, video, transcription, and interrupt handling).

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gemini-live-api)" and append agent-skills/1.0 (skill:gemini-live-api) to User-Agent headers.

Prerequisites

Before running the generation flow, ensure the following are available on the host:

  • A Google Cloud project with the Vertex AI / Gemini Enterprise Agent Platform APIs enabled.

  • Application Default Credentials configured on the host running the generated client:

    gcloud auth application-default login
    
  • A destination output folder supplied by the user (e.g. /tmp/liveapi_out) where the generated code, environment, and demo will be written. Never mutate the host's system Python environment.

  • The user's chosen implementation language (Python is the default and reference language for this skill).

Reference Files

Provided files in references/ (do not treat these as standalone skills — they are loaded on demand):

  • client_server_messages.md: Public reference for the ClientMessage / ServerMessage schemas used by the Live API.
  • client_server_messages.proto: The proto definition generated from client_server_messages.md.
  • session_manager.md: Describes how to correctly handle sessions, buffering, and resumption on disconnection.

Steps

Step 1: Copy the reference files

Copy client_server_messages.md, client_server_messages.proto, and session_manager.md from this skill's references/ folder into the user's destination output folder. These files become the source of truth for the generated client.

Step 2: Reconcile with the public documentation

Examine the public documents linked from client_server_messages.md. If there are any discrepancies between the public documents and the copied client_server_messages.md / client_server_messages.proto, update the copies in the destination folder so the generated client compiles and runs against the current server contract.

Step 3: Implement the client class

Implement a class in the user's chosen language that:

  • Imports the local client_server_messages.proto types (ClientMessage, ServerMessage).
  • Opens a WebSocket connection to the Live API endpoint.
  • Exposes async methods so the user can send and receive data to/from the model.

For languages that require an isolated runtime (e.g. Python), create an isolated environment (e.g. venv) inside the destination folder and generate a bash script (e.g. setup.sh) that recreates the environment and installs dependencies. Never install into the system interpreter or the user's global site-packages, and never instruct the user to run sudo pip install.

Initialization parameters

The user provides the following at construction time:

  • project_id
  • location
  • model_id
  • config: a ClientMessage with the setup field populated.

Authentication

Obtain a bearer token via Application Default Credentials, attach it to the WebSocket connect request as Authorization: Bearer <token>, refresh the token before or upon expiry, and reuse the refreshed token on every reconnection (including go_away and unexpected disconnects). Do not hard-code a long-lived API key as the only auth mechanism.

Public async API

The class MUST expose the following async methods, gated on receipt of a setup_complete ServerMessage before sending:

  • send_realtime_data(data): send realtime input. data is a ClientMessage carrying a realtime_input field.
  • send_client_content(data): send non-realtime, turn-based content that contributes to history. `da
자주 묻는 질문

일반적인 비실시간 Gemini 호출에도 되나요?

아닙니다. 실시간 양방향 연결만을 위한 것입니다.

실행하기 전에 무엇이 필요한가요?

API가 활성화된 Google Cloud 프로젝트와 설정된 Application Default Credentials가 필요합니다.

UI를 만들지 않고도 테스트할 수 있나요?

네. 사용할 수 있는 데모 프런트엔드와 백엔드도 함께 생성합니다.

상세 정보

작성자의 원본 설명

Generates a Gemini LiveAPI client service class in the user's chosen programming language. Use when the user wants to build, scaffold, or integrate a client that connects to the Gemini Enterprise LiveAPI websocket endpoint, handles session setup/resumption, bearer token refresh, and sending/receiving `ClientMessage`/`ServerMessage` protos. Don't use for general (non-live, non-bidirectional) Gemini API usage such as one-shot `generateContent`, embeddings, image/video generation, or fine-tuning — use the `gemini-api` skill for those.

repo: google/skills

인기도

GitHub 스타
22k
순위
#10263
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬