Title: AI Provider for Z.AI
Author: Huzaifa Al Mesbah
Published: <strong>19 ژوئن 2026</strong>
Last modified: 19 ژوئن 2026

---

جستجوی افزونه‌ها

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

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

# AI Provider for Z.AI

 توسط [Huzaifa Al Mesbah](https://profiles.wordpress.org/huzaifaalmesbah/)

[دانلود](https://downloads.wordpress.org/plugin/ai-provider-for-zai.1.0.0.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/ai-provider-for-zai/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/ai-provider-for-zai/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/ai-provider-for-zai/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/ai-provider-for-zai/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/ai-provider-for-zai/)

## توضیحات

This plugin provides Z.AI integration for the WP AI Client SDK. It enables WordPress
sites to use Z.AI GLM models for text generation and related AI capabilities.

**Features:**

 * Text generation with Z.AI GLM models (glm-4.5, glm-4.6, glm-4.7, glm-5, and more)
 * Chat history support
 * Function calling support
 * JSON output support
 * Automatic provider registration

Available models are dynamically discovered from the Z.AI API.

**Requirements:**

 * PHP 7.4 or higher
 * WP AI Client plugin must be installed and activated
 * Z.AI API key from z.ai

### Usage

The provider automatically registers itself on the `init` hook. Once both plugins
are active and your API key is configured, you can start generating text:

#### Basic Text Generation

    ```
    $text = AI_Client::prompt( 'Explain quantum computing.' )->using_provider( 'zai' )->generate_text();
    ```

#### With System Instructions

    ```
    $text = AI_Client::prompt( 'Summarize the history of WordPress.' )->using_provider( 'zai' )->using_system_instruction( 'Be concise and accurate.' )->using_temperature( 0.2 )->using_max_tokens( 500 )->generate_text();
    ```

#### JSON Output

    ```
    $json = AI_Client::prompt( 'Analyze this topic: WordPress plugins' )->using_provider( 'zai' )->as_json_response( $schema )->generate_text();<h3>External services</h3>
    ```

This plugin connects to the Z.AI API to provide AI-powered text generation capabilities
within WordPress. Z.AI is a third-party service.

#### What data is sent and when

 * **API key**: Your Z.AI API key is sent with every request for authentication.
 * **API type auto-detection**: When you save or change your API key, the plugin
   sends one minimal test request (a one-word prompt) to each Z.AI endpoint to determine
   which API type your key belongs to. This happens only at the moment the key is
   saved.
 * **Model listing**: When the plugin checks provider availability or lists available
   models, it sends a request to the Z.AI API to retrieve the current list of GLM
   models.
 * **Text generation prompts**: When your site uses the plugin to generate text,
   the prompt text (and any system instructions and conversation history) is sent
   to the Z.AI API for processing.

Communication is sent to the Z.AI API at one or both of the following base URLs (
the API-type auto-detection contacts both; all other requests use the detected one):

 * General API: [https://api.z.ai/api/paas/v4](https://api.z.ai/api/paas/v4)
 * Coding API: [https://api.z.ai/api/coding/paas/v4](https://api.z.ai/api/coding/paas/v4)

Data is only sent when the plugin is actively used to generate text or when checking
model availability. No data is sent passively or in the background.

#### Service links

 * Z.AI website: [https://z.ai](https://z.ai)
 * Z.AI Terms of Service: [https://z.ai/terms](https://z.ai/terms)
 * Z.AI Privacy Policy: [https://z.ai/privacy](https://z.ai/privacy)

## نصب

 1. Ensure the WP AI Client plugin is installed and activated
 2. Upload the plugin files to `/wp-content/plugins/ai-provider-for-zai/`
 3. Activate the plugin through the ‘Plugins’ menu in WordPress
 4. Open the WP AI Client credentials screen (the AI Credentials / “Connectors” settings
    provided by the WP AI Client plugin) and enter your Z.AI API key. The correct API
    type is auto-detected from the key.

## سوالات متداول

### How do I get a Z.AI API key?

Visit [z.ai](https://z.ai) to create an account and generate an API key.

### Which models are available?

Available models include glm-4.5, glm-4.5-air, glm-4.6, glm-4.7, glm-5, and glm-
5-turbo. Models are dynamically fetched from the Z.AI API, so new models will appear
automatically.

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

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

## نقد و بررسی‌ها

نقد و بررسی‌ای برای این افزونه یافت نشد.

## توسعه دهندگان و همکاران

“AI Provider for Z.AI” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ Huzaifa Al Mesbah ](https://profiles.wordpress.org/huzaifaalmesbah/)

[ترجمه “AI Provider for Z.AI” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/ai-provider-for-zai)

### علاقه‌ مند به توسعه هستید؟

[کد را مرور کنید](https://plugins.trac.wordpress.org/browser/ai-provider-for-zai/)،
[مخزن SVN](https://plugins.svn.wordpress.org/ai-provider-for-zai/) را بررسی کنید،
یا از طریق [RSS](https://plugins.trac.wordpress.org/log/ai-provider-for-zai/?limit=100&mode=stop_on_copy&format=rss)
در [گزارش توسعه](https://plugins.trac.wordpress.org/log/ai-provider-for-zai/) مشترک
شوید.

## گزارش تغییرات

#### 1.0.0

 * Initial release
 * Support for Z.AI GLM text generation models (glm-4.5, glm-4.6, glm-4.7, glm-5,
   and more)
 * Chat history support
 * Function calling support
 * JSON output support

## اطلاعات

 *  نگارش **1.0.0**
 *  آخرین به‌روزرسانی **4 هفته پیش**
 *  نصب‌های فعال **10+**
 *  نگارش وردپرس ** 7.0 یا بالاتر **
 *  آزمایش‌شده تا **7.0.1**
 *  نگارش PHP ** 7.4 یا بالاتر **
 *  زبان
 * [English (US)](https://wordpress.org/plugins/ai-provider-for-zai/)
 * برچسب
 * [AI](https://fa.wordpress.org/plugins/tags/ai/)[artificial intelligence](https://fa.wordpress.org/plugins/tags/artificial-intelligence/)
   [connector](https://fa.wordpress.org/plugins/tags/connector/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/ai-provider-for-zai/advanced/)

## امتیازها

هنوز هیچ نقدی ارسال نشده است.

[Your review](https://wordpress.org/support/plugin/ai-provider-for-zai/reviews/#new-post)

[مشاهده همه بررسی‌ها](https://wordpress.org/support/plugin/ai-provider-for-zai/reviews/)

## مشارکت کنندگان

 *   [ Huzaifa Al Mesbah ](https://profiles.wordpress.org/huzaifaalmesbah/)

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/ai-provider-for-zai/)