OpenAI API Setup for Form AI (Divi 5)
Before using Form AI in Divi Form Builder, you need an OpenAI API key and usage limits. If you already have a key, go to Step 3.
Prerequisites
Before setup, confirm:
- You can access your OpenAI account.
- Billing is enabled for API usage.
- Your WordPress site can save Divi Form Builder settings.
Step 1 - Obtaining an OpenAI API key
- Go to OpenAI's platform.
- Create an account or log in (email/password or Google/Microsoft).
- Click your name (top-right) -> View API keys.
- Click Create new secret key and copy the key immediately; you cannot view it again.
warning
Store your key in a secure password manager. Do not share it in support screenshots or chat messages.
Step 2 - Setting monthly usage limits (OpenAI)
- In your OpenAI account, go to Manage Account -> Billing -> Usage Limits.
- Set a Hard limit (max monthly usage; requests stop when reached).
- Set a Soft limit (you get an email when usage hits this).
- Save your changes.
Step 3 - Adding your API key to Divi Form Builder
- In WordPress admin, go to Divi Form Builder Settings (or Divi Engine -> Form Builder Settings) -> Form AI -> OpenAI Settings.
- Paste your API key into the input.
- Select the OpenAI Model you have access to.
- Save, then use the Test option to verify the key and model.
Using more models
To use a model not in the dropdown:
- In OpenAI Model Selection, choose Define Custom Model below.
- Enter the model name in Custom model name (see OpenAI pricing; use a model that supports text in/out).
- Set the API Endpoint (for example,
/chat/completionsfor most models; see OpenAI models).
note
Not all API keys have access to every model. If you do not have GPT-4 access, you may be limited to GPT-3.
Verify your setup
Run a quick test and confirm all of the following:
- The test request succeeds without authentication errors.
- The selected model returns output.
- Response time is acceptable for your form experience.
- No billing-limit warning appears during your test run.
Common failure scenarios
- Authentication failed / invalid key: paste the full key again and save.
- Model not available: switch to a model your account can access.
- No response after working previously: check whether your hard limit was reached.
- Request timeout: test with a shorter prompt or a faster model.
What's Next
- Form AI - Start Here - apply your API setup to a real AI field.
- Form settings - configure submission behavior after AI generation.
- Spam protection - reduce abusive submissions on AI-enabled forms.