BACK TO DIRECTORY

rtCamp’s AI Provider for OpenRouter

by rtCamp

0.0
(0 ratings)

rtCamp’s AI Provider for OpenRouter registers OpenRouter as an AI provider for the WordPress AI Client. It enables WordPress to access hundreds of AI models for text and image generation (including OpenAI GPT, Anthropic Claude, Google Gemini, and open-source models) through a single unified API and API key.

Requirements:

  • WordPress AI Client: This plugin requires the WordPress AI Client (ai) plugin (or core AI Client features in WordPress 7.0+) to be installed and active.
  • OpenRouter Account & API Key: An API key from OpenRouter is required to connect to models.

Features:

  • OpenRouter provider registration for the WordPress AI Client.
  • Configure different default models for text and image generation.
  • Model selection displays live pricing (cost per 1M tokens or per image generation).
  • Text generation using OpenRouter’s chat completions endpoint, supporting all chat modalities.
  • Image generation using OpenRouter’s chat completions image modality.
  • Autocomplete model selection dynamically populated from OpenRouter’s model catalog.

Developer Filters:

  • rtcamps_ai_provider_for_openrouter_text_generation_params: Filter the request parameters before dispatching text generation requests to OpenRouter.
  • rtcamps_ai_provider_for_openrouter_image_generation_params: Filter the request parameters before dispatching image generation requests to OpenRouter.

External services

This plugin connects to third-party services provided by OpenRouter, Inc. to retrieve available AI model listings and process AI generation requests.

  • Model Catalog Discovery:
    • What it is used for: Fetching available text and image models and their pricing metadata for the settings screen.
    • What data is sent and when: An HTTP GET request is sent to OpenRouter (https://openrouter.ai/api/v1/models) when an administrator visits the OpenRouter Settings page or queries the plugin’s REST API endpoints (/wp-json/ai-openrouter/v1/models and /wp-json/ai-openrouter/v1/image-models). No personal data, site data, or API keys are transmitted during this request. Retrieved models are cached locally in WordPress transients.
  • Content & Image Generation:
    • What it is used for: Generating text completions and images requested through the WordPress AI Client.
    • What data is sent and when: Prompts, context text/inputs, and the configured OpenRouter API key (sent in the HTTP Authorization header) are sent via HTTPS POST to OpenRouter (https://openrouter.ai/api/v1/chat/completions) only when a user explicitly initiates an AI generation action.

This service is provided by OpenRouter, Inc.

Source Code

The source code is available on GitHub.

Screenshots

Connector settings page showing OpenRouter API key configuration.

Connector settings page showing OpenRouter API key configuration.

OpenRouter settings page showing model selection and cost information.

OpenRouter settings page showing model selection and cost information.

Example of generating post excerpt using OpenRouter in the WordPress editor.

Example of generating post excerpt using OpenRouter in the WordPress editor.

Example of generating an image using OpenRouter in the WordPress editor.

Example of generating an image using OpenRouter in the WordPress editor.

Plugin Details

Active Installs
0
Total Downloads
317
Version
1.1.1
Requires WP
7.0
Requires PHP
7.4
Tested Up To
7.1.4
Added
2026-09-30
Last Updated
2026-09-30 11:07am GMT

Ratings

5
0
4
0
3
0
2
0
1
0