=== PixelRouter — AI Gateway Compatible with OpenAI ===
Contributors: pixelofficeeu, denisssenkyr
Donate link: https://pixeloffice.eu/router.html
Tags: ai, openai, deepseek, claude, api-gateway
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sub-35ms AI gateway compatible with OpenAI APIs. Cut LLM token costs by 85% with BLUN-Auto, DeepSeek V3, Claude 3.5 Sonnet, and Qwen 2.5 Coder.

== Description ==

**PixelRouter** is a high-speed, European edge-routed AI gateway compatible with OpenAI APIs, designed for WordPress themes, plugins, automated content pipelines, and WooCommerce AI agents.

By routing your LLM traffic through PixelRouter's intelligent sub-35ms proxy, you cut LLM API expenses by up to **85%** while gaining access to top-tier models like **BLUN-Auto**, **DeepSeek V3**, **Claude 3.5 Sonnet**, and **Qwen 2.5 Coder**.

### Key Features
* **Compatibility with OpenAI SDK Endpoints**: Swap standard OpenAI endpoints to `https://api.pixeloffice.eu/v1` with zero refactoring.
* **Sub-35ms European Edge Latency**: High-speed Time-To-First-Token (TTFT) optimized for streaming.
* **85% Token Cost Reduction**: Automatic cost-efficiency routing.
* **Global PHP Helper**: Use `pixelrouter_chat()` in any WordPress theme or plugin.
* **Live Admin Diagnostic Panel**: Test model completions and benchmark latency directly in the WordPress dashboard.

== External Services ==

This plugin connects to external third-party services to provide sub-35ms API gateway completions and routing telemetry compatible with OpenAI endpoints.

1. **PixelRouter Edge Gateway API** (`https://api.pixeloffice.eu/v1/chat/completions`)
   * **What it does**: Processes chat completions compatible with OpenAI APIs and routes requests to high-speed LLM models.
   * **Data sent**: User prompt messages, model selector parameter, and optional PixelRouter API key.
   * **When it is sent**: When an AI completion is requested via the PHP helper or the admin diagnostic test.
   * **Service Provider**: Pixel Office EU (https://pixeloffice.eu)
   * **Terms of Service**: https://pixeloffice.eu/terms.html
   * **Privacy Policy**: https://pixeloffice.eu/privacy.html

== Installation ==

1. Upload the `pixelrouter-api-gateway-compatible-with-openai` folder to your `/wp-content/plugins/` directory.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Navigate to **Settings > PixelRouter AI** in your WordPress admin.
4. Enter your API key (default: `px_test_free` with 50 free trial requests).
5. Run the built-in diagnostic test to verify sub-35ms connectivity.

== Frequently Asked Questions ==

= How do I call PixelRouter in my custom code? =
```php
$response = pixelrouter_chat(array(
    array('role' => 'user', 'content' => 'Generate an SEO meta description for this page.')
), 'deepseek-chat');

$text = $response['choices'][0]['message']['content'];
```

= Where do I get an API key? =
You can start immediately with the pre-configured `px_test_free` trial key (50 free requests) or generate your own key at [pixeloffice.eu/router.html](https://pixeloffice.eu/router.html).

== Changelog ==

= 1.0.1 =
* Enqueued admin scripts via standard `admin_enqueue_scripts` and `wp_add_inline_script`.
* Updated plugin headers and naming for full trademark guidelines compliance.

= 1.0.0 =
* Initial release of PixelRouter Sub-35ms Gateway for WordPress.
