How to Connect OpenRouter to WordPress AI

How to Connect OpenRouter to WordPress AI

OpenRouter is a popular AI service because it provides access to various AI models through a single API Key. There are even several free models available that can be used for testing or light usage.

If you want to use OpenRouter with the built-in AI features in WordPress 7.0, you cannot directly enter your OpenRouter API Key into WordPress AI.

To connect it, you can use the plugin Koneek as an OpenAI-Compatible Provider so that WordPress can communicate with OpenRouter without any issues.

Preparation Before Connecting OpenRouter to WordPress AI

Before you begin, you need to prepare the following:

  • WordPress 7.0 or higher
  • Install and activate the plugin AI and Koneek
  • OpenRouter API Key
  • The name of the OpenRouter model you will use

How to Connect OpenRouter to WordPress AI

If you do not have an OpenRouter API Key yet, you can create one first, as this article will also cover how to create an OpenRouter API Key.

1. Create an OpenRouter Account

To create an OpenRouter account, you can visit openrouter.ai and register with your email and password, or you can use Google or GitHub.

Cara Menghubungkan OpenRouter ke WordPress AI - WPGan.com - 1

2. Create an API Key

Once you have successfully created an account, you can create an API Key from the page Workspace > API Keys, or you can go directly to this page.

Next, you can click the button New Key to create a new API Key.

Cara Menghubungkan OpenRouter ke WordPress AI - WPGan.com - 2

Copy the API Key you receive, as the key cannot be viewed again if it is not saved.

3. Select an AI Model in OpenRouter

Now you can choose the model you want to use for WordPress. You can view the models on the page Models.

Cara Menghubungkan OpenRouter ke WordPress AI - WPGan.com - 3

If you want to use a free model, you can search for models with the keyword free, then open the model you want to use and you can copy the model name to be used. For example openai/gpt-oss-120b:free.

4. Connect OpenRouter to WordPress

Since you have already obtained the model and API Key to be used, you can now connect OpenRouter to WordPress using the plugin Koneek.

If the plugin Koneek is already installed, you can open the menu Settings > Koneek in your WordPress dashboard.

Cara Menghubungkan OpenRouter ke WordPress AI - WPGan.com - 4-1

Fill in the OpenRouter configuration details as follows:

  • Name: enter the name of the API you want to save
  • Provider: Select the OpenAI-Compatible option
  • API Key: Enter the API Key you obtained from OpenRouter
  • Model: Enter the name of the model you will use. For example openai/gpt-oss-120b:free
  • API URL: Use the OpenRouter Base URL, https://openrouter.ai/api/v1
  • Timeout: You can leave this blank to use the default timeout.
Cara Menghubungkan OpenRouter ke WordPress AI - WPGan.com - 4-2

Make sure to run a test connection before saving the AI data to ensure the details you entered can connect to OpenRouter.

5. Configure the AI Features to Enable

Now you can enable the AI features you want to use from the menu Settings > AI. To enable this, make sure you have activated the plugin AI.

Cara Menghubungkan OpenRouter ke WordPress AI - WPGan.com - 5

6. Use AI in WordPress

After enabling the AI features, you can use them, for example, to rewrite sentences, rephrase posts in WordPress, regenerate titles, and more.

Cara Menghubungkan OpenRouter ke WordPress AI - WPGan.com - 6

That is the easy way to connect an OpenAI-Compatible API to WordPress AI that you can try using the plugin Koneek.

FAQ

Is OpenRouter Free?

Yes. OpenRouter provides several free models that can be used at no cost. However, there are also paid premium models available with higher capabilities.

Which OpenRouter Model Is Suitable for WordPress AI?

For general use such as writing, rephrasing, and brainstorming, free models are usually sufficient. However, for better quality, you can use premium models according to your needs.

Can I Use Other Providers Besides OpenRouter?

Yes. Koneek also supports various other OpenAI-Compatible services such as OmniRoute, LiteLLM, OpenWebUI, Ollama, and other AI gateways that provide OpenAI-compatible endpoints.

If you want to use a provider other than OpenRouter, also read How to Connect an OpenAI-Compatible API to WordPress AI.

Written by

Muhammad Khoirun Nasikin

I enjoy tinkering with WordPress, hosting, VPS, web development, and various small experiments related to websites. I have over 3 years of experience in the web hosting industry.

COMMENTS

Loading...