WP Manifestindependent plugin directory
manifest / ai / wp-openrouter-connector

OpenRouter Connector

A WordPress plugin that connects the WordPress Connectors API to [OpenRouter](https://openrouter.ai), enabling access to hundreds of AI models through a unified interface.

by benridane · github.com/benridane/wp-openrouter-connector

1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/benridane/wp-openrouter-connector/archive/refs/heads/main.zip

A WordPress plugin that connects the WordPress Connectors API to OpenRouter, enabling access to hundreds of AI models through a unified interface.

Note: A more official OpenRouter provider implementation for WordPress is being developed separately. This project is maintained at its current version (0.1.0) and will not receive further feature development.

Features

  • Registers OpenRouter as an AI provider through the WordPress 7.0+ Connectors API
  • Text generation via GPT-4o, Claude 3.5 Sonnet, Gemini 2.0 Flash, Llama 3, Mistral, and more
  • Image generation via Gemini multimodal models
  • Flexible API key configuration (environment variable, PHP constant, or admin UI)
  • Fallback settings page for WordPress versions without the Connectors API

Requirements

Installation

  1. Upload the openrouter-connector directory to /wp-content/plugins/
  2. Activate the plugin through the Plugins screen
  3. Go to Settings > Connectors (or Settings > OpenRouter if the Connectors API is not available)
  4. Enter your OpenRouter API key

API Key Configuration

The API key is resolved in the following priority order:

  1. Environment variable -- OPENROUTER_API_KEY
  2. PHP constant -- define( 'OPENROUTER_API_KEY', 'sk-or-...' ); in wp-config.php
  3. Database option -- set via the admin settings page

Supported Models

Text Generation

Model ID Name
openai/gpt-4o GPT-4o
openai/gpt-4o-mini GPT-4o Mini
anthropic/claude-3.5-sonnet Claude 3.5 Sonnet
google/gemini-2.0-flash Gemini 2.0 Flash
meta-llama/llama-3-8b-instruct Llama 3 8B Instruct
mistralai/mistral-7b-instruct Mistral 7B Instruct

Image Generation (Multimodal)

Model ID Name
gemini-2.5-flash-image Gemini 2.5 Flash Image
gemini-3.1-flash-image-preview Gemini 3.1 Flash Image Preview

See openrouter.ai/models for the full catalog of models available through OpenRouter.

License

GPL-2.0-or-later. See LICENSE for details.

Author

benridane