i have this issues on Google Gemini: google.genai....
# ask-ai
a
i have this issues on Google Gemini: google.genai.errors.APIError: 1007 None. realtime_input.media_chunks is deprecated. Use audio, video, or text instead.
t
Thanks for reaching out, Sebastián. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I understand you're seeing this error: google.genai.errors.APIError: 1007 None. realtime_input.media_chunks is deprecated. Use audio, video, or text instead. This means the Gemini Live API no longer accepts the old
realtime_input.media_chunks
field. You need to send media via the
audio
,
video
, or
text
fields instead. What you can do next • If you use LiveKit's Google plugin (recommended): configure the AgentSession / RealtimeModel so media is streamed via the plugin's audio/video paths instead of building
media_chunks
yourself. Example pattern in Python:
Copy code
from livekit.plugins import google

session = AgentSession(
    llm=google.realtime.RealtimeModel(
        voice="Puck",
        temperature=0.8,
        instructions="You are a helpful assistant",
    ),
)
# Stream audio/video through the session plugin rather than setting realtime_input.media_chunks
• If you call the Gemini Live API directly: replace any place that sets
realtime_input.media_chunks
with the appropriate field: ◦ Use
audio
for audio bytes/streams ◦ Use
video
for video frames/streams ◦ Use
text
for text content • Verify package and env: ◦ Make sure you are using a current version of the
livekit-plugins-google
(or google genai client) that supports the new input fields. ◦ Ensure your
GOOGLE_API_KEY
(or other credentials) are set correctly. Quick troubleshooting questions so I can help further 1. Are you using the LiveKit plugin (the
livekit.plugins.google
integration) or calling Gemini Live directly? 2. If you are calling the API directly, can you share (redacted) the snippet that constructs
realtime_input
so I can point out the exact replacement? 3. If using LiveKit, which SDK and version are you running (Python/Node and package version)? If you share which path you're using and a small code excerpt, I’ll give the exact code change to replace
media_chunks
with the correct `audio`/`video`/`text` usage. Sources: Gemini Live API plugin | LiveKit Documentation