API Key Not Working? Fix a Failed Test Connection

API key not working? Test connection under ExactFind > Settings > Basic checks your saved settings for answers and indexing. When it fails, the message starts with Answers or Indexing, so you know which one to fix, followed by the reason.

Save your settings before you test. The test uses what's saved, not what's on the screen.

"No API key is set for this platform"

The platform chosen for answers or indexing has no key. Each platform needs its own key, so if you use Claude for answers and ChatGPT for indexing, you need both.

Check which key is in use

Under each platform's key, ExactFind shows In use: and where the key comes from, with its last few characters. Keys are used in this order:

  1. A constant in wp-config.php, such as EXACTFIND_API_KEY.
  2. An environment variable, such as ANTHROPIC_API_KEY.
  3. Settings > Connectors, if you've chosen it as the Key source. This option shows on WordPress 7.0 or later.
  4. The key saved in ExactFind's settings.

A key higher up the list always wins. If you've typed a new key into the settings but a constant or environment variable is set, the old key is still in use. Change or remove the one higher up.

The saved key can't be read

If you see "The saved [platform] API key can't be read, probably because the site's salts changed. Please enter it again.", your site's security salts in wp-config.php changed after the key was saved. This can happen after a migration or a security clean-up. Enter the key again and save.

Errors from your provider

Anything after "connection failed." comes from your AI provider. Common causes:

CauseWhat to check
The key is wrong or was deletedCreate a new key in your provider's console and paste it in full
No credit, or billing isn't set upAdd credit or a payment method. A Claude or ChatGPT chat subscription doesn't include API usage
A spending limit was reachedRaise the limit in your provider's console
The model isn't available to your accountChoose another model, or check your provider's access rules
The provider is having an outageCheck its status page and try again later

Your server can't reach the provider

If the message mentions a timeout, cURL, DNS or a refused connection, your server couldn't reach the provider at all. Some hosts and security plugins block outbound requests. Ask your host to allow HTTPS requests to your provider, and see Fix 403 Forbidden Errors From a WordPress Firewall.

OpenAI-compatible services

For an OpenAI-compatible service, also check:

  • Service base URL is the API address, usually ending in /v1, such as https://api.mistral.ai/v1. "Add the base URL in Settings." means it's empty.
  • The model ID is typed exactly as the service lists it. "Enter a model ID." means it's empty.
  • The model can call tools. ExactFind needs this to find articles, so the test asks the model to call a small tool. A model that can't fails with "This model can't call tools, which ExactFind needs. Choose a model that supports tool calling." Choose another model on the same service.

See Choose an AI Platform and Model for WordPress Search.

When it works

You'll see "Connection works for answers and indexing." If visitors still don't get answers, see Fix “Answers Aren't Available Right Now” Errors.

Was this helpful?

Still stuck?

Tell us what you were trying to do and what happened. We reply by email.