Rate this page:

LiveAPIClientParameters

Gemini.LiveAPIClient parameters. Can be passed as arguments to the Gemini.createLiveAPIClient method.

Props

apiKey

Copy URL
apiKey: 

string

|

undefined

Optional. Gemini API key. Required for [Backend.GEMINI_API]. Get a Gemini API key here.

backend

Copy URL
backend: 

Backend

Optional. Backend is the GenAI backend to use for the client. The default value is [Backend.GEMINI_API].

connectConfig

Copy URL
connectConfig: 

Object

Optional. Session config for the API connection.

credentials

Copy URL
credentials: 

string

|

undefined

Optional. Google credential file content.

httpOptions

Copy URL
httpOptions: 

Object

Optional. HTTP options to override. NOTE: the 'baseUrl' parameter will be ignored.

location

Copy URL
location: 

string

|

undefined

Optional. GCP Location/Region for Vertex AI. Required for [Backend.VERTEX_AI]. Generative AI locations.

model

Copy URL
model: 

string

|

undefined

Optional. The model to use for Gemini Live API processing. The default value is gemini-2.0-flash-exp.

onWebSocketClose

Copy URL
onWebSocketClose: 

(event: WebSocketEvents.CLOSE) => void

|

undefined

Optional. A callback function that is called when the WebSocket connection is closed.

project

Copy URL
project: 

string

|

undefined

Optional. GCP Project ID for Vertex AI. Required for [Backend.VERTEX_AI]. Find your Project ID here.

statistics

Copy URL
statistics: 

false

|

undefined

|

true

Optional. Enables statistics functionality.

trace

Copy URL
trace: 

false

|

undefined

|

true

Optional. Enables trace functionality.