Title: AI Provider for Hugging Face
Author: Aslam Doctor
Published: <strong>2026年4月8日</strong>
Last modified: 2026年10月17日

---

プラグインを検索

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

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

# AI Provider for Hugging Face

 作者: [Aslam Doctor](https://profiles.wordpress.org/aslamdoctor/)

[ダウンロード](https://downloads.wordpress.org/plugin/ai-provider-for-hugging-face.1.2.0.zip)

 * [詳細](https://ja.wordpress.org/plugins/ai-provider-for-hugging-face/#description)
 * [レビュー](https://ja.wordpress.org/plugins/ai-provider-for-hugging-face/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/ai-provider-for-hugging-face/#installation)
 * [開発](https://ja.wordpress.org/plugins/ai-provider-for-hugging-face/#developers)

 [サポート](https://wordpress.org/support/plugin/ai-provider-for-hugging-face/)

## 説明

This plugin registers Hugging Face as an AI provider for the WordPress AI Client
introduced in WordPress 7.0. It enables text and image generation through Hugging
Face’s Inference API using popular open-source models.

**Features:**

 * Registers Hugging Face on the Settings > Connectors admin screen
 * Supports API key management (environment variable, PHP constant, or database)
 * Text generation via `wp_ai_client_prompt()`
 * Image generation via `wp_ai_client_prompt()->generate_image()`
 * Dynamically fetches top 20 popular models from HuggingFace (updated every 12 
   hours)
 * Multi-provider support — automatically routes to the best available inference
   provider (hf-inference, fal-ai, replicate, together, nscale, wavespeed)
 * Add custom models from the Settings > Hugging Face admin page
 * Extensible model lists via `hugging_face_ai_provider_models` and `hugging_face_ai_provider_image_models`
   filters
 * Configurable base URL for self-hosted TGI instances
 * Clear, actionable error messages for common API issues

**Usage:**

    ```
    $result = wp_ai_client_prompt( 'Summarize the benefits of caching.' )
        ->using_temperature( 0.7 )
        ->generate_text();

    // Generate an image
    $image = wp_ai_client_prompt( 'A futuristic WordPress logo in neon colors' )
        ->generate_image();
    ```

### External Services

This plugin connects to the Hugging Face Inference API to provide AI-powered text
and image generation capabilities within WordPress. The Hugging Face Inference API
is a third-party service operated by Hugging Face, Inc.

#### What data is sent and when

 * Your Hugging Face API key is sent with every request for authentication.
 * When fetching the model list, a request is sent to the Hugging Face API to retrieve
   available models.
 * When generating text, your prompt and any conversation context are sent to the
   Hugging Face Inference API.
 * When generating images, your text prompt is sent to the Hugging Face Inference
   API.
 * When resolving inference providers, a request is sent to the Hugging Face API
   to determine available providers for the selected model.

Data is only sent when the plugin is actively used to generate text or images, or
when loading the model list on the admin settings page.

#### Service links

 * [Hugging Face Website](https://huggingface.co/)
 * [Hugging Face Inference API Documentation](https://huggingface.co/docs/api-inference/)
 * [Hugging Face Terms of Service](https://huggingface.co/terms-of-service)
 * [Hugging Face Privacy Policy](https://huggingface.co/privacy)
 * [Hugging Face Content Policy](https://huggingface.co/content-guidelines)

All API communication is routed through `https://router.huggingface.co` and `https://
huggingface.co/api`.

## スクリーンショット

[⌊Settings > Connectors screen showing Hugging Face connected with API key.⌉⌊Settings
> Connectors screen showing Hugging Face connected with API key.⌉[

Settings > Connectors screen showing Hugging Face connected with API key.

[⌊Settings > Hugging Face admin page with text and image model configuration.⌉⌊Settings
> Hugging Face admin page with text and image model configuration.⌉[

Settings > Hugging Face admin page with text and image model configuration.

## インストール

 1. Upload the plugin to the `/wp-content/plugins/ai-provider-for-hugging-face` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Go to [Hugging Face Tokens](https://huggingface.co/settings/tokens) and create 
    a new Access Token with **Read** permission.
 4. Go to Settings > Connectors and enter your Hugging Face API token.

You can also set the API key via environment variable or PHP constant:

    ```
    // Environment variable
    HUGGING_FACE_API_KEY=hf_****

    // PHP constant in wp-config.php
    define( 'HUGGING_FACE_API_KEY', 'hf_****' );
    ```

## FAQ

### Which models are supported?

The plugin dynamically fetches the top 20 most popular text and image generation
models from HuggingFace, updated every 12 hours. You can also add any model via 
the Custom Models field in Settings > Hugging Face, or using the `hugging_face_ai_provider_models`
and `hugging_face_ai_provider_image_models` filters.

### Do I need to pay for HuggingFace?

Models on the free “hf-inference” provider work without credits. Other providers(
fal-ai, replicate, etc.) require pre-paid HuggingFace credits. The plugin automatically
selects the best available provider, preferring the free tier.

### Can I use a self-hosted model?

Yes. Use the `hugging_face_ai_provider_base_url` filter for text generation or `
hugging_face_ai_provider_image_url` filter for image generation to point to your
own inference instance.

### What capabilities are supported?

Text generation and image generation. Video generation support may be added in future
versions.

## 評価

このプラグインにはレビューがありません。

## 貢献者と開発者

AI Provider for Hugging Face はオープンソースソフトウェアです。以下の人々がこのプラグ
インに貢献しています。

貢献者

 *   [ Aslam Doctor ](https://profiles.wordpress.org/aslamdoctor/)

“AI Provider for Hugging Face” は1ロケールに翻訳されています。 [翻訳者](https://translate.wordpress.org/projects/wp-plugins/ai-provider-for-hugging-face/contributors)
のみなさん、翻訳へのご協力ありがとうございます。

[“AI Provider for Hugging Face” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/ai-provider-for-hugging-face)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/ai-provider-for-hugging-face/)
するか、[SVN リポジトリ](https://plugins.svn.wordpress.org/ai-provider-for-hugging-face/)
をチェックするか、[開発ログ](https://plugins.trac.wordpress.org/log/ai-provider-for-hugging-face/)
を [RSS](https://plugins.trac.wordpress.org/log/ai-provider-for-hugging-face/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 1.2.0

 * Declare compatibility up to WordPress 7.1.
 * Add presence_penalty and frequency_penalty support for text generation models.
 * Fix third-party inference provider endpoint URL and JSON response parsing for
   image generation.
 * Update Hugging Face model browse links to inference_provider=all format.
 * Update fallback model list and mark FLUX.1 Schnell pricing as Paid.
 * Add setup instructions and billing guidance to Connectors card and admin settings
   page.
 * Guard against direct file access in autoloader.
 * Harden provider resolution against varying API response structures.

#### 1.1.0

 * Fetch models from all HuggingFace inference providers instead of warm-only models.
 * Filter text generation models to chat-compatible (conversational) models only.
 * Show pricing labels in model dropdowns: “Free tier”, “from $X.XX/M tokens”, or“
   Paid”.
 * Models under $0.10/M tokens and hf-inference models are labelled “Free tier”.
 * Update fallback model lists with broadly supported models for better reliability.

#### 1.0.0

 * Initial release.
 * Connector registration with API key management.
 * Text generation via Hugging Face Inference API.
 * Image generation via text-to-image models with multi-provider support.
 * Dynamic model lists fetched from HuggingFace API.
 * Admin page with custom model management (add/remove with instant dropdown sync).
 * Clear error messages for 400, 401, 402, 404, 410, 422, 429, 500, 503 API responses.

## メタ

 *  バージョン **1.2.0**
 *  最終更新日 **20時間前**
 *  有効インストール数 **10+**
 *  WordPress バージョン ** 7.0またはそれ以降 **
 *  検証済み最新バージョン: **7.1.3**
 *  PHP バージョン ** 7.4またはそれ以降 **
 *  言語
 * [English (US)](https://wordpress.org/plugins/ai-provider-for-hugging-face/)、
   [Portuguese (Brazil)](https://br.wordpress.org/plugins/ai-provider-for-hugging-face/).
 *  [プラグインを翻訳](https://translate.wordpress.org/projects/wp-plugins/ai-provider-for-hugging-face)
 * タグ
 * [AI](https://ja.wordpress.org/plugins/tags/ai/)[ai client](https://ja.wordpress.org/plugins/tags/ai-client/)
   [connectors](https://ja.wordpress.org/plugins/tags/connectors/)[image-generation](https://ja.wordpress.org/plugins/tags/image-generation/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/ai-provider-for-hugging-face/advanced/)

## 評価

レビューはまだ送信されていません。

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

[すべてのレビューを見る](https://wordpress.org/support/plugin/ai-provider-for-hugging-face/reviews/)

## 貢献者

 *   [ Aslam Doctor ](https://profiles.wordpress.org/aslamdoctor/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/ai-provider-for-hugging-face/)