OpenAI Integration
jekcms supports five AI providers and uses one of them at a time. OpenAI is one of the two paid options, alongside Claude; Gemini, Groq and Cohere sit in the free-tier group. The provider you pick is used for every AI feature. There is no per-feature routing and no automatic switch to a second provider, so this page covers one choice and one field.

If cost is the deciding factor, read Gemini first. If output quality on complex rewrites matters most, OpenAI is a reasonable choice.
Getting a key
Sign in at platform.openai.com, open API keys and create a new secret key. Copy it immediately, because the dashboard shows it only once.
Add billing before you test anything. OpenAI's trial credit covers very little. Without billing, calls fail with a 429 error that looks like a rate limit, although the real cause is missing credit.
Adding it to jekcms
Go to Settings → API & Automation. The tab opens with two cards pointing at the REST API keys screen and the n8n templates. Those are for external tools that send requests to your site, and they are separate from the AI keys below them.
Under AI Content Generation, set the default provider to OpenAI, paste the key into the OpenAI API Key field and press Test before saving. The test makes a real call and shows whether the key, the billing and the chosen model work, so you find a problem before it breaks a batch.
The field is empty on every page load, even when a key is stored, because the key is never sent back to the browser. Leaving it blank on save keeps the existing key; you only need to type something when you are replacing it.
Choosing a model
Under the key field there is a model dropdown. jekcms keeps one registry of model names for every provider and this list is generated from it, so the list always shows the current generation, even if it changed after this page was written.
For OpenAI the registry offers the flagship, a pro-tier sibling, the balanced default, and the cheapest model for high-volume trivial work. The default is the balanced model, gpt-5.6-terra, which has the best price and performance of the newest generation for blog-length text. Almost every jekcms feature produces text of this length. Switch to the flagship for complex rewrites or technical explanations if you notice a difference in quality; switch to the cheapest model if you generate hundreds of short texts a day.
Pick a model from the list instead of typing a name. A model that is no longer available returns an error on every call, and jekcms shows this error as "generation failed", not as "your model does not exist".
Features that use the key
AI Draft (Content Studio → AI Draft) generates a single article from a topic and a writing style, then opens it in the editor as a draft, or publishes it directly if you turned on auto-publish. It is the cheapest way to test a provider and a prompt before larger runs.
In the post editor, the SEO panel runs a deep analysis of the draft and returns a score with per-check findings, the meta title and description buttons write both fields in one call inside Google's length limits, and the Brief tab turns an outline into section-by-section instructions for the writer. All three use the configured provider.
On the Posts screen, a bulk SEO analysis pass works through your archive in the background, one item per cron run, so it stays inside provider rate limits.
In the SEO Optimizer, 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), in batches of up to twenty images per request. This is a text call, so the model does not see the image. Without a provider key, the optimizer builds the alt text from the file name; it still works, but the results are weaker.
Trend Content uses the provider to turn raw search and trend data into usable long-tail topics with an angle and a search intent.
The social plugin writes platform-specific captions and video scripts through the same provider.
The key does not generate a planned batch on its own. Plan Many Posts creates the schedule; an n8n workflow with its own provider key writes the articles. See Bulk AI Generation.
Spend control
jekcms cannot see your OpenAI invoice, so it limits spending by limiting the number of calls. On the same tab, below the provider keys, the AI card carries a daily quota for the whole site over a rolling 24 hours, a per-user quota for a single admin or author account, and a cache lifetime so that the same SEO analysis run again within that time is served from cache at no cost. The remaining allowance of both counters is shown above the usage grid, so you can see it before a batch stops.
Two more fields change the calls themselves. Temperature controls how conservative the output is and applies to article generation as well as analysis. Maximum output tokens caps SEO analysis and assistant calls; article generation sets its own budget from the requested length and retries with a larger budget if the output was cut short, so this field does not control article length.
The usage grid below shows calls today, calls this week, how many were served from cache, how many errored, total tokens and average latency. There is no cost estimate, because jekcms does not know your pricing tier. Also set a hard spending limit in your OpenAI account; that limit is enforced by OpenAI itself.
Note that the model dropdown inside that AI card lists Gemini models, as the help text under it says. Those quota, temperature and token fields apply to every provider; the model that gets used is the one you chose under the OpenAI key above.
When something goes wrong
Rate limit exceeded. New OpenAI accounts get low per-minute caps. Wait out the cooldown shown in the message or raise your usage tier in the OpenAI dashboard. jekcms does not try to bypass this limit, because more retries against a rate limit make it worse.
Invalid API key. The key was rotated, revoked, or pasted with surrounding whitespace or quotes. Copy it again from the dashboard and press Test before saving.
Quota exhausted inside jekcms. The message names which counter ran out, site-wide or personal, and points at this settings tab. This limit is set in jekcms, not by OpenAI.
Generation returns nothing. The usual cause is a token budget that is too small for the requested output. Raise the maximum output tokens field; a budget that is too small to finish a response is the most common cause of an empty result without an error.