Features Pricing Reviews FAQ
Get Plugin

Connecting an AI Provider

5 min read

The AI Provider panel is where you connect xSpeed Cache Pro to an AI service. It is the foundation for every Pro AI feature. Once you set a provider and paste in an API key here, the other AI panels share the same connection.

What this does

xSpeed Cache Pro has features that ask an AI service for advice, such as Smart Image and Adaptive Cache. Those features do not each hold their own key. Instead they all call one shared AI connection, and this panel is where you set it up.

You choose which AI service to use, enter the key for that service, and optionally name a specific model. That is the whole configuration. Individual AI features keep their own on/off controls in their own panels.

Why use it

Keeping the connection in one place means you enter your key once. If you switch services later, you change it here and every AI feature follows. It also keeps a running count of how much the AI has been used, so there are no surprises.

Requirements

  • xSpeed Cache Pro must be active.
  • An account and API key with one of the supported services: OpenAI, Anthropic, Google Gemini, or OpenRouter.

Note: The AI features that use this connection also respect the AI Privacy setting from xSpeed Cache Free. Prompts built from visitor-derived data are blocked when data collection is not allowed. Prompts built only from site configuration or aggregated stats are allowed to pass that gate.

How to set it up

  1. In the xSpeed Cache dashboard, open the AI Provider panel.
  2. Under AI Provider, choose the service you have an account with.
  3. Paste your key into the matching API key field for that service.
  4. (Optional) Enter a Model name if you want a specific model instead of the service default. Leave it blank to use the default.
  5. Save your settings.
  6. Use the connection test in the panel to confirm the key works. A successful test reports which model it connected to.

Settings explained

SettingWhat it doesDefault
AI ProviderChooses which AI service powers every Pro AI feature. Options: OpenAI, Anthropic, Google Gemini, OpenRouter.OpenAI
OpenAI API KeyThe key used when the provider is set to OpenAI.Blank
Anthropic API KeyThe key used when the provider is set to Anthropic.Blank
Google Gemini API KeyThe key used when the provider is set to Google Gemini.Blank
OpenRouter API KeyThe key used when the provider is set to OpenRouter.Blank
ModelA specific model name to use. Leave blank to use the selected provider’s default model.Blank

AI Provider. Pick the service you already have billing with. OpenAI, Anthropic, and Google Gemini connect directly to that company. Gemini has a generous free tier. OpenRouter is a single key that can reach many models from different companies, using a vendor/model name such as openai/gpt-4o.

API key fields. There is a separate key field for each service. This is on purpose, so switching providers does not erase the key you saved for another one. Only the field matching your chosen provider is used. Keep these keys private and treat them like passwords.

Model. Leave this blank and each service uses its own current default. Enter a value only when you want a specific model. The dashboard offers a dropdown of current models per provider, and advanced users can type any model name the provider supports.

Note: Each provider has its own default model, so blank means “the newest default for whichever provider I picked.” When you use OpenRouter, the model name follows the vendor/model pattern.

How the shared connection behaves

A few things happen automatically whenever an AI feature uses this connection:

  • Response caching. Identical prompts are cached for 24 hours, so the same request is not billed twice within that window.
  • Usage accounting. The panel tracks total requests, cache hits, and tokens in and out, plus the time of the last call. You can clear these counters from the panel.
  • Privacy gate. Before sending a prompt built from visitor data, the connection checks the AI Privacy setting. If collection is not allowed, the request is blocked and nothing is sent.

Best practices

  • Set your provider and key before turning on features like Smart Image or Adaptive Cache. Those features need this connection to work.
  • Run the connection test after saving, so you catch a bad or expired key early.
  • Leave the Model field blank unless you have a reason to pin a specific model.
  • Review the usage counters now and then to keep an eye on how much AI is being used.

Troubleshooting

“AI provider not configured.” This means either no provider is selected or the key field for your chosen provider is empty. Select a provider and paste its key, then save.

The connection test fails. The most common cause is a wrong, expired, or revoked key. Confirm the key is correct for the provider you selected, and that the account is in good standing. The test reports the error message returned by the service.

An AI feature says it is blocked by the privacy gate. The feature tried to send visitor-derived data while AI data collection was not allowed. Review your AI Privacy setting. Features that only use site configuration or aggregated stats are not affected.

FAQ

Do I need a separate key for each AI feature? No. All Pro AI features share this one connection.

Can I switch providers later? Yes. Change the provider here and save. Because each provider has its own key field, your other keys stay in place.

Does the same prompt cost me twice? Not within 24 hours. Identical prompts are served from the cache during that window.

Which model is used if I leave Model blank? The current default model for whichever provider you selected.

  • AI Privacy and GDPR Mode
  • Smart Image AI
  • Adaptive Cache Intelligence
  • Performance Health