Google Gemini

A Gemini chatbot for your website, from an AI Studio key

A Gemini chatbot for your website needs only an API key from Google AI Studio, with no Vertex AI project or service accounts to set up. Gemini has a free tier, which makes it the easiest provider to try, but the free tier has low limits and its own data terms. This page explains where the line between testing and a live site falls.

Free tiergood for the playground, low rate limits
4 Gemini modelsin the dashboard list, all with tool support
Prices unverifiedour catalog has not confirmed Gemini rates with Google

Free tier or paid tier: what each is good for

Google’s Gemini models can be reached with a key created in AI Studio. The same key works on a free tier or a paid tier, depending on whether billing is linked to the Google Cloud project behind it. That distinction is the main thing to understand before you point a Gemini chatbot at real visitors.

Gemini free tier compared with the paid tier
Free tierPaid tier
Rate limitsLow. A live site with several visitors will often see 429 errors.Higher.
Data termsGoogle’s terms may allow prompts and responses to improve its products.Different terms; read them.
Good forTrying SiteTrellis in the playground.A published website with real conversations.
NeedsA Google account.A billing account linked to the project.

If your visitors might share anything you would not want used that way, keep the free tier out of production. Check Google’s current terms, because they change.

Try Gemini in the playground firstStart free, paste an AI Studio key and test your questions before you decide on a tier. No credit card for SiteTrellis.
Start free

Gemini models and estimated costs

Every Gemini price below is unverified. Our catalog confirmed the id of the current Flash model, but the prices come from third-party trackers, and the other model ids are not confirmed either. Check Google’s pricing page before relying on any figure.

Model prices and estimated cost per 1,000 conversations
ModelInput, per 1M tokensOutput, per 1M tokensEstimate per 1,000 conversations
Gemini 3.8 Flash * $0.75 $3.75 $13.46
Gemini 3.7 Flash * $0.75 $3.75 $13.46
Gemini 3.1 Pro * $2.00 $12.00 $38.04
Gemini 3.1 Flash-Lite * $0.25 $1.50 $4.76

Estimates, not quotes: list prices from our model catalog in US dollars per million tokens, for 6 visitor messages per conversation, 1,500 tokens of prompt and knowledge sent every turn, and 180-token replies, with no prompt caching. Your provider's bill is authoritative. * Not yet confirmed against the provider's own pricing page.

On that basis Gemini 3.8 Flash is estimated at about $13.46 per 1,000 conversations and Gemini 3.1 Flash-Lite at about $4.76. The Pro preview is estimated at about $38.04; preview models can change or be retired with little notice, so avoid one for a live agent unless you are watching it.

One date worth checking: our catalog notes an introductory price on the current Flash model that may end on 2026-12-31 and could be higher afterwards. That note also comes from trackers, so confirm with Google and re-run the cost calculator if it matters to your budget.

Set up a Gemini chatbot with an AI Studio key

  1. Create the key in AI Studio

    Go to aistudio.google.com/apikey, sign in and click Create API key. Choose or create a Google Cloud project; a dedicated one for SiteTrellis keeps usage and billing separate. Gemini keys typically start with AIza.

  2. Decide on a tier

    Stay on the free tier to test. For a live site, open the key’s project and set up billing (or enable it in the Google Cloud Console), then wait a few minutes for it to apply.

  3. Restrict the key

    In Credentials, restrict the key to the Generative Language API. Do not restrict it by HTTP referrer or website: SiteTrellis calls Google from its servers, not from your visitors’ browsers.

  4. Add the key in SiteTrellis

    Under AI providers choose Google Gemini, name the key, paste it and confirm the status turns to ok.

  5. Choose a Gemini model

    In the agent’s model section select the key and pick a model from the list.

  6. Set a budget and a quota

    Create a budget with email alerts in Google Cloud billing, and use quotas for the Generative Language API for a real ceiling (see below).

  7. Test and publish

    Run your real questions in the playground, then publish. If you tested on the free tier, switch the project to paid before the site goes live.

The full walkthrough is in the Connect Gemini guide, with background in the AI keys overview.

Spend control is different on Google Cloud

Unlike a prepaid provider, a Google Cloud budget alerts you but does not by default stop spending. So a budget on its own is not a ceiling. To cap what a runaway chat can cost, combine the budget alert with a quota for the Generative Language API (under IAM and Admin, Quotas), and keep an eye on the usage page in AI Studio. On top of that, use the agent’s monthly message cap and a modest history window in SiteTrellis.

A fallback chain for a Gemini chatbot

Example two-step chain with Gemini first
StepKey and modelWhy
1Gemini key on a paid project, Gemini 3.8 FlashLow-cost, quick replies on a tier with workable limits.
2Anthropic key, Claude Haiku 5.5A different company with prepaid billing, so a Gemini quota error or Google incident does not reach the visitor.

Do not use a free-tier Gemini key as step one on a busy site just to save money. A 429 RESOURCE_EXHAUSTED is the common outcome, the move to step two will be frequent, and visitors’ chats will have gone to Google under free-tier terms first. The chain falls through on 429s, 5xx errors, timeouts and invalid keys, but not on content-policy refusals. Read the fallback guide for the reasoning.

Gemini-specific errors

  • 400 “API key not valid”: the key is wrong or was deleted. Copy it again and rotate it in.
  • 400 FAILED_PRECONDITION: the free tier is not available in your country, or billing must be enabled for the project.
  • 403 PERMISSION_DENIED: the Generative Language API is not enabled for the project, the key is restricted in a way that blocks it, or the model is not available to you.
  • 404: that model name is not available for your key; choose from the dashboard list.
  • 429 RESOURCE_EXHAUSTED: a rate or quota limit, very common on the free tier. Enable billing, wait, or add a fallback step.
  • 500 or 503: Google-side load. Transient; a fallback step covers it.

Changes at Google can take a few minutes to apply, so press Test on the key afterwards. See troubleshooting.

Data handling and honest limits

Messages and prompts go to Google under the terms of whichever tier your key’s project is on, and free and paid are treated differently. Read Google’s Gemini API terms, and mention the provider in your privacy policy. Compare with a prepaid alternative on the Claude page or see the BYOK overview.

As with every SiteTrellis agent: knowledge is pasted text, replies arrive whole, and a model can occasionally answer wrongly, so use strict mode and a handoff.

Frequently asked questions

Can I run a Gemini chatbot on my website for free?

You can test for free, because Gemini has a free tier. It has low rate limits, so a live site will often hit 429 errors, and its data terms may allow prompts to improve Google’s products. Use the paid tier for real visitors.

Do I need Vertex AI or a service account?

No. A key created in Google AI Studio is the simplest route and is what SiteTrellis uses. You do need a Google Cloud project behind the key, which AI Studio can create for you.

Why does Gemini show 429 RESOURCE_EXHAUSTED?

You reached a rate or quota limit, which is common on the free tier. Enable billing on the project, wait for the limit to reset, or add a fallback step on another provider.

Does a Google Cloud budget stop my spending?

Not by default. Budgets send alerts. For a real ceiling, also set a quota for the Generative Language API and use the agent’s monthly message cap in SiteTrellis.

Should I restrict my Gemini key by website?

No. SiteTrellis calls Google from its servers, so a referrer restriction would block it. Restrict the key to the Generative Language API instead.

How much does Gemini cost per 1,000 conversations?

Our catalog estimates about $13.46 on the current Flash model under default assumptions, but Gemini prices there are unverified. Check Google’s pricing page, whose figures decide your bill.

Try Gemini in the playground first

Start free, paste an AI Studio key and test your questions before you decide on a tier. No credit card for SiteTrellis.

  • No credit card
  • Live in about 5 minutes
  • Your keys, your rules
Start free, no credit card