Gemini 3.8 Live
Google's Live API model for real-time voice and video conversations: it takes streamed speech, text and camera or screen frames, and answers with speech or text, with function calling. Sessions speak Google's Gemini Live protocol, so the official Google GenAI SDKs work with only the base URL changed.
Setup your API Key
If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.
API Schema
The model is served over a WebSocket in the Gemini Live protocol. Client messages, billing, limits and errors are described in Realtime Sessions.
Connection URL (API key)
wss://api.aimlapi.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent (v1alpha also works), with the key in x-goog-api-key or Authorization: Bearer
Connection URL (client secret)
wss://api.aimlapi.com/ws/google.ai.generativelanguage.v1alpha.GenerativeService.BidiGenerateContentConstrained (v1beta also works), with the secret as access_token or in Authorization: Token (client secrets)
SDK base URL
https://api.aimlapi.com
JavaScript SDK
@google/genai sends a plain API key in the URL, which is refused (400 credential_in_query): pass a client secret as its API key with apiVersion: "v1alpha", as in the example below
Session options (setup, the first message, sent once within 10 seconds of connecting; model is gemini-3.8-live, google/gemini-3.8-live, models/gemini-3.8-live or models/google/gemini-3.8-live):
generationConfig.responseModalities
AUDIO (default) and/or TEXT
generationConfig.maxOutputTokens
Kept between 1,024 and 4,096 (default 4,096); thinking counts inside it
generationConfig.temperature, topP, topK, presencePenalty, frequencyPenalty, seed
As in the Gemini API; candidateCount 1 only
generationConfig.speechConfig
voiceConfig.prebuiltVoiceConfig.voiceName (a prebuilt voice such as Puck or Kore), languageCode
generationConfig.mediaResolution
MEDIA_RESOLUTION_LOW, _MEDIUM, _HIGH
systemInstruction
Up to 8 text parts of 16,384 characters
tools
functionDeclarations only, up to 32
realtimeInputConfig
automaticActivityDetection, activityHandling, turnCoverage
outputAudioTranscription
Transcript of the model's speech
historyConfig.initialHistoryInClientContent
true or false
Code Example
Last updated
Was this helpful?