Title: AI Provider for OpenRouter
Author: Jonathan Bossenger
Published: <strong>2026 年 3 月 23 日</strong>
Last modified: 2026 年 3 月 23 日

---

搜索插件

![](https://ps.w.org/ai-provider-for-openrouter/assets/banner-772x250.png?rev=3489265)

![](https://ps.w.org/ai-provider-for-openrouter/assets/icon-256x256.png?rev=3489265)

# AI Provider for OpenRouter

 作者：[Jonathan Bossenger](https://profiles.wordpress.org/psykro/)

[下载](https://downloads.wordpress.org/plugin/ai-provider-for-openrouter.1.0.0.zip)

 * [详情](https://cn.wordpress.org/plugins/ai-provider-for-openrouter/#description)
 * [评价](https://cn.wordpress.org/plugins/ai-provider-for-openrouter/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/ai-provider-for-openrouter/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/ai-provider-for-openrouter/#developers)

 [支持](https://wordpress.org/support/plugin/ai-provider-for-openrouter/)

## 描述

This plugin provides OpenRouter integration for the PHP AI Client SDK. It enables
WordPress sites to use hundreds of AI models from various providers through OpenRouter’s
unified, OpenAI-compatible API.

### External services

This plugin connects to the [Open Router API](https://openrouter.ai/docs/) to generate
text using a wide range of AI models.

Using this plugin requires an OpenRouter API key, which can be obtained by creating
an account on the [OpenRouter](https://openrouter.ai/) website. Create an account
and generate an API key at https://openrouter.ai/settings/keys.

You can find the OpenRouter terms of service here: https://openrouter.ai/terms, 
and their privacy policy here: https://openrouter.ai/privacy.

**Features:**

 * Text generation with any OpenRouter-supported model
 * Automatic model discovery from the OpenRouter API
 * Automatic provider registration

Available models are dynamically discovered from the OpenRouter /models endpoint,
including models from OpenAI, Anthropic, Google, Meta, Mistral, and many more.

**Requirements:**

 * PHP 7.4 or higher
 * For WordPress 6.9, the [wordpress/php-ai-client](https://github.com/WordPress/php-ai-client)
   package must be installed
 * For WordPress 7.0 and above, no additional changes are required
 * OpenRouter API key

## 安装

 1. Upload the plugin files to `/wp-content/plugins/ai-provider-for-openrouter/`
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Configure your OpenRouter API key via the `OPENROUTER_API_KEY` environment variable
    or constant

## 常见问题

### How do I get an OpenRouter API key?

Visit [OpenRouter](https://openrouter.ai/) to create an account and generate an 
API key at https://openrouter.ai/settings/keys.

### Does this plugin work without the PHP AI Client?

No, this plugin requires the PHP AI Client plugin to be installed and activated.
It provides the OpenRouter-specific implementation that the PHP AI Client uses.

## 评价

![](https://secure.gravatar.com/avatar/96af4a89b18637ff0247b8c4a74ff77535afbaa93e14dbd4994485caa3fb6a53?
s=60&d=retro&r=g)

### 󠀁[Works 100s](https://wordpress.org/support/topic/works-100s/)󠁿

 [bradvin](https://profiles.wordpress.org/bradvin/) 2026 年 3 月 25 日 1 回复

Works exactly as I was hoping – nice work!

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/ai-provider-for-openrouter/reviews/)

## 贡献者及开发者

「AI Provider for OpenRouter」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Jonathan Bossenger ](https://profiles.wordpress.org/psykro/)

「AI Provider for OpenRouter」插件已被翻译至 5 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/ai-provider-for-openrouter/contributors)
为本插件所做的贡献。

[帮助将「AI Provider for OpenRouter」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/ai-provider-for-openrouter)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/ai-provider-for-openrouter/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/ai-provider-for-openrouter/)，或
通过[RSS](https://plugins.trac.wordpress.org/log/ai-provider-for-openrouter/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/ai-provider-for-openrouter/)。

## 更新日志

#### 1.0.0

 * Initial release
 * Support for text generation models via OpenRouter
 * Automatic model discovery from the OpenRouter API

## 额外信息

 *  版本 **1.0.0**
 *  最后更新：**8 月前**
 *  活跃安装数量 **400+**
 *  WordPress 版本 ** 6.9 或更高版本 **
 *  已测试的最高版本为 **7.0.8**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [Dutch](https://nl.wordpress.org/plugins/ai-provider-for-openrouter/) 、 [English (US)](https://wordpress.org/plugins/ai-provider-for-openrouter/)、
   [Nepali](https://ne.wordpress.org/plugins/ai-provider-for-openrouter/) 、 [Persian](https://fa.wordpress.org/plugins/ai-provider-for-openrouter/)、
   [Portuguese (Brazil)](https://br.wordpress.org/plugins/ai-provider-for-openrouter/)
   和 [Portuguese (Portugal)](https://pt.wordpress.org/plugins/ai-provider-for-openrouter/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/ai-provider-for-openrouter)
 * 标签
 * [AI](https://cn.wordpress.org/plugins/tags/ai/)[artificial intelligence](https://cn.wordpress.org/plugins/tags/artificial-intelligence/)
   [connector](https://cn.wordpress.org/plugins/tags/connector/)[openrouter](https://cn.wordpress.org/plugins/tags/openrouter/)
 *  [高级视图](https://cn.wordpress.org/plugins/ai-provider-for-openrouter/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/ai-provider-for-openrouter/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/ai-provider-for-openrouter/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/ai-provider-for-openrouter/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/ai-provider-for-openrouter/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/ai-provider-for-openrouter/reviews/?filter=1)

[您的评价](https://wordpress.org/support/plugin/ai-provider-for-openrouter/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/ai-provider-for-openrouter/reviews/)

## 贡献者

 *   [ Jonathan Bossenger ](https://profiles.wordpress.org/psykro/)

## 支持

最近两个月解决的问题：

     总计 1，已解决 0

 [查看支持论坛](https://wordpress.org/support/plugin/ai-provider-for-openrouter/)