Skip to content
Front User Submit
Menu

Set up AI: provider and API key

Connect OpenAI, Anthropic Claude, Google Gemini, OpenRouter or any OpenAI compatible API, store the key in wp-config.php and test it.

Before any AI feature works, connect an AI provider. This page shows how. You need an API key from the provider (except for some local models).

Open the AI settings

Go to Front User Submit → Settings → ✨ AI. The status line on top shows:

  • “Not configured: add an API key below and save.” or
  • “Ready: OpenAI · gpt-5-mini” (provider and model in use).

1. Choose the provider

Provider Where to get a key Default model
OpenAI platform.openai.com/api-keys gpt-5-mini
Anthropic Claude console.anthropic.com/settings/keys claude-haiku-5-5
Google Gemini aistudio.google.com/app/apikey gemini-2.5-flash
OpenRouter / OpenAI compatible URL openrouter.ai/keys or your service openai/gpt-5-mini

Choose one in Provider. Only the fields for that provider are shown.

2. Add the API key

Paste the key in API key and click Save Changes.

  • After saving, the field is empty and shows “Saved key ••••abcd — leave empty to keep”. Leave it empty to keep the key.
  • Tick Remove key to delete a saved key.

Keep the key out of the database (wp-config.php)

You can define the key in wp-config.php instead. Then it is not stored in the database and not shown in wp-admin. Add one line above /* That's all, stop editing! */:

define('FUS_OPENAI_API_KEY', 'sk-...');
define('FUS_ANTHROPIC_API_KEY', 'sk-ant-...');
define('FUS_GEMINI_API_KEY', '...');
define('FUS_CUSTOM_AI_API_KEY', '...'); // OpenRouter / OpenAI compatible

When a constant is set, the settings page shows “FUS_OPENAI_API_KEY is defined in wp-config.php and used as the API key.” The constant wins over a key saved in the settings.

3. Choose the model (optional)

Model suggests common models of the provider. Leave it empty to use the default model from the table above. You can type any model name your provider offers.

Small, fast models (the defaults) are cheap and good enough for writing help.

OpenRouter, local models and other compatible APIs

Choose OpenRouter / OpenAI compatible URL and fill API base URL:

Service API base URL
OpenRouter https://openrouter.ai/api/v1
Ollama (local) http://localhost:11434/v1
LM Studio, Groq, Together and others the “OpenAI compatible” URL from their docs

For OpenRouter, models have a prefix, for example openai/gpt-5-mini or anthropic/claude-haiku-5-5. For Ollama use the local model name, for example llama3.1.

For this provider the API key is optional, because some local servers need none. The URL is required.

On multisite only network administrators can change the API base URL.

4. Test the connection

Click Test connection. It sends a short test request with the values you entered (also before saving).

  • Success: “Connected to OpenAI (gpt-5-mini). Do not forget to save the settings.”
  • Error: the provider’s error message, for example a wrong key or an unknown model.

Click Save Changes.

Next step

Turn on the writing assistant in your forms.

Last updated 2026-11-18