How to Get Your OpenAI API Key — Step by Step
Everything you need to connect WP SmartForm AI or WP LeadFlow AI to OpenAI and start scoring leads with real AI intelligence.
In this guide
Both WP SmartForm AI and WP LeadFlow AI use OpenAI’s API to score leads, write intelligent autoresponse emails, and power the AI chatbot. Setting it up takes about five minutes — here’s exactly how to do it.
Create an OpenAI account
Go to platform.openai.com and click Sign up. You can register with Google, Microsoft, or an email address.
If you already have a ChatGPT account, note that ChatGPT and the API are separate products with separate billing. Log in to platform.openai.com specifically — not chat.openai.com.
Add billing and credits
In the OpenAI platform, go to Settings → Billing and add a payment method. You can set up automatic top-ups or buy a fixed amount of credits upfront.
We recommend starting with a $5–$10 prepaid credit. With the gpt-4o-mini model (the default used by NordicDataTools plugins), each lead costs roughly $0.001–$0.003, so $5 covers thousands of form submissions.
Generate your API key
In the OpenAI platform, go to Dashboard → API keys (or click your profile → View API keys). Click Create new secret key.
Give it a descriptive name — for example “NordicDataTools – My Site”. This helps you identify it later if you have multiple sites or projects.
Your key will look something like this:
Enter the key in WordPress
In your WordPress admin, go to:
- WP SmartForm AI → Settings → OpenAI API Key
- or WP LeadFlow AI → Settings → OpenAI API Key
Paste the key and click Save Settings. The plugin will immediately verify the connection and show a green checkmark if everything is working.
Choose the right model
Under the OpenAI settings you can select which model to use. Here’s a quick guide:
| Model | Speed | Quality | Cost |
|---|---|---|---|
| gpt-4o-mini ⭐ recommended | Fast | Excellent | ~$0.001/lead |
| gpt-4o | Medium | Best | ~$0.01/lead |
| gpt-3.5-turbo | Very fast | Good | ~$0.0005/lead |
For most sites, gpt-4o-mini is the sweet spot — it’s fast, very capable, and costs almost nothing at typical contact form volumes.
Test that everything works
Submit a test message through your contact form — use a realistic message with some detail, like:
Then check WP SmartForm AI → Leads. Within a few seconds you should see:
- A lead record with a score above 50 (Warm or Hot)
- An AI-generated autoresponse email sent to the address you used
- An AI summary of the lead’s intent in the lead record
Common questions
Do I need a paid OpenAI account?
New accounts get a small free credit. Once that’s used, yes — you need to add a payment method. But costs are very low: a busy site with 500 form submissions per month would spend roughly $0.50–$1.50 on API calls.
Is my data sent to OpenAI?
Yes — the message content from the form submission is sent to OpenAI for analysis. OpenAI’s API does not use this data to train models by default (as of March 2024). Review OpenAI’s API data usage policies and update your privacy policy accordingly. The plugins include a GDPR-ready privacy text you can add to your site.
Can I use the same API key on multiple sites?
Yes — OpenAI API keys are not locked to a domain. However, all usage from all sites will be billed to the same account. If you want to track costs per site separately, create a separate API key for each site in your OpenAI dashboard.
What happens if my OpenAI credits run out?
The plugin falls back gracefully — form submissions are still captured and stored, lead scoring falls back to keyword-based rules, and autoresponse emails use the template fallback instead of AI-generated text. You won’t lose any leads.
The plugin shows “API key invalid” — what do I do?
Double-check that you copied the full key including the sk-proj- prefix, with no trailing spaces. Also verify your OpenAI account has active billing — a key from an account with no payment method or exhausted credits will return an authentication error.
Ready to get started?
Install WP SmartForm AI or WP LeadFlow AI, add your OpenAI key, and start converting more form submissions into qualified leads — today.
View all plugins Read the docs →