{"id":295931,"date":"2026-04-08T17:14:30","date_gmt":"2026-04-08T17:14:30","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ai-provider-for-hugging-face\/"},"modified":"2026-04-08T17:14:16","modified_gmt":"2026-04-08T17:14:16","slug":"ai-provider-for-hugging-face","status":"publish","type":"plugin","link":"https:\/\/tr.wordpress.org\/plugins\/ai-provider-for-hugging-face\/","author":5976779,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"1.0.0","tested":"7.0","requires":"7.0","requires_php":"7.4","requires_plugins":null,"header_name":"AI Provider for Hugging Face","header_author":"Aslam Doctor","header_description":"AI Provider for Hugging Face for the WordPress AI Client.","assets_banners_color":"544b27","last_updated":"2026-04-08 17:14:16","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/aslamdoctor\/ai-provider-for-hugging-face","header_author_uri":"https:\/\/aslamdoctor.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":43,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"aslamdoctor","date":"2026-04-08 17:14:16"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3501889,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3501889,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3501889,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3501889,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3501889,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3501889,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Settings &gt; Connectors screen showing Hugging Face connected with API key.","2":"Settings &gt; Hugging Face admin page with text and image model configuration."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2353,259736,259397,259752,25198],"plugin_category":[],"plugin_contributors":[149678],"plugin_business_model":[],"class_list":["post-295931","plugin","type-plugin","status-publish","hentry","plugin_tags-ai","plugin_tags-ai-client","plugin_tags-connectors","plugin_tags-hugging-face","plugin_tags-image-generation","plugin_contributors-aslamdoctor","plugin_committers-aslamdoctor"],"banners":{"banner":"https:\/\/ps.w.org\/ai-provider-for-hugging-face\/assets\/banner-772x250.png?rev=3501889","banner_2x":"https:\/\/ps.w.org\/ai-provider-for-hugging-face\/assets\/banner-1544x500.png?rev=3501889","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/ai-provider-for-hugging-face\/assets\/icon-128x128.png?rev=3501889","icon_2x":"https:\/\/ps.w.org\/ai-provider-for-hugging-face\/assets\/icon-256x256.png?rev=3501889","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/ai-provider-for-hugging-face\/assets\/screenshot-1.png?rev=3501889","caption":"Settings &gt; Connectors screen showing Hugging Face connected with API key."},{"src":"https:\/\/ps.w.org\/ai-provider-for-hugging-face\/assets\/screenshot-2.png?rev=3501889","caption":"Settings &gt; Hugging Face admin page with text and image model configuration."}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p><strong>Features:<\/strong><\/p>\n\n<ul>\n<li>Registers Hugging Face on the Settings &gt; Connectors admin screen<\/li>\n<li>Supports API key management (environment variable, PHP constant, or database)<\/li>\n<li>Text generation via <code>wp_ai_client_prompt()<\/code><\/li>\n<li>Image generation via <code>wp_ai_client_prompt()-&gt;generate_image()<\/code><\/li>\n<li>Dynamically fetches top 20 popular models from HuggingFace (updated every 12 hours)<\/li>\n<li>Multi-provider support \u2014 automatically routes to the best available inference provider (hf-inference, fal-ai, replicate, together, nscale, wavespeed)<\/li>\n<li>Add custom models from the Settings &gt; Hugging Face admin page<\/li>\n<li>Extensible model lists via <code>hugging_face_ai_provider_models<\/code> and <code>hugging_face_ai_provider_image_models<\/code> filters<\/li>\n<li>Configurable base URL for self-hosted TGI instances<\/li>\n<li>Clear, actionable error messages for common API issues<\/li>\n<\/ul>\n\n<p><strong>Usage:<\/strong><\/p>\n\n<pre><code>$result = wp_ai_client_prompt( 'Summarize the benefits of caching.' )\n    -&gt;using_temperature( 0.7 )\n    -&gt;generate_text();\n\n\/\/ Generate an image\n$image = wp_ai_client_prompt( 'A futuristic WordPress logo in neon colors' )\n    -&gt;generate_image();\n<\/code><\/pre>\n\n<h3>External Services<\/h3>\n\n<p>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.<\/p>\n\n<h4>What data is sent and when<\/h4>\n\n<ul>\n<li>Your Hugging Face API key is sent with every request for authentication.<\/li>\n<li>When fetching the model list, a request is sent to the Hugging Face API to retrieve available models.<\/li>\n<li>When generating text, your prompt and any conversation context are sent to the Hugging Face Inference API.<\/li>\n<li>When generating images, your text prompt is sent to the Hugging Face Inference API.<\/li>\n<li>When resolving inference providers, a request is sent to the Hugging Face API to determine available providers for the selected model.<\/li>\n<\/ul>\n\n<p>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.<\/p>\n\n<h4>Service links<\/h4>\n\n<ul>\n<li><a href=\"https:\/\/huggingface.co\/\">Hugging Face Website<\/a><\/li>\n<li><a href=\"https:\/\/huggingface.co\/docs\/api-inference\/\">Hugging Face Inference API Documentation<\/a><\/li>\n<li><a href=\"https:\/\/huggingface.co\/terms-of-service\">Hugging Face Terms of Service<\/a><\/li>\n<li><a href=\"https:\/\/huggingface.co\/privacy\">Hugging Face Privacy Policy<\/a><\/li>\n<li><a href=\"https:\/\/huggingface.co\/content-guidelines\">Hugging Face Content Policy<\/a><\/li>\n<\/ul>\n\n<p>All API communication is routed through <code>https:\/\/router.huggingface.co<\/code> and <code>https:\/\/huggingface.co\/api<\/code>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin to the <code>\/wp-content\/plugins\/ai-provider-for-hugging-face<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Go to <a href=\"https:\/\/huggingface.co\/settings\/tokens\">Hugging Face Tokens<\/a> and create a new Access Token with <strong>Read<\/strong> permission.<\/li>\n<li>Go to Settings &gt; Connectors and enter your Hugging Face API token.<\/li>\n<\/ol>\n\n<p>You can also set the API key via environment variable or PHP constant:<\/p>\n\n<pre><code>\/\/ Environment variable\nHUGGING_FACE_API_KEY=hf_****\n\n\/\/ PHP constant in wp-config.php\ndefine( 'HUGGING_FACE_API_KEY', 'hf_****' );\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt id=\"which%20models%20are%20supported%3F\"><h3>Which models are supported?<\/h3><\/dt>\n<dd><p>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 &gt; Hugging Face, or using the <code>hugging_face_ai_provider_models<\/code> and <code>hugging_face_ai_provider_image_models<\/code> filters.<\/p><\/dd>\n<dt id=\"do%20i%20need%20to%20pay%20for%20huggingface%3F\"><h3>Do I need to pay for HuggingFace?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20i%20use%20a%20self-hosted%20model%3F\"><h3>Can I use a self-hosted model?<\/h3><\/dt>\n<dd><p>Yes. Use the <code>hugging_face_ai_provider_base_url<\/code> filter for text generation or <code>hugging_face_ai_provider_image_url<\/code> filter for image generation to point to your own inference instance.<\/p><\/dd>\n<dt id=\"what%20capabilities%20are%20supported%3F\"><h3>What capabilities are supported?<\/h3><\/dt>\n<dd><p>Text generation and image generation. Video generation support may be added in future versions.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Connector registration with API key management.<\/li>\n<li>Text generation via Hugging Face Inference API.<\/li>\n<li>Image generation via text-to-image models with multi-provider support.<\/li>\n<li>Dynamic model lists fetched from HuggingFace API.<\/li>\n<li>Admin page with custom model management (add\/remove with instant dropdown sync).<\/li>\n<li>Clear error messages for 400, 401, 402, 404, 410, 422, 429, 500, 503 API responses.<\/li>\n<\/ul>","raw_excerpt":"AI Provider for Hugging Face for the WordPress AI Client. Use open-source models for text and image generation through the standard WordPress AI API.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/295931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=295931"}],"author":[{"embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/aslamdoctor"}],"wp:attachment":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=295931"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=295931"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=295931"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=295931"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=295931"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=295931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}