Unity & Gemini Live API: WebSocket closed with InternalServerError after sending setup messag

Hi Pablo,
I’m sorry, but I haven’t checked your JSON payload carefully. I’ll start by saying that I don’t know what it is Unity, so my explanation might be silly, but I don’t see the "model": key in the JSON payload. As far as I know, the JSON payload should look something like this:

{
  "setup": {
    "model": "models/gemini-live-2.5-flash-preview",
    "generationConfig": {
      "responseModalities": [
        "TEXT"
      ]
    },
    "systemInstruction": {
      "parts": [
        {
          "text": "any message..."
        }
      ]
    }
  }
}

Try this, then, if it works, try adding the rest of your configuration as well.
I hope I’ve been more helpful this time.

Ciao