Documentation index for AI agents (llms.txt)
Skip to main content

Gemini

Add AI features to your site with Google's Gemini models, like a chat assistant, writing help or reading images, using your own key from Google AI Studio. Usage is billed to your Google account.

Connect​

  1. Open Settings > Connectors, click Gemini, then Connect.
  2. aistudio.google.com/apikey opens. Click Create API key and copy it.
  3. Come back to WebTwizz. The key is picked up, checked with Google and connected. You can also paste it into API key yourself.

If Google rejects the key, you'll see That key was not accepted. No Gemini key? Sign in with OpenRouter gets you Gemini and many more models in one step. See OpenRouter.

What you see​

  • Overview:
    • The key works with a Working label, checked when you open it. Check again checks it now. Usage opens your usage in Google AI Studio. If Google turns the key down, it reads Not accepted: replace the key or check billing.
    • Test message: Send sends one short message to your model and shows how long the reply took. It uses a few tokens, so it only runs when you press it. If it fails, it says why, like a rate limit or a model the key can't use.
  • Model: the model you picked, by the name Google gives it, with its Input limit and Reply limit in tokens. If your key can't reach it, it says so: pick another under Settings.
  • Live site errors: when your published site logs errors that mention Gemini, the latest ones, each with the page and when. Ask the AI to fix starts a new chat that asks the AI to find the cause and fix it. Show more loads older ones.
  • Account: the key, shown by its last four characters, with Replace key.
  • Settings: Model, used whenever your app doesn't ask for a specific one. The list shows the Gemini text models your key can use, newest first, with the recommended one marked.

What the AI can do​

The AI checks that your key works and which models it reaches, then uses those exact model names in your code.

Secrets​

  • GEMINI_API_KEY: your Gemini API key, server-side only
  • GEMINI_MODEL: the default model, gemini-3.8-flash or the newest Flash model your key can use, unless you pick another

Good to know​

  • Replacing the key under Account switches every project that uses it.
  • Removing Gemini from a project takes both secrets out. Your Google account is untouched.