Skip to main content
Version: Divi 5

Form AI settings

Overview

Form AI settings are global controls for AI-powered behavior in Divi Form Builder. You can configure your OpenAI connection, choose the model and endpoint, define a reusable prompt template, and monitor estimated usage cost.

Where to find these settings

  1. In WordPress admin, go to Divi Engine -> Form Builder Settings.
  2. Open Settings.
  3. Select Form AI.
  4. Use the two tabs:
    • API Usage
    • OpenAI Settings

OpenAI settings reference

OpenAI API Key

  • Enter your OpenAI API key.
  • This key is required before model-related options are meaningful.

Test API Key button

  • Button states:
    • Testing...
    • Success! ...
    • Failed! ...
  • Expected behavior: The button sends a live validation request using your current API key, model selection, and endpoint selection.
  • Before testing: Make sure the key is complete and current.

OpenAI Model Selection

  • Select the model used for AI requests.
  • For standard setups, choose one of the provided OpenAI models.
  • If you choose a custom model option, fill Custom model name.

Custom model name

  • Used when your model selection is set to the custom model option.
  • Enter the exact model identifier from your OpenAI provider.

API Endpoint

  • Choose the endpoint type:
    • Chat (/chat/completions) - default for most current models.
    • Completions (/completions) - for older compatibility use cases.

Prompt Template

  • Defines the reusable base prompt structure used in AI output contexts.
  • Keep prompts specific and consistent to improve output quality.

API usage settings reference

Enable Spend Limit Notifications

  • Enables email alerts as estimated usage approaches your configured OpenAI spend limit.
  • Notification thresholds: approximately 80%, 90%, and 100%.

Spend Limit Email Notification Recipient Email Address

  • Appears after enabling spend notifications.
  • Set the inbox that should receive usage-threshold alerts.

Usage Statistics

  • Displays per-form usage data, including:
    • Prompt tokens
    • Response tokens
    • Spend limit
    • Estimated spend
  • Includes a Reset Stats action per form.
  • Use this table as an operational estimate, then verify billing details in your OpenAI dashboard.

Important compatibility note

  • Form AI features require PHP 8.1 or higher.
  • If your server runs an older version, you will see a warning and Form AI behavior will be limited.

Verify your configuration

  1. Save settings.
  2. Click Test API Key and confirm a success message.
  3. Run one AI-enabled form submission.
  4. Confirm usage statistics update for that form.
  5. If spend notifications are enabled, confirm the recipient email is correct.

Common issues

  • Test API Key fails: Check key validity, model name, and endpoint choice.
  • No usage statistics shown: Submit at least one AI-enabled form first.
  • Unexpected cost numbers: Treat plugin values as estimates and verify in OpenAI billing.
  • No spend notification emails: Confirm notification toggle is enabled and recipient email is valid.

What's Next