google · Google AI Docs
Gemini API Ephemeral tokens
Explains how to use ephemeral tokens to provide temporary, limited-access credentials for client-side applications interacting with the Gemini Multimodal Live API.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Gemini API Ephemeral tokens
Explains how to use ephemeral tokens to provide temporary, limited-access credentials for client-side applications interacting with the Gemini Multimodal Live API.
When To Use
Use when you need to securely authorize a client-side application to access the Gemini Live API without exposing a permanent API key to the end user.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/gemini-api-ephemeral-tokens-workflow-guide.md | A guide explaining how to create and use short-lived ephemeral tokens for secure Gemini API WebSocket connections from client devices. | Questions about a guide explaining how to create and use short-lived ephemeral tokens for secure Gemini API WebSocket connections fro... |
examples/gemini-api-ephemeral-tokens-gemini-api-python-create-ephemeral-token.text | A Python code example demonstrating how to generate a single-use ephemeral authentication token using the Gemini API client. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to generate a single-use ephemeral authentication token using the Gemini API... |
examples/gemini-api-ephemeral-tokens-gemini-api-ephemeral-token-creation-typescri.text | A TypeScript code example demonstrating how to create ephemeral authentication tokens with custom expiration times using the GoogleGenAI client. | Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to create ephemeral authentication tokens with custom expiration times us... |
examples/gemini-api-ephemeral-tokens-gemini-api-python-ephemeral-token-creation.text | A Python code example demonstrating how to use the Gemini API client to create an ephemeral authentication token with specific live connection constraints. | Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the Gemini API client to create an ephemeral authentication token with... |
examples/gemini-api-ephemeral-tokens-gemini-api-ephemeral-token-creation-nodejs.text | A Node.js code example demonstrating how to create an ephemeral token with a specific expiration time and live connection constraints using the GoogleGenAI client. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to create an ephemeral token with a specific expiration time and live connec... |
examples/gemini-api-ephemeral-tokens-gemini-api-ephemeral-token-nodejs-usage.text | A Node.js code example demonstrating how to initialize a GoogleGenAI client using an ephemeral token for a live session. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to initialize a GoogleGenAI client using an ephemeral token for a live session. |
What This Skill Covers
- Ephemeral tokens are short-lived authentication tokens for accessing the Gemini API through WebSockets. They are designed to enhance security when you are co...
- Main sections:
How ephemeral tokens work,Create an ephemeral token,Python,JavaScript,Python.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://ai.google.dev/gemini-api/docs/live-api/ephemeral-tokens
