Skip to main content

create-simli-app-gemini

A Next.js app where a Gemini Live voice agent talks to you through a Simli avatar. It runs on a free Google AI Studio key, with no card needed.
The browser sends your microphone to the Gemini Live API over a WebSocket, and plays the model’s voice through the avatar with the JavaScript SDK. Both API keys stay on the server:
  • /api/simli-token creates the Simli session token.
  • /api/gemini-token mints a short-lived, single-use Gemini ephemeral token. The model, voice and prompt are set on the server, in app/avatar.ts, and locked into the token, so the browser can’t change them.
The default model is gemini-3.8-live, free of charge on the free tier, and the default voice is Sulafat, to match the default face. For a male face, use a male voice such as Achird. To run it, copy .env.example, fill in SIMLI_API_KEY and GEMINI_API_KEY (free from Google AI Studio: sign in with a Google account, no billing needed), then run npm install and npm run dev. The README has the details, including how to change the face, voice and prompt.
The free tier is for trying things out. On it, Google may use your prompts and the model’s responses to improve its products, its rate limits are low, and you may only serve users in the EEA, Switzerland or the UK on the paid tier. See the README’s “Free tier”. In production, both routes return 403 until you put them behind your own sign-in, because anyone who can call them starts a session on your Simli and Gemini accounts. See the README’s “Before you deploy”.
For an agent that runs on a server instead, see LiveKit Agents or Pipecat.