Gemini Integration

Gemini is the default AI provider in a new jekcms install. It belongs to the free-tier group with Groq and Cohere, and it has two features the other providers do not have. You can add several keys and jekcms rotates between them. When a model is busy, a request tries a list of alternative models before it fails.

The Google Gemini key rows, with Add Another Key and a Test button per key
Gemini is the one provider that takes several keys; the client rotates between them.

A free Google AI Studio key allows a lot of requests, but two things stop it: the quota of each key and a model that is temporarily overloaded. Key rotation handles the first, and the model list handles the second.

Getting a key

Go to aistudio.google.com, sign in with a Google account and choose Get API key → Create API key. If you already have a Google Cloud project you can attach it to that one; otherwise AI Studio creates a free project for you. The key is shown once in plaintext.

No billing setup is needed for free-tier use. Exceeding the free quota returns rate-limited responses rather than a surprise invoice - Gemini only charges once you have explicitly enabled the paid tier on the backing project. Google publishes the current limits at ai.google.dev/pricing; the limits change often, so check that page instead of numbers copied elsewhere.

Adding keys

Open Settings → API & Automation and find the Gemini block under AI Content Generation. Unlike the other providers, this is a list rather than a single field. Each row takes the key itself, an optional label so you can tell them apart later, and an enabled checkbox. + Add another key adds a row.

Keys are encrypted before they are stored, and an existing row shows only a masked hint - the plaintext is never printed back into the page. Leaving a row's input blank on save keeps whatever is already stored there, so you can relabel or disable a key without re-entering it.

Press Test before saving. It makes a real call and reports back on the key and the selected model together.

Why more than one key

When a request returns a quota or authorization error (429, 401 or 403), jekcms marks that key as unavailable for a while and retries at once with the next enabled key. The feature that made the request receives a normal result.

With free keys this matters on a working site. A bulk run can use up one key's daily allowance; with three keys you have three allowances, and jekcms switches between them on its own.

If a key starts failing, disable its row instead of deleting it. The key stays in the list with its label, and one checkbox turns it back on.

Choosing a model

The AI Integration card further down the same tab holds Gemini's model dropdown, grouped into three sets.

The latest generation group holds the current flash models, newest first, ending in a lightweight sibling for high-volume trivial work. The default is the newest flash model, gemini-3.8-flash, which gives the best price and performance in the current generation for blog-length text. Gemini Pro holds the higher-quality, slower option for complex rewrites. The automatic group holds Google's own moving aliases, which always resolve to whatever Google currently considers the latest flash or pro model.

Every entry in this list was probed against the live API. A model can be listed in Google's documentation and still answer 404, so jekcms only offers names that actually responded. If your saved model has been retired since, it stays visible in a custom group so you can see what to replace. jekcms also maps a few known retired names to their current equivalents, so an older install keeps working after an update.

Choose the model from the list instead of typing a name. The list is the same for the whole product, and a name outside it has not been tested.

The fallback chain

A busy model is a different problem from a used-up quota. When the newest flash model answers 503 with a "high demand" message (this happens often on free keys, sometimes on three models at once), another key would not help, because the key works. jekcms keeps the same key and tries these models in order: the one you selected, the stable flash model of the previous minor generation, Google's flash-latest alias, and finally the previous major generation.

You get the newest model when Google serves it and an answer from an older model when it does not, so a 503 does not reach the user. Only Gemini works this way; the other four providers call the model you selected and return its answer.

A 503 from the newest flash model does not mean that your key or your model choice is wrong, and you do not need to report it.

Models jekcms picks for itself

The model you choose is used for text. A few other jobs always use a specific Gemini model:

Cover images and images inside posts use the current flash image model, and a lighter version of it for quick passes. Audio versions of articles use the flash text-to-speech model. Short helper requests, such as the one-sentence description used to generate an image, use the lightweight model.

Search grounding (competitor research and other lookups that use Google Search) uses the flash model of the previous generation. On free keys the current generation answered 429 to every grounded request in our tests with eighteen keys, so the older model keeps these features working on a free key.

What the quota fields do

The daily quota, per-user quota, cache lifetime, temperature and maximum output token fields on the same card are limits set by jekcms and apply to every provider. They stop a faulty automation or a very busy author from using up your allowance. The remaining allowance for both counters is shown above the usage grid.

On a free key the cache lifetime saves the most: the same SEO analysis repeated within that time is answered from the cache and does not count against your Google quota.

When something goes wrong

API key not valid. This is usually a copy-paste problem, such as a space at the end or only part of the key. Re-copy from AI Studio and press Test.

Resource has been exhausted. The key hit a per-minute or per-day quota. Add a second key so rotation can cover it, wait for the reset, or enable the paid tier on the Google Cloud project behind the key.

Everything is slow but nothing fails. The model list is at work: requests are going to the older models while the newest one is busy. This passes on its own; you do not need to change a setting.

Alt text is too general. Alt text is written from the context of the image (the post title, the focus keyphrase, the sentence around the image and the file name); the model does not look at the picture. Up to twenty images are sent in one request. A more specific focus keyphrase on the post, or a stronger model, usually gives better results.

Be the first to know

New features, release notes and CMS guides. We send a couple of emails a month.