AI Provider for Venice
Allows Venice API to be used with Wordpress AI plugin by Wordpress.
by AI Provider for Venice Contributors · github.com/pdbinder/ai-provider-for-venice · website
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/pdbinder/ai-provider-for-venice/archive/refs/heads/main.zipReadme
AI Provider for Venice
An AI Provider for Venice for the PHP AI Client SDK. Works as both a Composer package and a WordPress plugin.
Venice provides private, uncensored AI inference through an OpenAI-compatible API. This provider gives WordPress access to Venice's text generation models (aligned with Venice trait defaults, including Venice Uncensored) and image generation models.
Requirements
- PHP 7.4 or higher
- When using with WordPress, requires WordPress 6.9 or higher
- If using WordPress 6.9, the wordpress/php-ai-client package must be installed
- WordPress 7.0 and above include the AI Client — no additional package is required
- A Venice API key, obtainable at venice.ai/settings/api
Installation
As a Composer Package
composer require wordpress/ai-provider-for-venice
As a WordPress Plugin
- Download the plugin files
- Upload to
/wp-content/plugins/ai-provider-for-venice/ - Activate the plugin through the WordPress admin
- Go to Settings > Connectors — the Venice connector appears automatically — and enter your Venice API key
- Optionally choose preferred models under Settings > Venice AI Models
Configuration
The provider resolves its API key in the following order:
- The
VENICE_API_KEYenvironment variable - The
VENICE_API_KEYPHP constant - The Venice connector setting stored in the database (via Settings > Connectors)
The key is validated against Venice's authenticated API when it is saved in the connector settings, so an invalid key is reported immediately rather than at generation time.
// Option 1: environment variable
putenv('VENICE_API_KEY=your-api-key');
// Option 2: PHP constant (e.g. in wp-config.php)
define('VENICE_API_KEY', 'your-api-key');
Model preferences
WordPress AI features auto-select the first suitable Venice model. By default that preference order follows Venice /models/traits (general text, vision, code, reasoning) and image trait defaults.
Administrators can override the preferred models under Settings > Venice AI Models:
- Default text model
- Default vision model
- Default image model
Generated images hide the Venice watermark by default. Enable Show the Venice watermark on generated images on that same settings page if you want it left on.
Leave a field on Automatic to keep Venice’s recommended curated order.
Connector Approval (WordPress AI plugin)
If the WordPress AI plugin’s Connector Approval experiment is enabled, plugins must be approved before they can use a connector’s API key. This provider auto-approves itself for the Venice connector. Other plugins (including the main AI plugin) still need approval under Tools > Connector Approvals before they can call Venice.
If Connectors rejects a valid key with a message about the connector “not been approved for use”, update to 1.0.7+, or manually approve AI Provider for Venice for Venice in Connector Approvals, then save the key again.
Usage
With WordPress
The provider automatically registers itself with the PHP AI Client on the init hook. Simply ensure the plugin is active and the API key is configured:
use WordPress\AiClient\AiClient;
$result = AiClient::prompt('Hello, world!')
->usingProvider('venice')
->generateTextResult();
echo $result->toText();
As a Standalone Package
use WordPress\AiClient\AiClient;
use WordPress\VeniceAiProvider\Provider\VeniceProvider;
// Register the provider
$registry = AiClient::defaultRegistry();
$registry->registerProvider(VeniceProvider::class);
// Set your API key
putenv('VENICE_API_KEY=your-api-key');
// Generate text
$result = AiClient::prompt('Explain quantum computing')
->usingProvider('venice')
->generateTextResult();
echo $result->toText();
Supported Models
Available models are dynamically discovered from the Venice API and restricted to a curated, preference-ordered set aligned with Venice trait defaults. Image generation uses Venice's native Image Generate API and supports up to 4 variants per request. This includes GLM, Qwen (vision/code/reasoning), Venice Uncensored, and other leading text models (Kimi, Grok, Claude, GPT, Gemini, DeepSeek, Mistral, Llama) as well as image generation models (Z-Image Turbo, Qwen Image, Venice SD35, Flux, GPT Image, Nano Banana, Seedream, Krea). Per-model capabilities (vision, function calling, JSON schema output, web search) are read from the live Venice model data. End-to-end encrypted (e2ee-*) models are not included, as they require client-side encryption. See the Venice documentation for details on the available models.
License
GPL-2.0-or-later