[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-jetbrains-gemini-live-api-dev":3,"mdc-h6n2cq-key":39,"related-org-jetbrains-gemini-live-api-dev":2902,"related-repo-jetbrains-gemini-live-api-dev":3035},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":28,"repoUrl":29,"updatedAt":30,"license":31,"forks":32,"topics":33,"repo":34,"sourceUrl":37,"mdContent":38},"gemini-live-api-dev","build real-time Gemini streaming applications","Use this skill when building real-time, bidirectional streaming applications with the Gemini Live API. Covers WebSocket-based audio\u002Fvideo\u002Ftext streaming, voice activity detection (VAD), native audio features, function calling, session management, ephemeral tokens for client-side auth, and all Live API configuration options. SDKs covered - google-genai (Python), @google\u002Fgenai (JavaScript\u002FTypeScript).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"jetbrains","JetBrains","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fjetbrains.png",[12,16,19,22,25],{"name":13,"slug":14,"type":15},"WebSockets","websockets","tag",{"name":17,"slug":18,"type":15},"Audio","audio",{"name":20,"slug":21,"type":15},"API Development","api-development",{"name":23,"slug":24,"type":15},"Gemini","gemini",{"name":26,"slug":27,"type":15},"Video","video",252,"https:\u002F\u002Fgithub.com\u002FJetBrains\u002Fskills","2026-07-13T06:43:11.915038",null,17,[],{"repoUrl":29,"stars":28,"forks":32,"topics":35,"description":36},[],"Curated agent skills collection verified by JetBrains","https:\u002F\u002Fgithub.com\u002FJetBrains\u002Fskills\u002Ftree\u002FHEAD\u002Fgemini-live-api-dev","---\nname: gemini-live-api-dev\ndescription: Use this skill when building real-time, bidirectional streaming applications with the Gemini Live API. Covers WebSocket-based audio\u002Fvideo\u002Ftext streaming, voice activity detection (VAD), native audio features, function calling, session management, ephemeral tokens for client-side auth, and all Live API configuration options. SDKs covered - google-genai (Python), @google\u002Fgenai (JavaScript\u002FTypeScript).\nmetadata:\n  short-description: \"Build real-time apps with Gemini Live\"\n  author: Google Gemini\n  source: https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-skills\u002Ftree\u002Fmain\u002Fskills\u002Fgemini-live-api-dev\n---\n\n# Gemini Live API Development Skill\n\n## Overview\n\nThe Live API enables **low-latency, real-time voice and video interactions** with Gemini over WebSockets. It processes continuous streams of audio, video, or text to deliver immediate, human-like spoken responses.\n\nKey capabilities:\n- **Bidirectional audio streaming** — real-time mic-to-speaker conversations\n- **Video streaming** — send camera\u002Fscreen frames alongside audio\n- **Text input\u002Foutput** — send and receive text within a live session\n- **Audio transcriptions** — get text transcripts of both input and output audio\n- **Voice Activity Detection (VAD)** — automatic interruption handling\n- **Native audio** — affective dialog, proactive audio, thinking\n- **Function calling** — synchronous and asynchronous tool use\n- **Google Search grounding** — ground responses in real-time search results\n- **Session management** — context compression, session resumption, GoAway signals\n- **Ephemeral tokens** — secure client-side authentication\n\n> [!NOTE]\n> The Live API currently **only supports WebSockets**. For WebRTC support or simplified integration, use a [partner integration](#partner-integrations).\n\n## Models\n\n- `gemini-2.5-flash-native-audio-preview-12-2025` — Native audio output, affective dialog, proactive audio, thinking. 128k context window. **This is the recommended model for all Live API use cases.**\n\n> [!WARNING]\n> The following Live API models are **deprecated** and will be shut down. Migrate to `gemini-2.5-flash-native-audio-preview-12-2025`.\n> - `gemini-live-2.5-flash-preview` — Released June 17, 2025. Shutdown: December 9, 2025.\n> - `gemini-2.0-flash-live-001` — Released April 9, 2025. Shutdown: December 9, 2025.\n\n## SDKs\n\n- **Python**: `google-genai` — `pip install google-genai`\n- **JavaScript\u002FTypeScript**: `@google\u002Fgenai` — `npm install @google\u002Fgenai`\n\n> [!WARNING]\n> Legacy SDKs `google-generativeai` (Python) and `@google\u002Fgenerative-ai` (JS) are deprecated. Use the new SDKs above.\n\n## Partner Integrations\n\nTo streamline real-time audio\u002Fvideo app development, use a third-party integration supporting the Gemini Live API over **WebRTC** or **WebSockets**:\n\n- [LiveKit](https:\u002F\u002Fdocs.livekit.io\u002Fagents\u002Fmodels\u002Frealtime\u002Fplugins\u002Fgemini\u002F) — Use the Gemini Live API with LiveKit Agents.\n- [Pipecat by Daily](https:\u002F\u002Fdocs.pipecat.ai\u002Fguides\u002Ffeatures\u002Fgemini-live) — Create a real-time AI chatbot using Gemini Live and Pipecat.\n- [Fishjam by Software Mansion](https:\u002F\u002Fdocs.fishjam.io\u002Ftutorials\u002Fgemini-live-integration) — Create live video and audio streaming applications with Fishjam.\n- [Vision Agents by Stream](https:\u002F\u002Fvisionagents.ai\u002Fintegrations\u002Fgemini) — Build real-time voice and video AI applications with Vision Agents.\n- [Voximplant](https:\u002F\u002Fvoximplant.com\u002Fproducts\u002Fgemini-client) — Connect inbound and outbound calls to Live API with Voximplant.\n- [Firebase AI SDK](https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Flive-api?api=dev) — Get started with the Gemini Live API using Firebase AI Logic.\n\n## Audio Formats\n\n- **Input**: Raw PCM, little-endian, 16-bit, mono. 16kHz native (will resample others). MIME type: `audio\u002Fpcm;rate=16000`\n- **Output**: Raw PCM, little-endian, 16-bit, mono. 24kHz sample rate.\n\n> [!IMPORTANT]\n> Use `send_realtime_input` \u002F `sendRealtimeInput` for all real-time user input (audio, video, **and text**). Use `send_client_content` \u002F `sendClientContent` **only** for incremental conversation history updates (appending prior turns to context), not for sending new user messages.\n\n> [!WARNING]\n> Do **not** use `media` in `sendRealtimeInput`. Use the specific keys: `audio` for audio data, `video` for images\u002Fvideo frames, and `text` for text input.\n\n---\n\n## Quick Start\n\n### Authentication\n\n#### Python\n\n```python\nfrom google import genai\n\nclient = genai.Client(api_key=\"YOUR_API_KEY\")\n```\n\n#### JavaScript\n\n```js\nimport { GoogleGenAI } from '@google\u002Fgenai';\n\nconst ai = new GoogleGenAI({ apiKey: 'YOUR_API_KEY' });\n```\n\n### Connecting to the Live API\n\n#### Python\n```python\nfrom google.genai import types\n\nconfig = types.LiveConnectConfig(\n    response_modalities=[types.Modality.AUDIO],\n    system_instruction=types.Content(\n        parts=[types.Part(text=\"You are a helpful assistant.\")]\n    )\n)\n\nasync with client.aio.live.connect(model=\"gemini-2.5-flash-native-audio-preview-12-2025\", config=config) as session:\n    pass  # Session is now active\n```\n\n#### JavaScript\n```js\nconst session = await ai.live.connect({\n  model: 'gemini-2.5-flash-native-audio-preview-12-2025',\n  config: {\n    responseModalities: ['audio'],\n    systemInstruction: { parts: [{ text: 'You are a helpful assistant.' }] }\n  },\n  callbacks: {\n    onopen: () => console.log('Connected'),\n    onmessage: (response) => console.log('Message:', response),\n    onerror: (error) => console.error('Error:', error),\n    onclose: () => console.log('Closed')\n  }\n});\n```\n\n### Sending Text\n\n#### Python\n```python\nawait session.send_realtime_input(text=\"Hello, how are you?\")\n```\n\n#### JavaScript\n```js\nsession.sendRealtimeInput({ text: 'Hello, how are you?' });\n```\n\n### Sending Audio\n\n#### Python\n```python\nawait session.send_realtime_input(\n    audio=types.Blob(data=chunk, mime_type=\"audio\u002Fpcm;rate=16000\")\n)\n```\n\n#### JavaScript\n```js\nsession.sendRealtimeInput({\n  audio: { data: chunk.toString('base64'), mimeType: 'audio\u002Fpcm;rate=16000' }\n});\n```\n\n### Sending Video\n\n#### Python\n```python\n# frame: raw JPEG-encoded bytes\nawait session.send_realtime_input(\n    video=types.Blob(data=frame, mime_type=\"image\u002Fjpeg\")\n)\n```\n\n#### JavaScript\n```js\nsession.sendRealtimeInput({\n  video: { data: frame.toString('base64'), mimeType: 'image\u002Fjpeg' }\n});\n```\n\n### Receiving Audio and Text\n\n#### Python\n```python\nasync for response in session.receive():\n    content = response.server_content\n    if content:\n        # Audio\n        if content.model_turn:\n            for part in content.model_turn.parts:\n                if part.inline_data:\n                    audio_data = part.inline_data.data\n        # Transcription\n        if content.input_transcription:\n            print(f\"User: {content.input_transcription.text}\")\n        if content.output_transcription:\n            print(f\"Gemini: {content.output_transcription.text}\")\n        # Interruption\n        if content.interrupted is True:\n            pass  # Stop playback, clear audio queue\n```\n\n#### JavaScript\n```js\n\u002F\u002F Inside the onmessage callback\nconst content = response.serverContent;\nif (content?.modelTurn?.parts) {\n  for (const part of content.modelTurn.parts) {\n    if (part.inlineData) {\n      const audioData = part.inlineData.data; \u002F\u002F Base64 encoded\n    }\n  }\n}\nif (content?.inputTranscription) console.log('User:', content.inputTranscription.text);\nif (content?.outputTranscription) console.log('Gemini:', content.outputTranscription.text);\nif (content?.interrupted) { \u002F* Stop playback, clear audio queue *\u002F }\n```\n\n---\n\n## Limitations\n\n- **Response modality** — Only `TEXT` **or** `AUDIO` per session, not both\n- **Audio-only session** — 15 min without compression\n- **Audio+video session** — 2 min without compression\n- **Connection lifetime** — ~10 min (use session resumption)\n- **Context window** — 128k tokens (native audio) \u002F 32k tokens (standard)\n- **Code execution** — Not supported\n- **URL context** — Not supported\n\n## Best Practices\n\n1. **Use headphones** when testing mic audio to prevent echo\u002Fself-interruption\n2. **Enable context window compression** for sessions longer than 15 minutes\n3. **Implement session resumption** to handle connection resets gracefully\n4. **Use ephemeral tokens** for client-side deployments — never expose API keys in browsers\n5. **Use `send_realtime_input`** for all real-time user input (audio, video, text). Reserve `send_client_content` only for injecting conversation history\n6. **Send `audioStreamEnd`** when the mic is paused to flush cached audio\n7. **Clear audio playback queues** on interruption signals\n\n## How to use the Gemini API\n\nFor detailed API documentation, fetch from the official docs index:\n\n**llms.txt URL**: `https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fllms.txt`\n\nThis index contains links to all documentation pages in `.md.txt` format. Use web fetch tools to:\n\n1. Fetch `llms.txt` to discover available documentation pages\n2. Fetch specific pages (e.g., `https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Flive-session.md.txt`)\n\n### Key Documentation Pages \n\n> [!IMPORTANT]\n> Those are not all the documentation pages. Use the `llms.txt` index to discover available documentation pages\n\n- [Live API Overview](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Flive.md.txt) — getting started, raw WebSocket usage\n- [Live API Capabilities Guide](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Flive-guide.md.txt) — voice config, transcription config, native audio (affective dialog, proactive audio, thinking), VAD configuration, media resolution\n- [Live API Tool Use](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Flive-tools.md.txt) — function calling (sync and async), Google Search grounding\n- [Session Management](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Flive-session.md.txt) — context window compression, session resumption, GoAway signals\n- [Ephemeral Tokens](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fephemeral-tokens.md.txt) — secure client-side authentication for browser\u002Fmobile\n- [WebSockets API Reference](https:\u002F\u002Fai.google.dev\u002Fapi\u002Flive.md.txt) — raw WebSocket protocol details\n\n## Supported Languages\n\nThe Live API supports 70 languages including: English, Spanish, French, German, Italian, Portuguese, Chinese, Japanese, Korean, Hindi, Arabic, Russian, and many more. Native audio models automatically detect and switch languages.\n",{"data":40,"body":45},{"name":4,"description":6,"metadata":41},{"short-description":42,"author":43,"source":44},"Build real-time apps with Gemini Live","Google Gemini","https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-skills\u002Ftree\u002Fmain\u002Fskills\u002Fgemini-live-api-dev",{"type":46,"children":47},"root",[48,57,64,78,83,188,219,225,245,296,302,351,379,385,403,479,485,514,572,627,631,637,644,650,689,695,837,843,848,949,954,1476,1482,1487,1501,1506,1570,1576,1581,1611,1616,1751,1757,1762,1799,1804,1935,1941,1946,2084,2089,2519,2522,2528,2621,2627,2719,2725,2730,2745,2758,2786,2792,2811,2885,2891,2896],{"type":49,"tag":50,"props":51,"children":53},"element","h1",{"id":52},"gemini-live-api-development-skill",[54],{"type":55,"value":56},"text","Gemini Live API Development Skill",{"type":49,"tag":58,"props":59,"children":61},"h2",{"id":60},"overview",[62],{"type":55,"value":63},"Overview",{"type":49,"tag":65,"props":66,"children":67},"p",{},[68,70,76],{"type":55,"value":69},"The Live API enables ",{"type":49,"tag":71,"props":72,"children":73},"strong",{},[74],{"type":55,"value":75},"low-latency, real-time voice and video interactions",{"type":55,"value":77}," with Gemini over WebSockets. It processes continuous streams of audio, video, or text to deliver immediate, human-like spoken responses.",{"type":49,"tag":65,"props":79,"children":80},{},[81],{"type":55,"value":82},"Key capabilities:",{"type":49,"tag":84,"props":85,"children":86},"ul",{},[87,98,108,118,128,138,148,158,168,178],{"type":49,"tag":88,"props":89,"children":90},"li",{},[91,96],{"type":49,"tag":71,"props":92,"children":93},{},[94],{"type":55,"value":95},"Bidirectional audio streaming",{"type":55,"value":97}," — real-time mic-to-speaker conversations",{"type":49,"tag":88,"props":99,"children":100},{},[101,106],{"type":49,"tag":71,"props":102,"children":103},{},[104],{"type":55,"value":105},"Video streaming",{"type":55,"value":107}," — send camera\u002Fscreen frames alongside audio",{"type":49,"tag":88,"props":109,"children":110},{},[111,116],{"type":49,"tag":71,"props":112,"children":113},{},[114],{"type":55,"value":115},"Text input\u002Foutput",{"type":55,"value":117}," — send and receive text within a live session",{"type":49,"tag":88,"props":119,"children":120},{},[121,126],{"type":49,"tag":71,"props":122,"children":123},{},[124],{"type":55,"value":125},"Audio transcriptions",{"type":55,"value":127}," — get text transcripts of both input and output audio",{"type":49,"tag":88,"props":129,"children":130},{},[131,136],{"type":49,"tag":71,"props":132,"children":133},{},[134],{"type":55,"value":135},"Voice Activity Detection (VAD)",{"type":55,"value":137}," — automatic interruption handling",{"type":49,"tag":88,"props":139,"children":140},{},[141,146],{"type":49,"tag":71,"props":142,"children":143},{},[144],{"type":55,"value":145},"Native audio",{"type":55,"value":147}," — affective dialog, proactive audio, thinking",{"type":49,"tag":88,"props":149,"children":150},{},[151,156],{"type":49,"tag":71,"props":152,"children":153},{},[154],{"type":55,"value":155},"Function calling",{"type":55,"value":157}," — synchronous and asynchronous tool use",{"type":49,"tag":88,"props":159,"children":160},{},[161,166],{"type":49,"tag":71,"props":162,"children":163},{},[164],{"type":55,"value":165},"Google Search grounding",{"type":55,"value":167}," — ground responses in real-time search results",{"type":49,"tag":88,"props":169,"children":170},{},[171,176],{"type":49,"tag":71,"props":172,"children":173},{},[174],{"type":55,"value":175},"Session management",{"type":55,"value":177}," — context compression, session resumption, GoAway signals",{"type":49,"tag":88,"props":179,"children":180},{},[181,186],{"type":49,"tag":71,"props":182,"children":183},{},[184],{"type":55,"value":185},"Ephemeral tokens",{"type":55,"value":187}," — secure client-side authentication",{"type":49,"tag":189,"props":190,"children":191},"blockquote",{},[192],{"type":49,"tag":65,"props":193,"children":194},{},[195,201,203,208,210,217],{"type":49,"tag":196,"props":197,"children":198},"span",{},[199],{"type":55,"value":200},"!NOTE",{"type":55,"value":202},"\nThe Live API currently ",{"type":49,"tag":71,"props":204,"children":205},{},[206],{"type":55,"value":207},"only supports WebSockets",{"type":55,"value":209},". For WebRTC support or simplified integration, use a ",{"type":49,"tag":211,"props":212,"children":214},"a",{"href":213},"#partner-integrations",[215],{"type":55,"value":216},"partner integration",{"type":55,"value":218},".",{"type":49,"tag":58,"props":220,"children":222},{"id":221},"models",[223],{"type":55,"value":224},"Models",{"type":49,"tag":84,"props":226,"children":227},{},[228],{"type":49,"tag":88,"props":229,"children":230},{},[231,238,240],{"type":49,"tag":232,"props":233,"children":235},"code",{"className":234},[],[236],{"type":55,"value":237},"gemini-2.5-flash-native-audio-preview-12-2025",{"type":55,"value":239}," — Native audio output, affective dialog, proactive audio, thinking. 128k context window. ",{"type":49,"tag":71,"props":241,"children":242},{},[243],{"type":55,"value":244},"This is the recommended model for all Live API use cases.",{"type":49,"tag":189,"props":246,"children":247},{},[248,271],{"type":49,"tag":65,"props":249,"children":250},{},[251,256,258,263,265,270],{"type":49,"tag":196,"props":252,"children":253},{},[254],{"type":55,"value":255},"!WARNING",{"type":55,"value":257},"\nThe following Live API models are ",{"type":49,"tag":71,"props":259,"children":260},{},[261],{"type":55,"value":262},"deprecated",{"type":55,"value":264}," and will be shut down. Migrate to ",{"type":49,"tag":232,"props":266,"children":268},{"className":267},[],[269],{"type":55,"value":237},{"type":55,"value":218},{"type":49,"tag":84,"props":272,"children":273},{},[274,285],{"type":49,"tag":88,"props":275,"children":276},{},[277,283],{"type":49,"tag":232,"props":278,"children":280},{"className":279},[],[281],{"type":55,"value":282},"gemini-live-2.5-flash-preview",{"type":55,"value":284}," — Released June 17, 2025. Shutdown: December 9, 2025.",{"type":49,"tag":88,"props":286,"children":287},{},[288,294],{"type":49,"tag":232,"props":289,"children":291},{"className":290},[],[292],{"type":55,"value":293},"gemini-2.0-flash-live-001",{"type":55,"value":295}," — Released April 9, 2025. Shutdown: December 9, 2025.",{"type":49,"tag":58,"props":297,"children":299},{"id":298},"sdks",[300],{"type":55,"value":301},"SDKs",{"type":49,"tag":84,"props":303,"children":304},{},[305,329],{"type":49,"tag":88,"props":306,"children":307},{},[308,313,315,321,323],{"type":49,"tag":71,"props":309,"children":310},{},[311],{"type":55,"value":312},"Python",{"type":55,"value":314},": ",{"type":49,"tag":232,"props":316,"children":318},{"className":317},[],[319],{"type":55,"value":320},"google-genai",{"type":55,"value":322}," — ",{"type":49,"tag":232,"props":324,"children":326},{"className":325},[],[327],{"type":55,"value":328},"pip install google-genai",{"type":49,"tag":88,"props":330,"children":331},{},[332,337,338,344,345],{"type":49,"tag":71,"props":333,"children":334},{},[335],{"type":55,"value":336},"JavaScript\u002FTypeScript",{"type":55,"value":314},{"type":49,"tag":232,"props":339,"children":341},{"className":340},[],[342],{"type":55,"value":343},"@google\u002Fgenai",{"type":55,"value":322},{"type":49,"tag":232,"props":346,"children":348},{"className":347},[],[349],{"type":55,"value":350},"npm install @google\u002Fgenai",{"type":49,"tag":189,"props":352,"children":353},{},[354],{"type":49,"tag":65,"props":355,"children":356},{},[357,361,363,369,371,377],{"type":49,"tag":196,"props":358,"children":359},{},[360],{"type":55,"value":255},{"type":55,"value":362},"\nLegacy SDKs ",{"type":49,"tag":232,"props":364,"children":366},{"className":365},[],[367],{"type":55,"value":368},"google-generativeai",{"type":55,"value":370}," (Python) and ",{"type":49,"tag":232,"props":372,"children":374},{"className":373},[],[375],{"type":55,"value":376},"@google\u002Fgenerative-ai",{"type":55,"value":378}," (JS) are deprecated. Use the new SDKs above.",{"type":49,"tag":58,"props":380,"children":382},{"id":381},"partner-integrations",[383],{"type":55,"value":384},"Partner Integrations",{"type":49,"tag":65,"props":386,"children":387},{},[388,390,395,397,401],{"type":55,"value":389},"To streamline real-time audio\u002Fvideo app development, use a third-party integration supporting the Gemini Live API over ",{"type":49,"tag":71,"props":391,"children":392},{},[393],{"type":55,"value":394},"WebRTC",{"type":55,"value":396}," or ",{"type":49,"tag":71,"props":398,"children":399},{},[400],{"type":55,"value":13},{"type":55,"value":402},":",{"type":49,"tag":84,"props":404,"children":405},{},[406,419,431,443,455,467],{"type":49,"tag":88,"props":407,"children":408},{},[409,417],{"type":49,"tag":211,"props":410,"children":414},{"href":411,"rel":412},"https:\u002F\u002Fdocs.livekit.io\u002Fagents\u002Fmodels\u002Frealtime\u002Fplugins\u002Fgemini\u002F",[413],"nofollow",[415],{"type":55,"value":416},"LiveKit",{"type":55,"value":418}," — Use the Gemini Live API with LiveKit Agents.",{"type":49,"tag":88,"props":420,"children":421},{},[422,429],{"type":49,"tag":211,"props":423,"children":426},{"href":424,"rel":425},"https:\u002F\u002Fdocs.pipecat.ai\u002Fguides\u002Ffeatures\u002Fgemini-live",[413],[427],{"type":55,"value":428},"Pipecat by Daily",{"type":55,"value":430}," — Create a real-time AI chatbot using Gemini Live and Pipecat.",{"type":49,"tag":88,"props":432,"children":433},{},[434,441],{"type":49,"tag":211,"props":435,"children":438},{"href":436,"rel":437},"https:\u002F\u002Fdocs.fishjam.io\u002Ftutorials\u002Fgemini-live-integration",[413],[439],{"type":55,"value":440},"Fishjam by Software Mansion",{"type":55,"value":442}," — Create live video and audio streaming applications with Fishjam.",{"type":49,"tag":88,"props":444,"children":445},{},[446,453],{"type":49,"tag":211,"props":447,"children":450},{"href":448,"rel":449},"https:\u002F\u002Fvisionagents.ai\u002Fintegrations\u002Fgemini",[413],[451],{"type":55,"value":452},"Vision Agents by Stream",{"type":55,"value":454}," — Build real-time voice and video AI applications with Vision Agents.",{"type":49,"tag":88,"props":456,"children":457},{},[458,465],{"type":49,"tag":211,"props":459,"children":462},{"href":460,"rel":461},"https:\u002F\u002Fvoximplant.com\u002Fproducts\u002Fgemini-client",[413],[463],{"type":55,"value":464},"Voximplant",{"type":55,"value":466}," — Connect inbound and outbound calls to Live API with Voximplant.",{"type":49,"tag":88,"props":468,"children":469},{},[470,477],{"type":49,"tag":211,"props":471,"children":474},{"href":472,"rel":473},"https:\u002F\u002Ffirebase.google.com\u002Fdocs\u002Fai-logic\u002Flive-api?api=dev",[413],[475],{"type":55,"value":476},"Firebase AI SDK",{"type":55,"value":478}," — Get started with the Gemini Live API using Firebase AI Logic.",{"type":49,"tag":58,"props":480,"children":482},{"id":481},"audio-formats",[483],{"type":55,"value":484},"Audio Formats",{"type":49,"tag":84,"props":486,"children":487},{},[488,504],{"type":49,"tag":88,"props":489,"children":490},{},[491,496,498],{"type":49,"tag":71,"props":492,"children":493},{},[494],{"type":55,"value":495},"Input",{"type":55,"value":497},": Raw PCM, little-endian, 16-bit, mono. 16kHz native (will resample others). MIME type: ",{"type":49,"tag":232,"props":499,"children":501},{"className":500},[],[502],{"type":55,"value":503},"audio\u002Fpcm;rate=16000",{"type":49,"tag":88,"props":505,"children":506},{},[507,512],{"type":49,"tag":71,"props":508,"children":509},{},[510],{"type":55,"value":511},"Output",{"type":55,"value":513},": Raw PCM, little-endian, 16-bit, mono. 24kHz sample rate.",{"type":49,"tag":189,"props":515,"children":516},{},[517],{"type":49,"tag":65,"props":518,"children":519},{},[520,525,527,533,535,541,543,548,550,556,557,563,565,570],{"type":49,"tag":196,"props":521,"children":522},{},[523],{"type":55,"value":524},"!IMPORTANT",{"type":55,"value":526},"\nUse ",{"type":49,"tag":232,"props":528,"children":530},{"className":529},[],[531],{"type":55,"value":532},"send_realtime_input",{"type":55,"value":534}," \u002F ",{"type":49,"tag":232,"props":536,"children":538},{"className":537},[],[539],{"type":55,"value":540},"sendRealtimeInput",{"type":55,"value":542}," for all real-time user input (audio, video, ",{"type":49,"tag":71,"props":544,"children":545},{},[546],{"type":55,"value":547},"and text",{"type":55,"value":549},"). Use ",{"type":49,"tag":232,"props":551,"children":553},{"className":552},[],[554],{"type":55,"value":555},"send_client_content",{"type":55,"value":534},{"type":49,"tag":232,"props":558,"children":560},{"className":559},[],[561],{"type":55,"value":562},"sendClientContent",{"type":55,"value":564}," ",{"type":49,"tag":71,"props":566,"children":567},{},[568],{"type":55,"value":569},"only",{"type":55,"value":571}," for incremental conversation history updates (appending prior turns to context), not for sending new user messages.",{"type":49,"tag":189,"props":573,"children":574},{},[575],{"type":49,"tag":65,"props":576,"children":577},{},[578,582,584,589,591,597,599,604,606,611,613,618,620,625],{"type":49,"tag":196,"props":579,"children":580},{},[581],{"type":55,"value":255},{"type":55,"value":583},"\nDo ",{"type":49,"tag":71,"props":585,"children":586},{},[587],{"type":55,"value":588},"not",{"type":55,"value":590}," use ",{"type":49,"tag":232,"props":592,"children":594},{"className":593},[],[595],{"type":55,"value":596},"media",{"type":55,"value":598}," in ",{"type":49,"tag":232,"props":600,"children":602},{"className":601},[],[603],{"type":55,"value":540},{"type":55,"value":605},". Use the specific keys: ",{"type":49,"tag":232,"props":607,"children":609},{"className":608},[],[610],{"type":55,"value":18},{"type":55,"value":612}," for audio data, ",{"type":49,"tag":232,"props":614,"children":616},{"className":615},[],[617],{"type":55,"value":27},{"type":55,"value":619}," for images\u002Fvideo frames, and ",{"type":49,"tag":232,"props":621,"children":623},{"className":622},[],[624],{"type":55,"value":55},{"type":55,"value":626}," for text input.",{"type":49,"tag":628,"props":629,"children":630},"hr",{},[],{"type":49,"tag":58,"props":632,"children":634},{"id":633},"quick-start",[635],{"type":55,"value":636},"Quick Start",{"type":49,"tag":638,"props":639,"children":641},"h3",{"id":640},"authentication",[642],{"type":55,"value":643},"Authentication",{"type":49,"tag":645,"props":646,"children":648},"h4",{"id":647},"python",[649],{"type":55,"value":312},{"type":49,"tag":651,"props":652,"children":656},"pre",{"className":653,"code":654,"language":647,"meta":655,"style":655},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from google import genai\n\nclient = genai.Client(api_key=\"YOUR_API_KEY\")\n","",[657],{"type":49,"tag":232,"props":658,"children":659},{"__ignoreMap":655},[660,670,680],{"type":49,"tag":196,"props":661,"children":664},{"class":662,"line":663},"line",1,[665],{"type":49,"tag":196,"props":666,"children":667},{},[668],{"type":55,"value":669},"from google import genai\n",{"type":49,"tag":196,"props":671,"children":673},{"class":662,"line":672},2,[674],{"type":49,"tag":196,"props":675,"children":677},{"emptyLinePlaceholder":676},true,[678],{"type":55,"value":679},"\n",{"type":49,"tag":196,"props":681,"children":683},{"class":662,"line":682},3,[684],{"type":49,"tag":196,"props":685,"children":686},{},[687],{"type":55,"value":688},"client = genai.Client(api_key=\"YOUR_API_KEY\")\n",{"type":49,"tag":645,"props":690,"children":692},{"id":691},"javascript",[693],{"type":55,"value":694},"JavaScript",{"type":49,"tag":651,"props":696,"children":700},{"className":697,"code":698,"language":699,"meta":655,"style":655},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { GoogleGenAI } from '@google\u002Fgenai';\n\nconst ai = new GoogleGenAI({ apiKey: 'YOUR_API_KEY' });\n","js",[701],{"type":49,"tag":232,"props":702,"children":703},{"__ignoreMap":655},[704,755,762],{"type":49,"tag":196,"props":705,"children":706},{"class":662,"line":663},[707,713,719,725,730,735,740,745,750],{"type":49,"tag":196,"props":708,"children":710},{"style":709},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[711],{"type":55,"value":712},"import",{"type":49,"tag":196,"props":714,"children":716},{"style":715},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[717],{"type":55,"value":718}," {",{"type":49,"tag":196,"props":720,"children":722},{"style":721},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[723],{"type":55,"value":724}," GoogleGenAI",{"type":49,"tag":196,"props":726,"children":727},{"style":715},[728],{"type":55,"value":729}," }",{"type":49,"tag":196,"props":731,"children":732},{"style":709},[733],{"type":55,"value":734}," from",{"type":49,"tag":196,"props":736,"children":737},{"style":715},[738],{"type":55,"value":739}," '",{"type":49,"tag":196,"props":741,"children":743},{"style":742},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[744],{"type":55,"value":343},{"type":49,"tag":196,"props":746,"children":747},{"style":715},[748],{"type":55,"value":749},"'",{"type":49,"tag":196,"props":751,"children":752},{"style":715},[753],{"type":55,"value":754},";\n",{"type":49,"tag":196,"props":756,"children":757},{"class":662,"line":672},[758],{"type":49,"tag":196,"props":759,"children":760},{"emptyLinePlaceholder":676},[761],{"type":55,"value":679},{"type":49,"tag":196,"props":763,"children":764},{"class":662,"line":682},[765,771,776,781,786,791,796,801,807,811,815,820,824,828,833],{"type":49,"tag":196,"props":766,"children":768},{"style":767},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[769],{"type":55,"value":770},"const",{"type":49,"tag":196,"props":772,"children":773},{"style":721},[774],{"type":55,"value":775}," ai ",{"type":49,"tag":196,"props":777,"children":778},{"style":715},[779],{"type":55,"value":780},"=",{"type":49,"tag":196,"props":782,"children":783},{"style":715},[784],{"type":55,"value":785}," new",{"type":49,"tag":196,"props":787,"children":789},{"style":788},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[790],{"type":55,"value":724},{"type":49,"tag":196,"props":792,"children":793},{"style":721},[794],{"type":55,"value":795},"(",{"type":49,"tag":196,"props":797,"children":798},{"style":715},[799],{"type":55,"value":800},"{",{"type":49,"tag":196,"props":802,"children":804},{"style":803},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[805],{"type":55,"value":806}," apiKey",{"type":49,"tag":196,"props":808,"children":809},{"style":715},[810],{"type":55,"value":402},{"type":49,"tag":196,"props":812,"children":813},{"style":715},[814],{"type":55,"value":739},{"type":49,"tag":196,"props":816,"children":817},{"style":742},[818],{"type":55,"value":819},"YOUR_API_KEY",{"type":49,"tag":196,"props":821,"children":822},{"style":715},[823],{"type":55,"value":749},{"type":49,"tag":196,"props":825,"children":826},{"style":715},[827],{"type":55,"value":729},{"type":49,"tag":196,"props":829,"children":830},{"style":721},[831],{"type":55,"value":832},")",{"type":49,"tag":196,"props":834,"children":835},{"style":715},[836],{"type":55,"value":754},{"type":49,"tag":638,"props":838,"children":840},{"id":839},"connecting-to-the-live-api",[841],{"type":55,"value":842},"Connecting to the Live API",{"type":49,"tag":645,"props":844,"children":846},{"id":845},"python-1",[847],{"type":55,"value":312},{"type":49,"tag":651,"props":849,"children":851},{"className":653,"code":850,"language":647,"meta":655,"style":655},"from google.genai import types\n\nconfig = types.LiveConnectConfig(\n    response_modalities=[types.Modality.AUDIO],\n    system_instruction=types.Content(\n        parts=[types.Part(text=\"You are a helpful assistant.\")]\n    )\n)\n\nasync with client.aio.live.connect(model=\"gemini-2.5-flash-native-audio-preview-12-2025\", config=config) as session:\n    pass  # Session is now active\n",[852],{"type":49,"tag":232,"props":853,"children":854},{"__ignoreMap":655},[855,863,870,878,887,896,905,914,923,931,940],{"type":49,"tag":196,"props":856,"children":857},{"class":662,"line":663},[858],{"type":49,"tag":196,"props":859,"children":860},{},[861],{"type":55,"value":862},"from google.genai import types\n",{"type":49,"tag":196,"props":864,"children":865},{"class":662,"line":672},[866],{"type":49,"tag":196,"props":867,"children":868},{"emptyLinePlaceholder":676},[869],{"type":55,"value":679},{"type":49,"tag":196,"props":871,"children":872},{"class":662,"line":682},[873],{"type":49,"tag":196,"props":874,"children":875},{},[876],{"type":55,"value":877},"config = types.LiveConnectConfig(\n",{"type":49,"tag":196,"props":879,"children":881},{"class":662,"line":880},4,[882],{"type":49,"tag":196,"props":883,"children":884},{},[885],{"type":55,"value":886},"    response_modalities=[types.Modality.AUDIO],\n",{"type":49,"tag":196,"props":888,"children":890},{"class":662,"line":889},5,[891],{"type":49,"tag":196,"props":892,"children":893},{},[894],{"type":55,"value":895},"    system_instruction=types.Content(\n",{"type":49,"tag":196,"props":897,"children":899},{"class":662,"line":898},6,[900],{"type":49,"tag":196,"props":901,"children":902},{},[903],{"type":55,"value":904},"        parts=[types.Part(text=\"You are a helpful assistant.\")]\n",{"type":49,"tag":196,"props":906,"children":908},{"class":662,"line":907},7,[909],{"type":49,"tag":196,"props":910,"children":911},{},[912],{"type":55,"value":913},"    )\n",{"type":49,"tag":196,"props":915,"children":917},{"class":662,"line":916},8,[918],{"type":49,"tag":196,"props":919,"children":920},{},[921],{"type":55,"value":922},")\n",{"type":49,"tag":196,"props":924,"children":926},{"class":662,"line":925},9,[927],{"type":49,"tag":196,"props":928,"children":929},{"emptyLinePlaceholder":676},[930],{"type":55,"value":679},{"type":49,"tag":196,"props":932,"children":934},{"class":662,"line":933},10,[935],{"type":49,"tag":196,"props":936,"children":937},{},[938],{"type":55,"value":939},"async with client.aio.live.connect(model=\"gemini-2.5-flash-native-audio-preview-12-2025\", config=config) as session:\n",{"type":49,"tag":196,"props":941,"children":943},{"class":662,"line":942},11,[944],{"type":49,"tag":196,"props":945,"children":946},{},[947],{"type":55,"value":948},"    pass  # Session is now active\n",{"type":49,"tag":645,"props":950,"children":952},{"id":951},"javascript-1",[953],{"type":55,"value":694},{"type":49,"tag":651,"props":955,"children":957},{"className":697,"code":956,"language":699,"meta":655,"style":655},"const session = await ai.live.connect({\n  model: 'gemini-2.5-flash-native-audio-preview-12-2025',\n  config: {\n    responseModalities: ['audio'],\n    systemInstruction: { parts: [{ text: 'You are a helpful assistant.' }] }\n  },\n  callbacks: {\n    onopen: () => console.log('Connected'),\n    onmessage: (response) => console.log('Message:', response),\n    onerror: (error) => console.error('Error:', error),\n    onclose: () => console.log('Closed')\n  }\n});\n",[958],{"type":49,"tag":232,"props":959,"children":960},{"__ignoreMap":655},[961,1014,1043,1060,1098,1167,1175,1191,1252,1326,1397,1450,1459],{"type":49,"tag":196,"props":962,"children":963},{"class":662,"line":663},[964,968,973,977,982,987,991,996,1000,1005,1009],{"type":49,"tag":196,"props":965,"children":966},{"style":767},[967],{"type":55,"value":770},{"type":49,"tag":196,"props":969,"children":970},{"style":721},[971],{"type":55,"value":972}," session ",{"type":49,"tag":196,"props":974,"children":975},{"style":715},[976],{"type":55,"value":780},{"type":49,"tag":196,"props":978,"children":979},{"style":709},[980],{"type":55,"value":981}," await",{"type":49,"tag":196,"props":983,"children":984},{"style":721},[985],{"type":55,"value":986}," ai",{"type":49,"tag":196,"props":988,"children":989},{"style":715},[990],{"type":55,"value":218},{"type":49,"tag":196,"props":992,"children":993},{"style":721},[994],{"type":55,"value":995},"live",{"type":49,"tag":196,"props":997,"children":998},{"style":715},[999],{"type":55,"value":218},{"type":49,"tag":196,"props":1001,"children":1002},{"style":788},[1003],{"type":55,"value":1004},"connect",{"type":49,"tag":196,"props":1006,"children":1007},{"style":721},[1008],{"type":55,"value":795},{"type":49,"tag":196,"props":1010,"children":1011},{"style":715},[1012],{"type":55,"value":1013},"{\n",{"type":49,"tag":196,"props":1015,"children":1016},{"class":662,"line":672},[1017,1022,1026,1030,1034,1038],{"type":49,"tag":196,"props":1018,"children":1019},{"style":803},[1020],{"type":55,"value":1021},"  model",{"type":49,"tag":196,"props":1023,"children":1024},{"style":715},[1025],{"type":55,"value":402},{"type":49,"tag":196,"props":1027,"children":1028},{"style":715},[1029],{"type":55,"value":739},{"type":49,"tag":196,"props":1031,"children":1032},{"style":742},[1033],{"type":55,"value":237},{"type":49,"tag":196,"props":1035,"children":1036},{"style":715},[1037],{"type":55,"value":749},{"type":49,"tag":196,"props":1039,"children":1040},{"style":715},[1041],{"type":55,"value":1042},",\n",{"type":49,"tag":196,"props":1044,"children":1045},{"class":662,"line":682},[1046,1051,1055],{"type":49,"tag":196,"props":1047,"children":1048},{"style":803},[1049],{"type":55,"value":1050},"  config",{"type":49,"tag":196,"props":1052,"children":1053},{"style":715},[1054],{"type":55,"value":402},{"type":49,"tag":196,"props":1056,"children":1057},{"style":715},[1058],{"type":55,"value":1059}," {\n",{"type":49,"tag":196,"props":1061,"children":1062},{"class":662,"line":880},[1063,1068,1072,1077,1081,1085,1089,1094],{"type":49,"tag":196,"props":1064,"children":1065},{"style":803},[1066],{"type":55,"value":1067},"    responseModalities",{"type":49,"tag":196,"props":1069,"children":1070},{"style":715},[1071],{"type":55,"value":402},{"type":49,"tag":196,"props":1073,"children":1074},{"style":721},[1075],{"type":55,"value":1076}," [",{"type":49,"tag":196,"props":1078,"children":1079},{"style":715},[1080],{"type":55,"value":749},{"type":49,"tag":196,"props":1082,"children":1083},{"style":742},[1084],{"type":55,"value":18},{"type":49,"tag":196,"props":1086,"children":1087},{"style":715},[1088],{"type":55,"value":749},{"type":49,"tag":196,"props":1090,"children":1091},{"style":721},[1092],{"type":55,"value":1093},"]",{"type":49,"tag":196,"props":1095,"children":1096},{"style":715},[1097],{"type":55,"value":1042},{"type":49,"tag":196,"props":1099,"children":1100},{"class":662,"line":889},[1101,1106,1110,1114,1119,1123,1127,1131,1136,1140,1144,1149,1153,1157,1162],{"type":49,"tag":196,"props":1102,"children":1103},{"style":803},[1104],{"type":55,"value":1105},"    systemInstruction",{"type":49,"tag":196,"props":1107,"children":1108},{"style":715},[1109],{"type":55,"value":402},{"type":49,"tag":196,"props":1111,"children":1112},{"style":715},[1113],{"type":55,"value":718},{"type":49,"tag":196,"props":1115,"children":1116},{"style":803},[1117],{"type":55,"value":1118}," parts",{"type":49,"tag":196,"props":1120,"children":1121},{"style":715},[1122],{"type":55,"value":402},{"type":49,"tag":196,"props":1124,"children":1125},{"style":721},[1126],{"type":55,"value":1076},{"type":49,"tag":196,"props":1128,"children":1129},{"style":715},[1130],{"type":55,"value":800},{"type":49,"tag":196,"props":1132,"children":1133},{"style":803},[1134],{"type":55,"value":1135}," text",{"type":49,"tag":196,"props":1137,"children":1138},{"style":715},[1139],{"type":55,"value":402},{"type":49,"tag":196,"props":1141,"children":1142},{"style":715},[1143],{"type":55,"value":739},{"type":49,"tag":196,"props":1145,"children":1146},{"style":742},[1147],{"type":55,"value":1148},"You are a helpful assistant.",{"type":49,"tag":196,"props":1150,"children":1151},{"style":715},[1152],{"type":55,"value":749},{"type":49,"tag":196,"props":1154,"children":1155},{"style":715},[1156],{"type":55,"value":729},{"type":49,"tag":196,"props":1158,"children":1159},{"style":721},[1160],{"type":55,"value":1161},"] ",{"type":49,"tag":196,"props":1163,"children":1164},{"style":715},[1165],{"type":55,"value":1166},"}\n",{"type":49,"tag":196,"props":1168,"children":1169},{"class":662,"line":898},[1170],{"type":49,"tag":196,"props":1171,"children":1172},{"style":715},[1173],{"type":55,"value":1174},"  },\n",{"type":49,"tag":196,"props":1176,"children":1177},{"class":662,"line":907},[1178,1183,1187],{"type":49,"tag":196,"props":1179,"children":1180},{"style":803},[1181],{"type":55,"value":1182},"  callbacks",{"type":49,"tag":196,"props":1184,"children":1185},{"style":715},[1186],{"type":55,"value":402},{"type":49,"tag":196,"props":1188,"children":1189},{"style":715},[1190],{"type":55,"value":1059},{"type":49,"tag":196,"props":1192,"children":1193},{"class":662,"line":916},[1194,1199,1203,1208,1213,1218,1222,1227,1231,1235,1240,1244,1248],{"type":49,"tag":196,"props":1195,"children":1196},{"style":788},[1197],{"type":55,"value":1198},"    onopen",{"type":49,"tag":196,"props":1200,"children":1201},{"style":715},[1202],{"type":55,"value":402},{"type":49,"tag":196,"props":1204,"children":1205},{"style":715},[1206],{"type":55,"value":1207}," ()",{"type":49,"tag":196,"props":1209,"children":1210},{"style":767},[1211],{"type":55,"value":1212}," =>",{"type":49,"tag":196,"props":1214,"children":1215},{"style":721},[1216],{"type":55,"value":1217}," console",{"type":49,"tag":196,"props":1219,"children":1220},{"style":715},[1221],{"type":55,"value":218},{"type":49,"tag":196,"props":1223,"children":1224},{"style":788},[1225],{"type":55,"value":1226},"log",{"type":49,"tag":196,"props":1228,"children":1229},{"style":721},[1230],{"type":55,"value":795},{"type":49,"tag":196,"props":1232,"children":1233},{"style":715},[1234],{"type":55,"value":749},{"type":49,"tag":196,"props":1236,"children":1237},{"style":742},[1238],{"type":55,"value":1239},"Connected",{"type":49,"tag":196,"props":1241,"children":1242},{"style":715},[1243],{"type":55,"value":749},{"type":49,"tag":196,"props":1245,"children":1246},{"style":721},[1247],{"type":55,"value":832},{"type":49,"tag":196,"props":1249,"children":1250},{"style":715},[1251],{"type":55,"value":1042},{"type":49,"tag":196,"props":1253,"children":1254},{"class":662,"line":925},[1255,1260,1264,1269,1275,1279,1283,1287,1291,1295,1299,1303,1308,1312,1317,1322],{"type":49,"tag":196,"props":1256,"children":1257},{"style":788},[1258],{"type":55,"value":1259},"    onmessage",{"type":49,"tag":196,"props":1261,"children":1262},{"style":715},[1263],{"type":55,"value":402},{"type":49,"tag":196,"props":1265,"children":1266},{"style":715},[1267],{"type":55,"value":1268}," (",{"type":49,"tag":196,"props":1270,"children":1272},{"style":1271},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1273],{"type":55,"value":1274},"response",{"type":49,"tag":196,"props":1276,"children":1277},{"style":715},[1278],{"type":55,"value":832},{"type":49,"tag":196,"props":1280,"children":1281},{"style":767},[1282],{"type":55,"value":1212},{"type":49,"tag":196,"props":1284,"children":1285},{"style":721},[1286],{"type":55,"value":1217},{"type":49,"tag":196,"props":1288,"children":1289},{"style":715},[1290],{"type":55,"value":218},{"type":49,"tag":196,"props":1292,"children":1293},{"style":788},[1294],{"type":55,"value":1226},{"type":49,"tag":196,"props":1296,"children":1297},{"style":721},[1298],{"type":55,"value":795},{"type":49,"tag":196,"props":1300,"children":1301},{"style":715},[1302],{"type":55,"value":749},{"type":49,"tag":196,"props":1304,"children":1305},{"style":742},[1306],{"type":55,"value":1307},"Message:",{"type":49,"tag":196,"props":1309,"children":1310},{"style":715},[1311],{"type":55,"value":749},{"type":49,"tag":196,"props":1313,"children":1314},{"style":715},[1315],{"type":55,"value":1316},",",{"type":49,"tag":196,"props":1318,"children":1319},{"style":721},[1320],{"type":55,"value":1321}," response)",{"type":49,"tag":196,"props":1323,"children":1324},{"style":715},[1325],{"type":55,"value":1042},{"type":49,"tag":196,"props":1327,"children":1328},{"class":662,"line":933},[1329,1334,1338,1342,1347,1351,1355,1359,1363,1367,1371,1375,1380,1384,1388,1393],{"type":49,"tag":196,"props":1330,"children":1331},{"style":788},[1332],{"type":55,"value":1333},"    onerror",{"type":49,"tag":196,"props":1335,"children":1336},{"style":715},[1337],{"type":55,"value":402},{"type":49,"tag":196,"props":1339,"children":1340},{"style":715},[1341],{"type":55,"value":1268},{"type":49,"tag":196,"props":1343,"children":1344},{"style":1271},[1345],{"type":55,"value":1346},"error",{"type":49,"tag":196,"props":1348,"children":1349},{"style":715},[1350],{"type":55,"value":832},{"type":49,"tag":196,"props":1352,"children":1353},{"style":767},[1354],{"type":55,"value":1212},{"type":49,"tag":196,"props":1356,"children":1357},{"style":721},[1358],{"type":55,"value":1217},{"type":49,"tag":196,"props":1360,"children":1361},{"style":715},[1362],{"type":55,"value":218},{"type":49,"tag":196,"props":1364,"children":1365},{"style":788},[1366],{"type":55,"value":1346},{"type":49,"tag":196,"props":1368,"children":1369},{"style":721},[1370],{"type":55,"value":795},{"type":49,"tag":196,"props":1372,"children":1373},{"style":715},[1374],{"type":55,"value":749},{"type":49,"tag":196,"props":1376,"children":1377},{"style":742},[1378],{"type":55,"value":1379},"Error:",{"type":49,"tag":196,"props":1381,"children":1382},{"style":715},[1383],{"type":55,"value":749},{"type":49,"tag":196,"props":1385,"children":1386},{"style":715},[1387],{"type":55,"value":1316},{"type":49,"tag":196,"props":1389,"children":1390},{"style":721},[1391],{"type":55,"value":1392}," error)",{"type":49,"tag":196,"props":1394,"children":1395},{"style":715},[1396],{"type":55,"value":1042},{"type":49,"tag":196,"props":1398,"children":1399},{"class":662,"line":942},[1400,1405,1409,1413,1417,1421,1425,1429,1433,1437,1442,1446],{"type":49,"tag":196,"props":1401,"children":1402},{"style":788},[1403],{"type":55,"value":1404},"    onclose",{"type":49,"tag":196,"props":1406,"children":1407},{"style":715},[1408],{"type":55,"value":402},{"type":49,"tag":196,"props":1410,"children":1411},{"style":715},[1412],{"type":55,"value":1207},{"type":49,"tag":196,"props":1414,"children":1415},{"style":767},[1416],{"type":55,"value":1212},{"type":49,"tag":196,"props":1418,"children":1419},{"style":721},[1420],{"type":55,"value":1217},{"type":49,"tag":196,"props":1422,"children":1423},{"style":715},[1424],{"type":55,"value":218},{"type":49,"tag":196,"props":1426,"children":1427},{"style":788},[1428],{"type":55,"value":1226},{"type":49,"tag":196,"props":1430,"children":1431},{"style":721},[1432],{"type":55,"value":795},{"type":49,"tag":196,"props":1434,"children":1435},{"style":715},[1436],{"type":55,"value":749},{"type":49,"tag":196,"props":1438,"children":1439},{"style":742},[1440],{"type":55,"value":1441},"Closed",{"type":49,"tag":196,"props":1443,"children":1444},{"style":715},[1445],{"type":55,"value":749},{"type":49,"tag":196,"props":1447,"children":1448},{"style":721},[1449],{"type":55,"value":922},{"type":49,"tag":196,"props":1451,"children":1453},{"class":662,"line":1452},12,[1454],{"type":49,"tag":196,"props":1455,"children":1456},{"style":715},[1457],{"type":55,"value":1458},"  }\n",{"type":49,"tag":196,"props":1460,"children":1462},{"class":662,"line":1461},13,[1463,1468,1472],{"type":49,"tag":196,"props":1464,"children":1465},{"style":715},[1466],{"type":55,"value":1467},"}",{"type":49,"tag":196,"props":1469,"children":1470},{"style":721},[1471],{"type":55,"value":832},{"type":49,"tag":196,"props":1473,"children":1474},{"style":715},[1475],{"type":55,"value":754},{"type":49,"tag":638,"props":1477,"children":1479},{"id":1478},"sending-text",[1480],{"type":55,"value":1481},"Sending Text",{"type":49,"tag":645,"props":1483,"children":1485},{"id":1484},"python-2",[1486],{"type":55,"value":312},{"type":49,"tag":651,"props":1488,"children":1490},{"className":653,"code":1489,"language":647,"meta":655,"style":655},"await session.send_realtime_input(text=\"Hello, how are you?\")\n",[1491],{"type":49,"tag":232,"props":1492,"children":1493},{"__ignoreMap":655},[1494],{"type":49,"tag":196,"props":1495,"children":1496},{"class":662,"line":663},[1497],{"type":49,"tag":196,"props":1498,"children":1499},{},[1500],{"type":55,"value":1489},{"type":49,"tag":645,"props":1502,"children":1504},{"id":1503},"javascript-2",[1505],{"type":55,"value":694},{"type":49,"tag":651,"props":1507,"children":1509},{"className":697,"code":1508,"language":699,"meta":655,"style":655},"session.sendRealtimeInput({ text: 'Hello, how are you?' });\n",[1510],{"type":49,"tag":232,"props":1511,"children":1512},{"__ignoreMap":655},[1513],{"type":49,"tag":196,"props":1514,"children":1515},{"class":662,"line":663},[1516,1521,1525,1529,1533,1537,1541,1545,1549,1554,1558,1562,1566],{"type":49,"tag":196,"props":1517,"children":1518},{"style":721},[1519],{"type":55,"value":1520},"session",{"type":49,"tag":196,"props":1522,"children":1523},{"style":715},[1524],{"type":55,"value":218},{"type":49,"tag":196,"props":1526,"children":1527},{"style":788},[1528],{"type":55,"value":540},{"type":49,"tag":196,"props":1530,"children":1531},{"style":721},[1532],{"type":55,"value":795},{"type":49,"tag":196,"props":1534,"children":1535},{"style":715},[1536],{"type":55,"value":800},{"type":49,"tag":196,"props":1538,"children":1539},{"style":803},[1540],{"type":55,"value":1135},{"type":49,"tag":196,"props":1542,"children":1543},{"style":715},[1544],{"type":55,"value":402},{"type":49,"tag":196,"props":1546,"children":1547},{"style":715},[1548],{"type":55,"value":739},{"type":49,"tag":196,"props":1550,"children":1551},{"style":742},[1552],{"type":55,"value":1553},"Hello, how are you?",{"type":49,"tag":196,"props":1555,"children":1556},{"style":715},[1557],{"type":55,"value":749},{"type":49,"tag":196,"props":1559,"children":1560},{"style":715},[1561],{"type":55,"value":729},{"type":49,"tag":196,"props":1563,"children":1564},{"style":721},[1565],{"type":55,"value":832},{"type":49,"tag":196,"props":1567,"children":1568},{"style":715},[1569],{"type":55,"value":754},{"type":49,"tag":638,"props":1571,"children":1573},{"id":1572},"sending-audio",[1574],{"type":55,"value":1575},"Sending Audio",{"type":49,"tag":645,"props":1577,"children":1579},{"id":1578},"python-3",[1580],{"type":55,"value":312},{"type":49,"tag":651,"props":1582,"children":1584},{"className":653,"code":1583,"language":647,"meta":655,"style":655},"await session.send_realtime_input(\n    audio=types.Blob(data=chunk, mime_type=\"audio\u002Fpcm;rate=16000\")\n)\n",[1585],{"type":49,"tag":232,"props":1586,"children":1587},{"__ignoreMap":655},[1588,1596,1604],{"type":49,"tag":196,"props":1589,"children":1590},{"class":662,"line":663},[1591],{"type":49,"tag":196,"props":1592,"children":1593},{},[1594],{"type":55,"value":1595},"await session.send_realtime_input(\n",{"type":49,"tag":196,"props":1597,"children":1598},{"class":662,"line":672},[1599],{"type":49,"tag":196,"props":1600,"children":1601},{},[1602],{"type":55,"value":1603},"    audio=types.Blob(data=chunk, mime_type=\"audio\u002Fpcm;rate=16000\")\n",{"type":49,"tag":196,"props":1605,"children":1606},{"class":662,"line":682},[1607],{"type":49,"tag":196,"props":1608,"children":1609},{},[1610],{"type":55,"value":922},{"type":49,"tag":645,"props":1612,"children":1614},{"id":1613},"javascript-3",[1615],{"type":55,"value":694},{"type":49,"tag":651,"props":1617,"children":1619},{"className":697,"code":1618,"language":699,"meta":655,"style":655},"session.sendRealtimeInput({\n  audio: { data: chunk.toString('base64'), mimeType: 'audio\u002Fpcm;rate=16000' }\n});\n",[1620],{"type":49,"tag":232,"props":1621,"children":1622},{"__ignoreMap":655},[1623,1646,1736],{"type":49,"tag":196,"props":1624,"children":1625},{"class":662,"line":663},[1626,1630,1634,1638,1642],{"type":49,"tag":196,"props":1627,"children":1628},{"style":721},[1629],{"type":55,"value":1520},{"type":49,"tag":196,"props":1631,"children":1632},{"style":715},[1633],{"type":55,"value":218},{"type":49,"tag":196,"props":1635,"children":1636},{"style":788},[1637],{"type":55,"value":540},{"type":49,"tag":196,"props":1639,"children":1640},{"style":721},[1641],{"type":55,"value":795},{"type":49,"tag":196,"props":1643,"children":1644},{"style":715},[1645],{"type":55,"value":1013},{"type":49,"tag":196,"props":1647,"children":1648},{"class":662,"line":672},[1649,1654,1658,1662,1667,1671,1676,1680,1685,1689,1693,1698,1702,1706,1710,1715,1719,1723,1727,1731],{"type":49,"tag":196,"props":1650,"children":1651},{"style":803},[1652],{"type":55,"value":1653},"  audio",{"type":49,"tag":196,"props":1655,"children":1656},{"style":715},[1657],{"type":55,"value":402},{"type":49,"tag":196,"props":1659,"children":1660},{"style":715},[1661],{"type":55,"value":718},{"type":49,"tag":196,"props":1663,"children":1664},{"style":803},[1665],{"type":55,"value":1666}," data",{"type":49,"tag":196,"props":1668,"children":1669},{"style":715},[1670],{"type":55,"value":402},{"type":49,"tag":196,"props":1672,"children":1673},{"style":721},[1674],{"type":55,"value":1675}," chunk",{"type":49,"tag":196,"props":1677,"children":1678},{"style":715},[1679],{"type":55,"value":218},{"type":49,"tag":196,"props":1681,"children":1682},{"style":788},[1683],{"type":55,"value":1684},"toString",{"type":49,"tag":196,"props":1686,"children":1687},{"style":721},[1688],{"type":55,"value":795},{"type":49,"tag":196,"props":1690,"children":1691},{"style":715},[1692],{"type":55,"value":749},{"type":49,"tag":196,"props":1694,"children":1695},{"style":742},[1696],{"type":55,"value":1697},"base64",{"type":49,"tag":196,"props":1699,"children":1700},{"style":715},[1701],{"type":55,"value":749},{"type":49,"tag":196,"props":1703,"children":1704},{"style":721},[1705],{"type":55,"value":832},{"type":49,"tag":196,"props":1707,"children":1708},{"style":715},[1709],{"type":55,"value":1316},{"type":49,"tag":196,"props":1711,"children":1712},{"style":803},[1713],{"type":55,"value":1714}," mimeType",{"type":49,"tag":196,"props":1716,"children":1717},{"style":715},[1718],{"type":55,"value":402},{"type":49,"tag":196,"props":1720,"children":1721},{"style":715},[1722],{"type":55,"value":739},{"type":49,"tag":196,"props":1724,"children":1725},{"style":742},[1726],{"type":55,"value":503},{"type":49,"tag":196,"props":1728,"children":1729},{"style":715},[1730],{"type":55,"value":749},{"type":49,"tag":196,"props":1732,"children":1733},{"style":715},[1734],{"type":55,"value":1735}," }\n",{"type":49,"tag":196,"props":1737,"children":1738},{"class":662,"line":682},[1739,1743,1747],{"type":49,"tag":196,"props":1740,"children":1741},{"style":715},[1742],{"type":55,"value":1467},{"type":49,"tag":196,"props":1744,"children":1745},{"style":721},[1746],{"type":55,"value":832},{"type":49,"tag":196,"props":1748,"children":1749},{"style":715},[1750],{"type":55,"value":754},{"type":49,"tag":638,"props":1752,"children":1754},{"id":1753},"sending-video",[1755],{"type":55,"value":1756},"Sending Video",{"type":49,"tag":645,"props":1758,"children":1760},{"id":1759},"python-4",[1761],{"type":55,"value":312},{"type":49,"tag":651,"props":1763,"children":1765},{"className":653,"code":1764,"language":647,"meta":655,"style":655},"# frame: raw JPEG-encoded bytes\nawait session.send_realtime_input(\n    video=types.Blob(data=frame, mime_type=\"image\u002Fjpeg\")\n)\n",[1766],{"type":49,"tag":232,"props":1767,"children":1768},{"__ignoreMap":655},[1769,1777,1784,1792],{"type":49,"tag":196,"props":1770,"children":1771},{"class":662,"line":663},[1772],{"type":49,"tag":196,"props":1773,"children":1774},{},[1775],{"type":55,"value":1776},"# frame: raw JPEG-encoded bytes\n",{"type":49,"tag":196,"props":1778,"children":1779},{"class":662,"line":672},[1780],{"type":49,"tag":196,"props":1781,"children":1782},{},[1783],{"type":55,"value":1595},{"type":49,"tag":196,"props":1785,"children":1786},{"class":662,"line":682},[1787],{"type":49,"tag":196,"props":1788,"children":1789},{},[1790],{"type":55,"value":1791},"    video=types.Blob(data=frame, mime_type=\"image\u002Fjpeg\")\n",{"type":49,"tag":196,"props":1793,"children":1794},{"class":662,"line":880},[1795],{"type":49,"tag":196,"props":1796,"children":1797},{},[1798],{"type":55,"value":922},{"type":49,"tag":645,"props":1800,"children":1802},{"id":1801},"javascript-4",[1803],{"type":55,"value":694},{"type":49,"tag":651,"props":1805,"children":1807},{"className":697,"code":1806,"language":699,"meta":655,"style":655},"session.sendRealtimeInput({\n  video: { data: frame.toString('base64'), mimeType: 'image\u002Fjpeg' }\n});\n",[1808],{"type":49,"tag":232,"props":1809,"children":1810},{"__ignoreMap":655},[1811,1834,1920],{"type":49,"tag":196,"props":1812,"children":1813},{"class":662,"line":663},[1814,1818,1822,1826,1830],{"type":49,"tag":196,"props":1815,"children":1816},{"style":721},[1817],{"type":55,"value":1520},{"type":49,"tag":196,"props":1819,"children":1820},{"style":715},[1821],{"type":55,"value":218},{"type":49,"tag":196,"props":1823,"children":1824},{"style":788},[1825],{"type":55,"value":540},{"type":49,"tag":196,"props":1827,"children":1828},{"style":721},[1829],{"type":55,"value":795},{"type":49,"tag":196,"props":1831,"children":1832},{"style":715},[1833],{"type":55,"value":1013},{"type":49,"tag":196,"props":1835,"children":1836},{"class":662,"line":672},[1837,1842,1846,1850,1854,1858,1863,1867,1871,1875,1879,1883,1887,1891,1895,1899,1903,1907,1912,1916],{"type":49,"tag":196,"props":1838,"children":1839},{"style":803},[1840],{"type":55,"value":1841},"  video",{"type":49,"tag":196,"props":1843,"children":1844},{"style":715},[1845],{"type":55,"value":402},{"type":49,"tag":196,"props":1847,"children":1848},{"style":715},[1849],{"type":55,"value":718},{"type":49,"tag":196,"props":1851,"children":1852},{"style":803},[1853],{"type":55,"value":1666},{"type":49,"tag":196,"props":1855,"children":1856},{"style":715},[1857],{"type":55,"value":402},{"type":49,"tag":196,"props":1859,"children":1860},{"style":721},[1861],{"type":55,"value":1862}," frame",{"type":49,"tag":196,"props":1864,"children":1865},{"style":715},[1866],{"type":55,"value":218},{"type":49,"tag":196,"props":1868,"children":1869},{"style":788},[1870],{"type":55,"value":1684},{"type":49,"tag":196,"props":1872,"children":1873},{"style":721},[1874],{"type":55,"value":795},{"type":49,"tag":196,"props":1876,"children":1877},{"style":715},[1878],{"type":55,"value":749},{"type":49,"tag":196,"props":1880,"children":1881},{"style":742},[1882],{"type":55,"value":1697},{"type":49,"tag":196,"props":1884,"children":1885},{"style":715},[1886],{"type":55,"value":749},{"type":49,"tag":196,"props":1888,"children":1889},{"style":721},[1890],{"type":55,"value":832},{"type":49,"tag":196,"props":1892,"children":1893},{"style":715},[1894],{"type":55,"value":1316},{"type":49,"tag":196,"props":1896,"children":1897},{"style":803},[1898],{"type":55,"value":1714},{"type":49,"tag":196,"props":1900,"children":1901},{"style":715},[1902],{"type":55,"value":402},{"type":49,"tag":196,"props":1904,"children":1905},{"style":715},[1906],{"type":55,"value":739},{"type":49,"tag":196,"props":1908,"children":1909},{"style":742},[1910],{"type":55,"value":1911},"image\u002Fjpeg",{"type":49,"tag":196,"props":1913,"children":1914},{"style":715},[1915],{"type":55,"value":749},{"type":49,"tag":196,"props":1917,"children":1918},{"style":715},[1919],{"type":55,"value":1735},{"type":49,"tag":196,"props":1921,"children":1922},{"class":662,"line":682},[1923,1927,1931],{"type":49,"tag":196,"props":1924,"children":1925},{"style":715},[1926],{"type":55,"value":1467},{"type":49,"tag":196,"props":1928,"children":1929},{"style":721},[1930],{"type":55,"value":832},{"type":49,"tag":196,"props":1932,"children":1933},{"style":715},[1934],{"type":55,"value":754},{"type":49,"tag":638,"props":1936,"children":1938},{"id":1937},"receiving-audio-and-text",[1939],{"type":55,"value":1940},"Receiving Audio and Text",{"type":49,"tag":645,"props":1942,"children":1944},{"id":1943},"python-5",[1945],{"type":55,"value":312},{"type":49,"tag":651,"props":1947,"children":1949},{"className":653,"code":1948,"language":647,"meta":655,"style":655},"async for response in session.receive():\n    content = response.server_content\n    if content:\n        # Audio\n        if content.model_turn:\n            for part in content.model_turn.parts:\n                if part.inline_data:\n                    audio_data = part.inline_data.data\n        # Transcription\n        if content.input_transcription:\n            print(f\"User: {content.input_transcription.text}\")\n        if content.output_transcription:\n            print(f\"Gemini: {content.output_transcription.text}\")\n        # Interruption\n        if content.interrupted is True:\n            pass  # Stop playback, clear audio queue\n",[1950],{"type":49,"tag":232,"props":1951,"children":1952},{"__ignoreMap":655},[1953,1961,1969,1977,1985,1993,2001,2009,2017,2025,2033,2041,2049,2057,2066,2075],{"type":49,"tag":196,"props":1954,"children":1955},{"class":662,"line":663},[1956],{"type":49,"tag":196,"props":1957,"children":1958},{},[1959],{"type":55,"value":1960},"async for response in session.receive():\n",{"type":49,"tag":196,"props":1962,"children":1963},{"class":662,"line":672},[1964],{"type":49,"tag":196,"props":1965,"children":1966},{},[1967],{"type":55,"value":1968},"    content = response.server_content\n",{"type":49,"tag":196,"props":1970,"children":1971},{"class":662,"line":682},[1972],{"type":49,"tag":196,"props":1973,"children":1974},{},[1975],{"type":55,"value":1976},"    if content:\n",{"type":49,"tag":196,"props":1978,"children":1979},{"class":662,"line":880},[1980],{"type":49,"tag":196,"props":1981,"children":1982},{},[1983],{"type":55,"value":1984},"        # Audio\n",{"type":49,"tag":196,"props":1986,"children":1987},{"class":662,"line":889},[1988],{"type":49,"tag":196,"props":1989,"children":1990},{},[1991],{"type":55,"value":1992},"        if content.model_turn:\n",{"type":49,"tag":196,"props":1994,"children":1995},{"class":662,"line":898},[1996],{"type":49,"tag":196,"props":1997,"children":1998},{},[1999],{"type":55,"value":2000},"            for part in content.model_turn.parts:\n",{"type":49,"tag":196,"props":2002,"children":2003},{"class":662,"line":907},[2004],{"type":49,"tag":196,"props":2005,"children":2006},{},[2007],{"type":55,"value":2008},"                if part.inline_data:\n",{"type":49,"tag":196,"props":2010,"children":2011},{"class":662,"line":916},[2012],{"type":49,"tag":196,"props":2013,"children":2014},{},[2015],{"type":55,"value":2016},"                    audio_data = part.inline_data.data\n",{"type":49,"tag":196,"props":2018,"children":2019},{"class":662,"line":925},[2020],{"type":49,"tag":196,"props":2021,"children":2022},{},[2023],{"type":55,"value":2024},"        # Transcription\n",{"type":49,"tag":196,"props":2026,"children":2027},{"class":662,"line":933},[2028],{"type":49,"tag":196,"props":2029,"children":2030},{},[2031],{"type":55,"value":2032},"        if content.input_transcription:\n",{"type":49,"tag":196,"props":2034,"children":2035},{"class":662,"line":942},[2036],{"type":49,"tag":196,"props":2037,"children":2038},{},[2039],{"type":55,"value":2040},"            print(f\"User: {content.input_transcription.text}\")\n",{"type":49,"tag":196,"props":2042,"children":2043},{"class":662,"line":1452},[2044],{"type":49,"tag":196,"props":2045,"children":2046},{},[2047],{"type":55,"value":2048},"        if content.output_transcription:\n",{"type":49,"tag":196,"props":2050,"children":2051},{"class":662,"line":1461},[2052],{"type":49,"tag":196,"props":2053,"children":2054},{},[2055],{"type":55,"value":2056},"            print(f\"Gemini: {content.output_transcription.text}\")\n",{"type":49,"tag":196,"props":2058,"children":2060},{"class":662,"line":2059},14,[2061],{"type":49,"tag":196,"props":2062,"children":2063},{},[2064],{"type":55,"value":2065},"        # Interruption\n",{"type":49,"tag":196,"props":2067,"children":2069},{"class":662,"line":2068},15,[2070],{"type":49,"tag":196,"props":2071,"children":2072},{},[2073],{"type":55,"value":2074},"        if content.interrupted is True:\n",{"type":49,"tag":196,"props":2076,"children":2078},{"class":662,"line":2077},16,[2079],{"type":49,"tag":196,"props":2080,"children":2081},{},[2082],{"type":55,"value":2083},"            pass  # Stop playback, clear audio queue\n",{"type":49,"tag":645,"props":2085,"children":2087},{"id":2086},"javascript-5",[2088],{"type":55,"value":694},{"type":49,"tag":651,"props":2090,"children":2092},{"className":697,"code":2091,"language":699,"meta":655,"style":655},"\u002F\u002F Inside the onmessage callback\nconst content = response.serverContent;\nif (content?.modelTurn?.parts) {\n  for (const part of content.modelTurn.parts) {\n    if (part.inlineData) {\n      const audioData = part.inlineData.data; \u002F\u002F Base64 encoded\n    }\n  }\n}\nif (content?.inputTranscription) console.log('User:', content.inputTranscription.text);\nif (content?.outputTranscription) console.log('Gemini:', content.outputTranscription.text);\nif (content?.interrupted) { \u002F* Stop playback, clear audio queue *\u002F }\n",[2093],{"type":49,"tag":232,"props":2094,"children":2095},{"__ignoreMap":655},[2096,2105,2139,2175,2232,2266,2315,2323,2330,2337,2412,2486],{"type":49,"tag":196,"props":2097,"children":2098},{"class":662,"line":663},[2099],{"type":49,"tag":196,"props":2100,"children":2102},{"style":2101},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[2103],{"type":55,"value":2104},"\u002F\u002F Inside the onmessage callback\n",{"type":49,"tag":196,"props":2106,"children":2107},{"class":662,"line":672},[2108,2112,2117,2121,2126,2130,2135],{"type":49,"tag":196,"props":2109,"children":2110},{"style":767},[2111],{"type":55,"value":770},{"type":49,"tag":196,"props":2113,"children":2114},{"style":721},[2115],{"type":55,"value":2116}," content ",{"type":49,"tag":196,"props":2118,"children":2119},{"style":715},[2120],{"type":55,"value":780},{"type":49,"tag":196,"props":2122,"children":2123},{"style":721},[2124],{"type":55,"value":2125}," response",{"type":49,"tag":196,"props":2127,"children":2128},{"style":715},[2129],{"type":55,"value":218},{"type":49,"tag":196,"props":2131,"children":2132},{"style":721},[2133],{"type":55,"value":2134},"serverContent",{"type":49,"tag":196,"props":2136,"children":2137},{"style":715},[2138],{"type":55,"value":754},{"type":49,"tag":196,"props":2140,"children":2141},{"class":662,"line":682},[2142,2147,2152,2157,2162,2166,2171],{"type":49,"tag":196,"props":2143,"children":2144},{"style":709},[2145],{"type":55,"value":2146},"if",{"type":49,"tag":196,"props":2148,"children":2149},{"style":721},[2150],{"type":55,"value":2151}," (content",{"type":49,"tag":196,"props":2153,"children":2154},{"style":715},[2155],{"type":55,"value":2156},"?.",{"type":49,"tag":196,"props":2158,"children":2159},{"style":721},[2160],{"type":55,"value":2161},"modelTurn",{"type":49,"tag":196,"props":2163,"children":2164},{"style":715},[2165],{"type":55,"value":2156},{"type":49,"tag":196,"props":2167,"children":2168},{"style":721},[2169],{"type":55,"value":2170},"parts) ",{"type":49,"tag":196,"props":2172,"children":2173},{"style":715},[2174],{"type":55,"value":1013},{"type":49,"tag":196,"props":2176,"children":2177},{"class":662,"line":880},[2178,2183,2187,2191,2196,2201,2206,2210,2214,2218,2223,2228],{"type":49,"tag":196,"props":2179,"children":2180},{"style":709},[2181],{"type":55,"value":2182},"  for",{"type":49,"tag":196,"props":2184,"children":2185},{"style":803},[2186],{"type":55,"value":1268},{"type":49,"tag":196,"props":2188,"children":2189},{"style":767},[2190],{"type":55,"value":770},{"type":49,"tag":196,"props":2192,"children":2193},{"style":721},[2194],{"type":55,"value":2195}," part",{"type":49,"tag":196,"props":2197,"children":2198},{"style":715},[2199],{"type":55,"value":2200}," of",{"type":49,"tag":196,"props":2202,"children":2203},{"style":721},[2204],{"type":55,"value":2205}," content",{"type":49,"tag":196,"props":2207,"children":2208},{"style":715},[2209],{"type":55,"value":218},{"type":49,"tag":196,"props":2211,"children":2212},{"style":721},[2213],{"type":55,"value":2161},{"type":49,"tag":196,"props":2215,"children":2216},{"style":715},[2217],{"type":55,"value":218},{"type":49,"tag":196,"props":2219,"children":2220},{"style":721},[2221],{"type":55,"value":2222},"parts",{"type":49,"tag":196,"props":2224,"children":2225},{"style":803},[2226],{"type":55,"value":2227},") ",{"type":49,"tag":196,"props":2229,"children":2230},{"style":715},[2231],{"type":55,"value":1013},{"type":49,"tag":196,"props":2233,"children":2234},{"class":662,"line":889},[2235,2240,2244,2249,2253,2258,2262],{"type":49,"tag":196,"props":2236,"children":2237},{"style":709},[2238],{"type":55,"value":2239},"    if",{"type":49,"tag":196,"props":2241,"children":2242},{"style":803},[2243],{"type":55,"value":1268},{"type":49,"tag":196,"props":2245,"children":2246},{"style":721},[2247],{"type":55,"value":2248},"part",{"type":49,"tag":196,"props":2250,"children":2251},{"style":715},[2252],{"type":55,"value":218},{"type":49,"tag":196,"props":2254,"children":2255},{"style":721},[2256],{"type":55,"value":2257},"inlineData",{"type":49,"tag":196,"props":2259,"children":2260},{"style":803},[2261],{"type":55,"value":2227},{"type":49,"tag":196,"props":2263,"children":2264},{"style":715},[2265],{"type":55,"value":1013},{"type":49,"tag":196,"props":2267,"children":2268},{"class":662,"line":898},[2269,2274,2279,2284,2288,2292,2296,2300,2305,2310],{"type":49,"tag":196,"props":2270,"children":2271},{"style":767},[2272],{"type":55,"value":2273},"      const",{"type":49,"tag":196,"props":2275,"children":2276},{"style":721},[2277],{"type":55,"value":2278}," audioData",{"type":49,"tag":196,"props":2280,"children":2281},{"style":715},[2282],{"type":55,"value":2283}," =",{"type":49,"tag":196,"props":2285,"children":2286},{"style":721},[2287],{"type":55,"value":2195},{"type":49,"tag":196,"props":2289,"children":2290},{"style":715},[2291],{"type":55,"value":218},{"type":49,"tag":196,"props":2293,"children":2294},{"style":721},[2295],{"type":55,"value":2257},{"type":49,"tag":196,"props":2297,"children":2298},{"style":715},[2299],{"type":55,"value":218},{"type":49,"tag":196,"props":2301,"children":2302},{"style":721},[2303],{"type":55,"value":2304},"data",{"type":49,"tag":196,"props":2306,"children":2307},{"style":715},[2308],{"type":55,"value":2309},";",{"type":49,"tag":196,"props":2311,"children":2312},{"style":2101},[2313],{"type":55,"value":2314}," \u002F\u002F Base64 encoded\n",{"type":49,"tag":196,"props":2316,"children":2317},{"class":662,"line":907},[2318],{"type":49,"tag":196,"props":2319,"children":2320},{"style":715},[2321],{"type":55,"value":2322},"    }\n",{"type":49,"tag":196,"props":2324,"children":2325},{"class":662,"line":916},[2326],{"type":49,"tag":196,"props":2327,"children":2328},{"style":715},[2329],{"type":55,"value":1458},{"type":49,"tag":196,"props":2331,"children":2332},{"class":662,"line":925},[2333],{"type":49,"tag":196,"props":2334,"children":2335},{"style":715},[2336],{"type":55,"value":1166},{"type":49,"tag":196,"props":2338,"children":2339},{"class":662,"line":933},[2340,2344,2348,2352,2357,2361,2365,2369,2373,2378,2382,2386,2390,2394,2399,2403,2408],{"type":49,"tag":196,"props":2341,"children":2342},{"style":709},[2343],{"type":55,"value":2146},{"type":49,"tag":196,"props":2345,"children":2346},{"style":721},[2347],{"type":55,"value":2151},{"type":49,"tag":196,"props":2349,"children":2350},{"style":715},[2351],{"type":55,"value":2156},{"type":49,"tag":196,"props":2353,"children":2354},{"style":721},[2355],{"type":55,"value":2356},"inputTranscription) console",{"type":49,"tag":196,"props":2358,"children":2359},{"style":715},[2360],{"type":55,"value":218},{"type":49,"tag":196,"props":2362,"children":2363},{"style":788},[2364],{"type":55,"value":1226},{"type":49,"tag":196,"props":2366,"children":2367},{"style":721},[2368],{"type":55,"value":795},{"type":49,"tag":196,"props":2370,"children":2371},{"style":715},[2372],{"type":55,"value":749},{"type":49,"tag":196,"props":2374,"children":2375},{"style":742},[2376],{"type":55,"value":2377},"User:",{"type":49,"tag":196,"props":2379,"children":2380},{"style":715},[2381],{"type":55,"value":749},{"type":49,"tag":196,"props":2383,"children":2384},{"style":715},[2385],{"type":55,"value":1316},{"type":49,"tag":196,"props":2387,"children":2388},{"style":721},[2389],{"type":55,"value":2205},{"type":49,"tag":196,"props":2391,"children":2392},{"style":715},[2393],{"type":55,"value":218},{"type":49,"tag":196,"props":2395,"children":2396},{"style":721},[2397],{"type":55,"value":2398},"inputTranscription",{"type":49,"tag":196,"props":2400,"children":2401},{"style":715},[2402],{"type":55,"value":218},{"type":49,"tag":196,"props":2404,"children":2405},{"style":721},[2406],{"type":55,"value":2407},"text)",{"type":49,"tag":196,"props":2409,"children":2410},{"style":715},[2411],{"type":55,"value":754},{"type":49,"tag":196,"props":2413,"children":2414},{"class":662,"line":942},[2415,2419,2423,2427,2432,2436,2440,2444,2448,2453,2457,2461,2465,2469,2474,2478,2482],{"type":49,"tag":196,"props":2416,"children":2417},{"style":709},[2418],{"type":55,"value":2146},{"type":49,"tag":196,"props":2420,"children":2421},{"style":721},[2422],{"type":55,"value":2151},{"type":49,"tag":196,"props":2424,"children":2425},{"style":715},[2426],{"type":55,"value":2156},{"type":49,"tag":196,"props":2428,"children":2429},{"style":721},[2430],{"type":55,"value":2431},"outputTranscription) console",{"type":49,"tag":196,"props":2433,"children":2434},{"style":715},[2435],{"type":55,"value":218},{"type":49,"tag":196,"props":2437,"children":2438},{"style":788},[2439],{"type":55,"value":1226},{"type":49,"tag":196,"props":2441,"children":2442},{"style":721},[2443],{"type":55,"value":795},{"type":49,"tag":196,"props":2445,"children":2446},{"style":715},[2447],{"type":55,"value":749},{"type":49,"tag":196,"props":2449,"children":2450},{"style":742},[2451],{"type":55,"value":2452},"Gemini:",{"type":49,"tag":196,"props":2454,"children":2455},{"style":715},[2456],{"type":55,"value":749},{"type":49,"tag":196,"props":2458,"children":2459},{"style":715},[2460],{"type":55,"value":1316},{"type":49,"tag":196,"props":2462,"children":2463},{"style":721},[2464],{"type":55,"value":2205},{"type":49,"tag":196,"props":2466,"children":2467},{"style":715},[2468],{"type":55,"value":218},{"type":49,"tag":196,"props":2470,"children":2471},{"style":721},[2472],{"type":55,"value":2473},"outputTranscription",{"type":49,"tag":196,"props":2475,"children":2476},{"style":715},[2477],{"type":55,"value":218},{"type":49,"tag":196,"props":2479,"children":2480},{"style":721},[2481],{"type":55,"value":2407},{"type":49,"tag":196,"props":2483,"children":2484},{"style":715},[2485],{"type":55,"value":754},{"type":49,"tag":196,"props":2487,"children":2488},{"class":662,"line":1452},[2489,2493,2497,2501,2506,2510,2515],{"type":49,"tag":196,"props":2490,"children":2491},{"style":709},[2492],{"type":55,"value":2146},{"type":49,"tag":196,"props":2494,"children":2495},{"style":721},[2496],{"type":55,"value":2151},{"type":49,"tag":196,"props":2498,"children":2499},{"style":715},[2500],{"type":55,"value":2156},{"type":49,"tag":196,"props":2502,"children":2503},{"style":721},[2504],{"type":55,"value":2505},"interrupted) ",{"type":49,"tag":196,"props":2507,"children":2508},{"style":715},[2509],{"type":55,"value":800},{"type":49,"tag":196,"props":2511,"children":2512},{"style":2101},[2513],{"type":55,"value":2514}," \u002F* Stop playback, clear audio queue *\u002F",{"type":49,"tag":196,"props":2516,"children":2517},{"style":715},[2518],{"type":55,"value":1735},{"type":49,"tag":628,"props":2520,"children":2521},{},[],{"type":49,"tag":58,"props":2523,"children":2525},{"id":2524},"limitations",[2526],{"type":55,"value":2527},"Limitations",{"type":49,"tag":84,"props":2529,"children":2530},{},[2531,2562,2572,2582,2592,2602,2612],{"type":49,"tag":88,"props":2532,"children":2533},{},[2534,2539,2541,2547,2548,2553,2554,2560],{"type":49,"tag":71,"props":2535,"children":2536},{},[2537],{"type":55,"value":2538},"Response modality",{"type":55,"value":2540}," — Only ",{"type":49,"tag":232,"props":2542,"children":2544},{"className":2543},[],[2545],{"type":55,"value":2546},"TEXT",{"type":55,"value":564},{"type":49,"tag":71,"props":2549,"children":2550},{},[2551],{"type":55,"value":2552},"or",{"type":55,"value":564},{"type":49,"tag":232,"props":2555,"children":2557},{"className":2556},[],[2558],{"type":55,"value":2559},"AUDIO",{"type":55,"value":2561}," per session, not both",{"type":49,"tag":88,"props":2563,"children":2564},{},[2565,2570],{"type":49,"tag":71,"props":2566,"children":2567},{},[2568],{"type":55,"value":2569},"Audio-only session",{"type":55,"value":2571}," — 15 min without compression",{"type":49,"tag":88,"props":2573,"children":2574},{},[2575,2580],{"type":49,"tag":71,"props":2576,"children":2577},{},[2578],{"type":55,"value":2579},"Audio+video session",{"type":55,"value":2581}," — 2 min without compression",{"type":49,"tag":88,"props":2583,"children":2584},{},[2585,2590],{"type":49,"tag":71,"props":2586,"children":2587},{},[2588],{"type":55,"value":2589},"Connection lifetime",{"type":55,"value":2591}," — ~10 min (use session resumption)",{"type":49,"tag":88,"props":2593,"children":2594},{},[2595,2600],{"type":49,"tag":71,"props":2596,"children":2597},{},[2598],{"type":55,"value":2599},"Context window",{"type":55,"value":2601}," — 128k tokens (native audio) \u002F 32k tokens (standard)",{"type":49,"tag":88,"props":2603,"children":2604},{},[2605,2610],{"type":49,"tag":71,"props":2606,"children":2607},{},[2608],{"type":55,"value":2609},"Code execution",{"type":55,"value":2611}," — Not supported",{"type":49,"tag":88,"props":2613,"children":2614},{},[2615,2620],{"type":49,"tag":71,"props":2616,"children":2617},{},[2618],{"type":55,"value":2619},"URL context",{"type":55,"value":2611},{"type":49,"tag":58,"props":2622,"children":2624},{"id":2623},"best-practices",[2625],{"type":55,"value":2626},"Best Practices",{"type":49,"tag":2628,"props":2629,"children":2630},"ol",{},[2631,2641,2651,2661,2671,2693,2709],{"type":49,"tag":88,"props":2632,"children":2633},{},[2634,2639],{"type":49,"tag":71,"props":2635,"children":2636},{},[2637],{"type":55,"value":2638},"Use headphones",{"type":55,"value":2640}," when testing mic audio to prevent echo\u002Fself-interruption",{"type":49,"tag":88,"props":2642,"children":2643},{},[2644,2649],{"type":49,"tag":71,"props":2645,"children":2646},{},[2647],{"type":55,"value":2648},"Enable context window compression",{"type":55,"value":2650}," for sessions longer than 15 minutes",{"type":49,"tag":88,"props":2652,"children":2653},{},[2654,2659],{"type":49,"tag":71,"props":2655,"children":2656},{},[2657],{"type":55,"value":2658},"Implement session resumption",{"type":55,"value":2660}," to handle connection resets gracefully",{"type":49,"tag":88,"props":2662,"children":2663},{},[2664,2669],{"type":49,"tag":71,"props":2665,"children":2666},{},[2667],{"type":55,"value":2668},"Use ephemeral tokens",{"type":55,"value":2670}," for client-side deployments — never expose API keys in browsers",{"type":49,"tag":88,"props":2672,"children":2673},{},[2674,2684,2686,2691],{"type":49,"tag":71,"props":2675,"children":2676},{},[2677,2679],{"type":55,"value":2678},"Use ",{"type":49,"tag":232,"props":2680,"children":2682},{"className":2681},[],[2683],{"type":55,"value":532},{"type":55,"value":2685}," for all real-time user input (audio, video, text). Reserve ",{"type":49,"tag":232,"props":2687,"children":2689},{"className":2688},[],[2690],{"type":55,"value":555},{"type":55,"value":2692}," only for injecting conversation history",{"type":49,"tag":88,"props":2694,"children":2695},{},[2696,2707],{"type":49,"tag":71,"props":2697,"children":2698},{},[2699,2701],{"type":55,"value":2700},"Send ",{"type":49,"tag":232,"props":2702,"children":2704},{"className":2703},[],[2705],{"type":55,"value":2706},"audioStreamEnd",{"type":55,"value":2708}," when the mic is paused to flush cached audio",{"type":49,"tag":88,"props":2710,"children":2711},{},[2712,2717],{"type":49,"tag":71,"props":2713,"children":2714},{},[2715],{"type":55,"value":2716},"Clear audio playback queues",{"type":55,"value":2718}," on interruption signals",{"type":49,"tag":58,"props":2720,"children":2722},{"id":2721},"how-to-use-the-gemini-api",[2723],{"type":55,"value":2724},"How to use the Gemini API",{"type":49,"tag":65,"props":2726,"children":2727},{},[2728],{"type":55,"value":2729},"For detailed API documentation, fetch from the official docs index:",{"type":49,"tag":65,"props":2731,"children":2732},{},[2733,2738,2739],{"type":49,"tag":71,"props":2734,"children":2735},{},[2736],{"type":55,"value":2737},"llms.txt URL",{"type":55,"value":314},{"type":49,"tag":232,"props":2740,"children":2742},{"className":2741},[],[2743],{"type":55,"value":2744},"https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fllms.txt",{"type":49,"tag":65,"props":2746,"children":2747},{},[2748,2750,2756],{"type":55,"value":2749},"This index contains links to all documentation pages in ",{"type":49,"tag":232,"props":2751,"children":2753},{"className":2752},[],[2754],{"type":55,"value":2755},".md.txt",{"type":55,"value":2757}," format. Use web fetch tools to:",{"type":49,"tag":2628,"props":2759,"children":2760},{},[2761,2774],{"type":49,"tag":88,"props":2762,"children":2763},{},[2764,2766,2772],{"type":55,"value":2765},"Fetch ",{"type":49,"tag":232,"props":2767,"children":2769},{"className":2768},[],[2770],{"type":55,"value":2771},"llms.txt",{"type":55,"value":2773}," to discover available documentation pages",{"type":49,"tag":88,"props":2775,"children":2776},{},[2777,2779,2785],{"type":55,"value":2778},"Fetch specific pages (e.g., ",{"type":49,"tag":232,"props":2780,"children":2782},{"className":2781},[],[2783],{"type":55,"value":2784},"https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Flive-session.md.txt",{"type":55,"value":832},{"type":49,"tag":638,"props":2787,"children":2789},{"id":2788},"key-documentation-pages",[2790],{"type":55,"value":2791},"Key Documentation Pages",{"type":49,"tag":189,"props":2793,"children":2794},{},[2795],{"type":49,"tag":65,"props":2796,"children":2797},{},[2798,2802,2804,2809],{"type":49,"tag":196,"props":2799,"children":2800},{},[2801],{"type":55,"value":524},{"type":55,"value":2803},"\nThose are not all the documentation pages. Use the ",{"type":49,"tag":232,"props":2805,"children":2807},{"className":2806},[],[2808],{"type":55,"value":2771},{"type":55,"value":2810}," index to discover available documentation pages",{"type":49,"tag":84,"props":2812,"children":2813},{},[2814,2826,2838,2850,2861,2873],{"type":49,"tag":88,"props":2815,"children":2816},{},[2817,2824],{"type":49,"tag":211,"props":2818,"children":2821},{"href":2819,"rel":2820},"https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Flive.md.txt",[413],[2822],{"type":55,"value":2823},"Live API Overview",{"type":55,"value":2825}," — getting started, raw WebSocket usage",{"type":49,"tag":88,"props":2827,"children":2828},{},[2829,2836],{"type":49,"tag":211,"props":2830,"children":2833},{"href":2831,"rel":2832},"https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Flive-guide.md.txt",[413],[2834],{"type":55,"value":2835},"Live API Capabilities Guide",{"type":55,"value":2837}," — voice config, transcription config, native audio (affective dialog, proactive audio, thinking), VAD configuration, media resolution",{"type":49,"tag":88,"props":2839,"children":2840},{},[2841,2848],{"type":49,"tag":211,"props":2842,"children":2845},{"href":2843,"rel":2844},"https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Flive-tools.md.txt",[413],[2846],{"type":55,"value":2847},"Live API Tool Use",{"type":55,"value":2849}," — function calling (sync and async), Google Search grounding",{"type":49,"tag":88,"props":2851,"children":2852},{},[2853,2859],{"type":49,"tag":211,"props":2854,"children":2856},{"href":2784,"rel":2855},[413],[2857],{"type":55,"value":2858},"Session Management",{"type":55,"value":2860}," — context window compression, session resumption, GoAway signals",{"type":49,"tag":88,"props":2862,"children":2863},{},[2864,2871],{"type":49,"tag":211,"props":2865,"children":2868},{"href":2866,"rel":2867},"https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fephemeral-tokens.md.txt",[413],[2869],{"type":55,"value":2870},"Ephemeral Tokens",{"type":55,"value":2872}," — secure client-side authentication for browser\u002Fmobile",{"type":49,"tag":88,"props":2874,"children":2875},{},[2876,2883],{"type":49,"tag":211,"props":2877,"children":2880},{"href":2878,"rel":2879},"https:\u002F\u002Fai.google.dev\u002Fapi\u002Flive.md.txt",[413],[2881],{"type":55,"value":2882},"WebSockets API Reference",{"type":55,"value":2884}," — raw WebSocket protocol details",{"type":49,"tag":58,"props":2886,"children":2888},{"id":2887},"supported-languages",[2889],{"type":55,"value":2890},"Supported Languages",{"type":49,"tag":65,"props":2892,"children":2893},{},[2894],{"type":55,"value":2895},"The Live API supports 70 languages including: English, Spanish, French, German, Italian, Portuguese, Chinese, Japanese, Korean, Hindi, Arabic, Russian, and many more. Native audio models automatically detect and switch languages.",{"type":49,"tag":2897,"props":2898,"children":2899},"style",{},[2900],{"type":55,"value":2901},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2903,"total":3034},[2904,2922,2931,2940,2951,2961,2974,2983,2992,3002,3011,3024],{"slug":2905,"name":2905,"fn":2906,"description":2907,"org":2908,"tags":2909,"stars":2919,"repoUrl":2920,"updatedAt":2921},"mps-aspect-accessories","configure JetBrains MPS module dependencies","Wire MPS module and model dependencies, used languages, used devkits, extended languages, runtime solutions, accessory models, and language\u002Fdependency versions. Use when adding\u002Fremoving module dependencies, importing languages or devkits into a model, declaring runtime solutions, or shipping accessory content visible to consumers without explicit import.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2910,2913,2916],{"name":2911,"slug":2912,"type":15},"Architecture","architecture",{"name":2914,"slug":2915,"type":15},"Configuration","configuration",{"name":2917,"slug":2918,"type":15},"Engineering","engineering",1650,"https:\u002F\u002Fgithub.com\u002FJetBrains\u002FMPS","2026-07-17T06:06:57.311661",{"slug":2923,"name":2923,"fn":2924,"description":2925,"org":2926,"tags":2927,"stars":2919,"repoUrl":2920,"updatedAt":2930},"mps-aspect-actions","define and edit MPS node factories","Use when defining or editing MPS node factories (the \"actions\" aspect) — `NodeFactories` roots, per-concept `NodeFactory` setup functions that initialize a freshly created node and optionally copy data from a replaced `sampleNode`, plus the actions aspect's `CopyPasteHandlers` and `PasteWrappers` roots. Reach for this skill when a substitution, side transform, completion replacement, or `add new initialized(...)` should preserve fields from the node it is replacing, or when defaults set in a constructor are not enough.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2928,2929],{"name":2911,"slug":2912,"type":15},{"name":2917,"slug":2918,"type":15},"2026-07-17T06:04:48.066901",{"slug":2932,"name":2932,"fn":2933,"description":2934,"org":2935,"tags":2936,"stars":2919,"repoUrl":2920,"updatedAt":2939},"mps-aspect-behavior","define and edit MPS concept behavior","Use when defining or editing MPS `ConceptBehavior` — per-concept methods (non-virtual \u002F virtual \u002F abstract \u002F static \u002F virtual static), constructors, virtual dispatch (MRO), super and interface-default calls (`super\u003CInterface>.method`), overriding methods from `lang.core.behavior` interfaces such as `ScopeProvider.getScope` \u002F `INamedConcept.getName` \u002F `BaseConcept.getPresentation`, calling sibling methods (`LocalBehaviorMethodCall`) and behavior methods from other aspects via `node.method(...)`. Reach for this skill whenever the task involves authoring or modifying `\u003Clang>\u002FlanguageModels\u002Fbehavior.mps`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2937,2938],{"name":2911,"slug":2912,"type":15},{"name":2917,"slug":2918,"type":15},"2026-07-13T06:45:21.757084",{"slug":2941,"name":2941,"fn":2942,"description":2943,"org":2944,"tags":2945,"stars":2919,"repoUrl":2920,"updatedAt":2950},"mps-aspect-constraints","define JetBrains MPS language constraints","Use when defining or editing MPS language constraints — property validators \u002F setters \u002F getters, referent search scopes (imperative or inherited via `ScopeProvider.getScope`), `referentSetHandler` side effects, default-scope blocks, `canBeChild` \u002F `canBeParent` \u002F `canBeAncestor` \u002F `canBeRoot` placement rules, `defaultConcreteConcept` for abstract concepts, `set \u003Cread-only>` and `{name}` aliasing, and scope helpers (`SimpleRoleScope`, `ListScope`, `CompositeScope`, `HidingByNameScope`). Reach for this skill whenever the task involves authoring or modifying `\u003Clang>\u002FlanguageModels\u002Fconstraints.mps`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2946,2947],{"name":2911,"slug":2912,"type":15},{"name":2948,"slug":2949,"type":15},"Code Analysis","code-analysis","2026-07-23T05:41:33.639365",{"slug":2952,"name":2952,"fn":2953,"description":2954,"org":2955,"tags":2956,"stars":2919,"repoUrl":2920,"updatedAt":2960},"mps-aspect-dataflow","define and debug MPS dataflow builders","Use when defining or debugging MPS dataflow builders for a concept — control\u002Fdata flow declarations that drive reachability analysis and variable-use checking. Covers DataFlowBuilderDeclaration, BuilderBlock, emit instructions (code for, jump, ifjump, label, read, write, ret, mayBeUnreachable), positions (AfterPosition, BeforePosition, LabelPosition), the jetbrains.mps.lang.dataFlow language, the NodeParameter implicit, BL+smodel usage inside builder bodies, and IBuilderMode for advanced analyses such as nullable\u002Fnon-null tracking.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2957],{"name":2958,"slug":2959,"type":15},"Data Analysis","data-analysis","2026-07-13T06:45:19.114674",{"slug":2962,"name":2962,"fn":2963,"description":2964,"org":2965,"tags":2966,"stars":2919,"repoUrl":2920,"updatedAt":2973},"mps-aspect-editor","define MPS editor layouts","Use when creating or changing MPS editor definitions — the overall workflow from scaffolding a `ConceptEditorDeclaration` through componentizing reusable `EditorComponentDeclaration`s, refining cell models and cell layouts, applying style sheets and indent-layout style items, wiring smart references, leveraging inheritance via super-concepts and interfaces, inspecting (`print_node_json`, `show_node_representation`) and validating (`check_root_node_problems`). Covers `jetbrains.mps.lang.editor` cell models (`CellModel_RefNode`\u002F`CellModel_RefNodeList`\u002F`CellModel_RefCell`\u002F`CellModel_Property`\u002F`CellModel_Constant`), layout choices, and JSON blueprints for common editor shapes. For the non-layout side (action maps, keymaps, transformation\u002Fsubstitute menus) use `mps-aspect-editor-menus-and-keymaps`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2967,2970],{"name":2968,"slug":2969,"type":15},"Design","design",{"name":2971,"slug":2972,"type":15},"UI Components","ui-components","2026-07-23T05:41:56.638151",{"slug":2975,"name":2975,"fn":2976,"description":2977,"org":2978,"tags":2979,"stars":2919,"repoUrl":2920,"updatedAt":2982},"mps-aspect-editor-menus-and-keymaps","author MPS editor menus and keymaps","Use when authoring the **non-layout** parts of the MPS editor aspect — what happens when the user types, presses a key, triggers completion, pastes, or invokes a context action. Covers action maps (`CellActionMapDeclaration`), cell keymaps (`CellKeyMapDeclaration`), transformation menus (`TransformationMenu_Default` \u002F `_Named` \u002F `_Contribution`), substitute menus (`SubstituteMenu_Default` \u002F `SubstituteMenu` \u002F contributions), side transforms (LEFT\u002FRIGHT), legacy cell menus, paste wrappers and copy-paste handlers (in the actions language), completion styling, reference presentation, two-step deletion, and the editor selection API. Trigger terms: `actionMap`, `keyMap`, `delete_action_id`, `transformationMenu`, `substituteMenu`, `Ctrl+Space`, `Ctrl+Alt+B`, side transform, paste wrapper, completion styling, `PasteWrappers`, `CopyPasteHandlers`. For the **layout** side (cells, layouts, style sheets) use `mps-aspect-editor` instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2980,2981],{"name":2917,"slug":2918,"type":15},{"name":2971,"slug":2972,"type":15},"2026-07-23T05:41:49.666535",{"slug":2984,"name":2984,"fn":2985,"description":2986,"org":2987,"tags":2988,"stars":2919,"repoUrl":2920,"updatedAt":2991},"mps-aspect-generation-plan","modify MPS generation plans","Use when defining or modifying an MPS generation plan — explicit ordering of generators, checkpoints for cross-model reference resolution, forks for parallel branches, IncludePlan composition, conditional PlanContribution activation, ParameterEquals\u002FConceptListSelector fork selectors, and InitModelAttributes for targetFacet routing. Apply when working with @genplan models, the jetbrains.mps.lang.generator.plan language, attaching plans via DevKits or the Custom generation facet, or debugging cross-model mapping label resolution.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2989,2990],{"name":2911,"slug":2912,"type":15},{"name":2917,"slug":2918,"type":15},"2026-07-13T06:44:59.507855",{"slug":2993,"name":2993,"fn":2994,"description":2995,"org":2996,"tags":2997,"stars":2919,"repoUrl":2920,"updatedAt":3001},"mps-aspect-generator","define JetBrains MPS generator rules","Use when defining or modifying MPS generators — author a generator module, add or edit root\u002Freduction\u002Fweaving\u002Fpattern mapping rules, attach template macros ($COPY_SRC, $LOOP, $IF, $PROPERTY, $REF, $SWITCH, $MAP_SRC, $WEAVE, $INSERT, $LABEL, $TRACE, $VAR), wire mapping labels, build template switches, write pre\u002Fpost mapping scripts, navigate `genContext`, or debug \"rule didn't fire\", missing references, empty output, infinite reduction loops, and generated-Java compile failures.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2998,2999,3000],{"name":2911,"slug":2912,"type":15},{"name":2948,"slug":2949,"type":15},{"name":2917,"slug":2918,"type":15},"2026-07-17T06:06:58.042999",{"slug":3003,"name":3003,"fn":3004,"description":3005,"org":3006,"tags":3007,"stars":2919,"repoUrl":2920,"updatedAt":3010},"mps-aspect-intentions","define and edit MPS intentions","Use when defining or editing MPS intentions (the Alt+Enter context-action aspect) — adding `IntentionDeclaration` roots, parameterized or surround-with variants, description\u002FisApplicable\u002Fexecute blocks, child-filter functions, factory-initialized AST splicing, or debugging why an intention is not offered. Lives in the language's `intentions` model and uses `jetbrains.mps.lang.intentions`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3008,3009],{"name":2911,"slug":2912,"type":15},{"name":2917,"slug":2918,"type":15},"2026-07-23T05:41:48.692899",{"slug":3012,"name":3012,"fn":3013,"description":3014,"org":3015,"tags":3016,"stars":2919,"repoUrl":2920,"updatedAt":3023},"mps-aspect-migrations","author and debug MPS migration scripts","Use when authoring or debugging MPS migration scripts that upgrade user models after a language definition changes — covers jetbrains.mps.lang.migration (MigrationScript class-based, PureMigrationScript declarative, MoveConcept\u002FMoveContainmentLink\u002FMoveReferenceLink\u002FMoveProperty, ordering via OrderDependency, data exchange via putData\u002FgetData, RefactoringLog, ConceptMigrationReference) and jetbrains.mps.lang.script Enhancement Scripts (MigrationScript with MigrationScriptPart_Instance, ExtractInterfaceMigration, FactoryMigrationScriptPart, CommentMigrationScriptPart) — when a model needs version-gated upgrade, concept rename or removal, link or property rename, instance-level transformation, or composition of migration steps.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3017,3020],{"name":3018,"slug":3019,"type":15},"Debugging","debugging",{"name":3021,"slug":3022,"type":15},"Migration","migration","2026-07-13T06:45:20.372122",{"slug":3025,"name":3025,"fn":3026,"description":3027,"org":3028,"tags":3029,"stars":2919,"repoUrl":2920,"updatedAt":3033},"mps-aspect-structure-concepts","define concepts in MPS structure aspect","Define concepts, interface concepts, enumerations, and constrained data types in an MPS language's `structure` aspect. Covers smart-reference detection, alias rules, cardinality, INamedConcept usage, bulk creation, and the full `mps_mcp_alter_structure` \u002F `mps_mcp_query_structure` reference. Use when authoring or modifying a language's structure model.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3030],{"name":3031,"slug":3032,"type":15},"Data Modeling","data-modeling","2026-07-23T05:41:30.705975",188,{"items":3036,"total":3150},[3037,3054,3067,3081,3096,3119,3136],{"slug":3038,"name":3038,"fn":3039,"description":3040,"org":3041,"tags":3042,"stars":28,"repoUrl":29,"updatedAt":3053},"algorithmic-art","create generative art with p5.js","Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3043,3046,3049,3052],{"name":3044,"slug":3045,"type":15},"Creative","creative",{"name":3047,"slug":3048,"type":15},"Generative Art","generative-art",{"name":3050,"slug":3051,"type":15},"Graphics","graphics",{"name":694,"slug":691,"type":15},"2026-07-13T06:41:35.540127",{"slug":3055,"name":3055,"fn":3056,"description":3057,"org":3058,"tags":3059,"stars":28,"repoUrl":29,"updatedAt":3066},"antfu","configure JavaScript projects with Anthony Fu's tools","Anthony Fu's opinionated tooling and conventions for JavaScript\u002FTypeScript projects. Use when setting up new projects, configuring ESLint\u002FPrettier alternatives, monorepos, library publishing, or when the user mentions Anthony Fu's preferences.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3060,3061,3062,3063],{"name":2626,"slug":2623,"type":15},{"name":2917,"slug":2918,"type":15},{"name":694,"slug":691,"type":15},{"name":3064,"slug":3065,"type":15},"TypeScript","typescript","2026-07-13T06:43:13.153309",{"slug":3068,"name":3068,"fn":3069,"description":3070,"org":3071,"tags":3072,"stars":28,"repoUrl":29,"updatedAt":3080},"brand-guidelines","apply Anthropic brand guidelines","Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3073,3076,3077],{"name":3074,"slug":3075,"type":15},"Branding","branding",{"name":2968,"slug":2969,"type":15},{"name":3078,"slug":3079,"type":15},"Typography","typography","2026-07-13T06:43:06.077629",{"slug":3082,"name":3082,"fn":3083,"description":3084,"org":3085,"tags":3086,"stars":28,"repoUrl":29,"updatedAt":3095},"canvas-design","create visual art and design assets","Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3087,3088,3089,3092],{"name":3044,"slug":3045,"type":15},{"name":2968,"slug":2969,"type":15},{"name":3090,"slug":3091,"type":15},"Images","images",{"name":3093,"slug":3094,"type":15},"PDF","pdf","2026-07-13T06:39:58.803113",{"slug":3097,"name":3097,"fn":3098,"description":3099,"org":3100,"tags":3101,"stars":28,"repoUrl":29,"updatedAt":3118},"ci-cd-containerization-advisor","design CI\u002FCD pipelines for Kotlin applications","Design reproducible build, image, and deployment pipelines for Kotlin plus Spring applications, including CI verification, layered containers, rollout safety, and deployment-time migration coordination. Use when creating or improving Dockerfiles, CI workflows, image hardening, Kubernetes manifests, release gates, or deployment strategies for Spring Boot services, especially where build reproducibility and operational safety matter.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3102,3105,3108,3111,3112,3115],{"name":3103,"slug":3104,"type":15},"CI\u002FCD","ci-cd",{"name":3106,"slug":3107,"type":15},"Containers","containers",{"name":3109,"slug":3110,"type":15},"Deployment","deployment",{"name":2917,"slug":2918,"type":15},{"name":3113,"slug":3114,"type":15},"Kotlin","kotlin",{"name":3116,"slug":3117,"type":15},"Spring","spring","2026-07-13T06:41:47.83899",{"slug":3120,"name":3120,"fn":3121,"description":3122,"org":3123,"tags":3124,"stars":28,"repoUrl":29,"updatedAt":3135},"cloudflare-deploy","deploy applications to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3125,3128,3131,3134],{"name":3126,"slug":3127,"type":15},"Cloudflare","cloudflare",{"name":3129,"slug":3130,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":3132,"slug":3133,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":3109,"slug":3110,"type":15},"2026-07-17T06:04:42.853896",{"slug":3137,"name":3137,"fn":3138,"description":3139,"org":3140,"tags":3141,"stars":28,"repoUrl":29,"updatedAt":3149},"compose-ui-control","interact with Compose Desktop applications","Control a running Compose Desktop application via HTTP. Use when you need to interact with UI elements, click buttons, enter text, wait for elements to appear, or capture screenshots in a Compose Desktop app that has compose-ui-test-server enabled.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3142,3145,3148],{"name":3143,"slug":3144,"type":15},"Automation","automation",{"name":3146,"slug":3147,"type":15},"Desktop","desktop",{"name":2971,"slug":2972,"type":15},"2026-07-13T06:40:38.798626",128]