Configure the AI provider, model, and automatic schema generation β using your own OpenAI, Anthropic (Claude), or Google Gemini API key.
Navigation Path
| WordPress Admin β SchemaEngine AI β Settings β AI Settings |
π€ Bring Your Own AI API Key #
SchemaEngine AI connects directly to your own AI provider account. You choose the provider, supply the API key, and billing goes straight to your account β no markup, no intermediary. Your post content is sent only to the provider you select, never to SchemaEngine AI servers.
Three providers are supported: OpenAI, Anthropic (Claude), and Google Gemini. This page has two sections: β General AI Settings (behaviour controls) and β‘ API Configuration (provider, key, model).

Sections on This Page
15.1. General AI Settings
15.2. API Configuration
15.3. How to Enable Auto-Generation (Full Workflow)
15.4. Reset & Re-run Auto-Generation
15.5. Server & Cron Requirements
15.6. Supported Providers & Models
| β | General AI Settings Master toggle Β· confidence threshold Β· FAQ count Β· auto-generation |
15.1 General AI Settings #
These settings govern how the AI behaves when generating schema automatically. They affect both the manual generation panel in the block editor (Step 14) and the background auto-generation triggered on post publish.
| Field | Description |
|---|---|
| Enable AI | Master toggle β must be ON for any AI generation to work. Default: OFF. When ON, the AI generation panel in the Gutenberg editor becomes active. When OFF, all AI features are disabled site-wide regardless of other settings. |
| Confidence Threshold | Numeric value 0β100. If the AI’s confidence in the generated schema falls below this number, it falls back to a generic WebPage schema instead. Default: 60. Raise this value (e.g. 80) to enforce stricter quality; lower it to accept more uncertain outputs. |
| FAQ Count | How many FAQ question-and-answer pairs to generate when auto-generating schema for FAQPage content or when no FAQ block exists on the post. Default: 8. This setting applies to automatic generation β the Number of FAQs stepper in the block editor panel (Step 14) overrides this for manual generation. |
| Auto-Generate | Toggle β when ON, SchemaEngine AI automatically generates schema using AI for every eligible post based on Post Type Mapping and Site Info settings. Each publish or update triggers a background API call to your AI provider. Default: OFF. See Section 15.3 for the full activation workflow. |
| Reset Auto-Generation | A link that appears below Auto-Generate when it is ON: “Reset & Re-run Auto-Generation”. Clicking this clears the completion flag on all posts and queues them for fresh schema generation. See Section 15.4 for full details. |
| Field | Validation | Note |
|---|---|---|
| Enable AI | β Optional | Default OFF. All AI features are inactive when OFF. No error displayed β features simply do not work. |
| Confidence Threshold | β Optional | Default: 60. Range 0β100. Start at 60, observe output quality, then adjust. |
| FAQ Count | β Optional | Default: 8. Changed from 5 in v3.0.0. Applies to auto-generation only. |
| Auto-Generate | β Optional | Default OFF. Requires WP Cron (or server cron) to be running β see Section 15.5. |
| β‘ | API Configuration Provider Β· API key Β· model selection Β· max tokens |
15.2 API Configuration #
Select your AI provider and enter the credentials required to authenticate. The fields shown below the API Provider dropdown change dynamically to match the selected provider.
| Field | Description |
|---|---|
| API Provider | Dropdown β choose which AI service handles schema generation. Options: OpenAI, Anthropic (Claude), Google Gemini. The screenshot shows Anthropic (Claude) selected. Default: OpenAI. |
| API Key | Your secret key from the selected provider. The field shown changes label depending on the provider selected (e.g. “Anthropic API Key”, “OpenAI API Key”, “Gemini API Key”). The eye icon toggles key visibility. Stored in your WordPress database β transmitted only to your chosen AI provider. |
| Model | Dropdown β select the AI model for schema generation. Options are specific to the selected provider. The screenshot shows “Claude Sonnet 4.6” selected for Anthropic. Default: GPT-4.1 for OpenAI, Claude Sonnet 4.6 for Anthropic. |
| Max Tokens | Maximum tokens the AI can use per response. Default: 4096. Higher values produce more detailed schema but cost more per API call. Do not reduce below 2048 β very low values cause the AI to truncate the schema output. For most posts 4096 is sufficient. |
| Field | Validation | Note |
|---|---|---|
| API Provider | β Error (required) | A provider must be selected for AI generation to initialise. |
| API Key | β Error (required) | Required. An invalid or expired key causes a generation error. |
| Model | β Warning (recommended) | Select explicitly for predictable output quality. Leaving blank defaults to the provider’s current default model. |
| Max Tokens | β Optional | Default: 4096. Only increase above 4096 for very long or complex posts with many schema types. |
15.3 How to Enable Auto-Generation (Full Workflow) #
Auto-Generate is the most powerful AI Settings feature β once properly configured, it generates schema for every eligible post automatically without any manual action. Follow these steps in order.
| β οΈ Complete all prerequisites before enabling Auto-Generate Enabling Auto-Generate without completing the steps below will result in incomplete or incorrect schema generation. Take each step in sequence. |
| 1 | Configure Post Type Mapping Navigate to Settings β Schema β Post Type Mapping (Step 4). For every post type you want AI to generate schema for, ensure: (a) a Schema Type is selected β not left empty, and (b) the Auto-Generate toggle for that post type is ON. Why this matters: The AI uses the Schema Type setting to determine what type of JSON-LD to generate for each post type. If Schema Type is not set, the AI has no instruction on what markup to produce. |
| 2 | Complete Site Info Ensure Settings β Schema β Site Info (Step 2) is fully filled in β especially Name, Logo, Address, and Telephone for LocalBusiness setups. The AI uses Site Info data to populate Organisation, WebSite, and BreadcrumbList schema properties. |
| 3 | Configure AI Settings β enable and save In Settings β AI Settings: (1) Set Enable AI to ON. (2) Select your API Provider. (3) Enter your API Key. (4) Select a Model. (5) Set Auto-Generate to ON. (6) Click Save Change. Do not click Reset yet. |
| 4 | Verify WP Cron is running Auto-generation is processed via WordPress Cron (WP-Cron) in the background. Before clicking Reset, confirm cron is working on your server. See Section 15.5 for how to check and configure cron. |
| 5 | Click Reset & Re-run Auto-Generation Once everything above is confirmed, click the “Reset & Re-run Auto-Generation” link that appears below the Auto-Generate toggle. This clears any existing completion flags and queues all eligible posts for AI schema generation. The process runs in the background β see Section 15.4 for details. |
| π‘ New posts generate automatically after this point Once Auto-Generate is ON and Reset has been run, any new post published or updated on an eligible post type will automatically receive AI-generated schema β no further manual action needed. |
15.4 Reset & Re-run Auto-Generation #
The “Reset & Re-run Auto-Generation” link is a critical tool for triggering bulk AI schema generation across all existing posts. It only appears when Auto-Generate is set to ON.
π Reset & Re-run Auto-Generation #
Plugin description: “Click to clear the completion flag and re-run auto-generation for all posts.”
What it does:
- Clears the “schema already generated” completion flag on every eligible post.
- Queues all eligible posts for fresh AI schema generation via WP-Cron.
- Generation runs in the background β posts are processed in batches to avoid server timeouts.
- Existing manually overridden schemas (Override toggle ON) are not overwritten.
- Each post is processed one at a time through the cron queue
When to use Reset & Re-run
| Scenario | Action recommended |
|---|---|
| First-time setup β generate schema for all existing posts | Click Reset after fully configuring AI Settings and verifying cron is running |
| Switched AI provider or model | Click Reset to regenerate all post schemas using the new provider/model |
| Updated Site Info data significantly | Click Reset to regenerate schemas that reference Site Info (Organisation, WebSite, etc.) |
| Schema Type Mapping changed for a post type | Click Reset to regenerate schema under the new type for all affected posts |
| Some posts missed during initial generation | Click Reset to catch any posts the cron may have skipped |
| Schema looks stale or incorrect site-wide | Click Reset to force a full re-generation pass |
| β οΈ Reset triggers one API call per post β check your usage limits Clicking Reset on a site with 500 posts will queue 500 API calls to your AI provider. Each call incurs usage costs. On large sites, monitor your provider’s usage dashboard after clicking Reset. Consider running Reset during off-peak hours to spread the load. |
15.5 Server & Cron Requirements #
Auto-Generate relies on WordPress Cron (WP-Cron) to process schema generation in the background. If WP-Cron is not running correctly, auto-generation will not work β even with all settings configured correctly.
β° What is WP-Cron? #
WordPress Cron (wp-cron.php) is a pseudo-cron system that runs scheduled tasks on your WordPress site. Unlike a true server cron job, WP-Cron is triggered by page visits β it runs when someone (visitor, bot, or admin) loads a page on your site.
Problem: On low-traffic sites or sites with DISABLE_CRON set to true in wp-config.php, WP-Cron may not fire reliably. If pages are not visited regularly, background jobs including AI schema generation may be delayed or never execute.
How to verify WP-Cron is working #
- Install and activate the WP Crontrol plugin (free from wordpress.org/plugins/wp-crontrol).
- Go to Tools β Cron Events in the WordPress admin.
- Look for SchemaEngine AI cron events in the list β they should be scheduled.
- Check that events are firing on schedule and not stuck with overdue timestamps.
Recommended: Use a Real Server Cron Job #
For reliable Auto-Generation on any site β especially low-traffic or high-post-count sites β disable WP-Cron and replace it with a real server-level cron job. This is the most reliable configuration.
| π₯οΈ Setting Up a Real Server Cron Job Step 1 β Disable WP-Cron. Add this line to your wp-config.php file (before the line that says “That’s all, stop editing”): define(‘DISABLE_WP_CRON’, true); Step 2 β Add a server cron job. Log in to your server via SSH or cPanel β Cron Jobs, and add a cron job that runs every minute: */1 * * * * wget -q -O – https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 Replace yourdomain.com with your actual domain. This ensures cron tasks run every minute reliably, regardless of site traffic. |
PHP Execution Time
Each AI API call may take 5β15 seconds depending on post length and the AI provider. Ensure your server’s PHP max_execution_time is set to at least 120 seconds to prevent schema generation from timing out mid-process. Check this in your php.ini or ask your hosting provider.
| Server requirement | Recommended value |
|---|---|
| PHP max_execution_time | 120 seconds or higher (default is often 30β60s) |
| PHP memory_limit | 256M or higher |
| WP-Cron or server cron | Must be running every minute for reliable generation |
| HTTPS | Required β AI provider APIs reject plain HTTP connections |
| Outbound HTTP requests | Server must allow outbound HTTPS connections to api.openai.com, api.anthropic.com, or generativelanguage.googleapis.com |
15.6 Supported Providers & Models #
Three AI providers are supported. Each requires a separate account and API key. You can switch providers at any time β simply select the new provider, enter its API key, and save.
π’ OpenAI #
Industry-standard β the most widely tested provider for structured data generation.
Available models: GPT-4.1 (Recommended), GPT-4o, GPT-4o mini, GPT-3.5 Turbo
Get your API key: platform.openai.com/api-keys
- Sign in at platform.openai.com
- API keys β Create new secret key β name it (e.g. SchemaEngine AI)
- Copy immediately β shown only once
- Ensure billing is enabled with sufficient credits
π Anthropic (Claude) #
Advanced reasoning β excels at structured, precise data extraction. Shown in the screenshot.
Available models: claude-sonnet-4-6 (shown in screenshot, Recommended), claude-opus-4, claude-haiku-4
Get your API key: console.anthropic.com/settings/keys
- Sign in at console.anthropic.com
- Settings β API Keys β Create Key
- Copy immediately β shown only once
- Ensure billing is configured with available credits
- Select Anthropic (Claude) in the API Provider dropdown and paste the key
β Note: Anthropic API keys begin with “sk-ant-“. Verify your key starts with this prefix.
π΅ Google Gemini #
Google’s multimodal AI β strong contextual understanding, free tier available for testing.
Available models: gemini-2.5-pro (Recommended), gemini-2.5-flash, gemini-2.0-flash
Get your API key: aistudio.google.com/apikey
- Sign in with your Google account at aistudio.google.com
- Click “Get API key” β Create API key
- Copy the key and select Google Gemini as the API Provider in SchemaEngine AI
Model Comparison #
| Provider | Model | Schema Quality | Speed | Best For |
|---|---|---|---|---|
| OpenAI | gpt-4.1 | β β β β β | Fast | Best overall β recommended starting point |
| OpenAI | gpt-4o | β β β β β | Fast | Multimodal β handles image-rich posts |
| OpenAI | gpt-4o-mini | β β β β | Fastest | Budget option β simple posts |
| OpenAI | gpt-3.5-turbo | β β β | Fastest | Lowest cost β high volume bulk generation |
| Anthropic | claude-sonnet-4-6 | β β β β β | Fast | Shown in screenshot β highly recommended |
| Anthropic | claude-haiku-4 | β β β β | Fastest | Fast and cost-effective |
| Anthropic | claude-opus-4 | β β β β β | Moderate | Complex / long-form content |
| Gemini | gemini-2.5-pro | β β β β β | Moderate | Best Gemini model |
| Gemini | gemini-2.5-flash | β β β β | Fast | Speed + quality balance |
| Gemini | gemini-2.0-flash | β β β | Fastest | Free tier β ideal for testing |
| π‘ Security β API key best practices Create a dedicated API key specifically for SchemaEngine AI at your provider dashboard. This lets you revoke it independently if needed. Set usage limits or spending caps at your provider to prevent unexpected billing if the key is ever compromised. Never include your API key in publicly accessible files or version control. |
πΎ Save Changes
After updating any field on this page, click the Save Change button in the bottom-right corner. Both General AI Settings and API Configuration are saved together in a single action. Always save before clicking Reset & Re-run Auto-Generation.