Skip to content

10up/classifai

ClassifAI

Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence.

Support Level Release Version WordPress tested up to version GPLv2 License

E2E Testing PHPUnit Testing Linting CodeQL Dependency Review

You can learn more about ClassifAI's features at ClassifAIPlugin.com and documentation at the ClassifAI documentation site.

Table of Contents

Overview

Tap into leading cloud-based services like OpenAI, Microsoft Azure AI, Google Gemini and IBM Watson to augment your WordPress-powered websites. Publish content faster while improving SEO performance and increasing audience engagement. ClassifAI integrates Artificial Intelligence and Machine Learning technologies to lighten your workload and eliminate tedious tasks, giving you more time to create original content that matters.

Features

Language Processing

Tagging Recommended Content Excerpt Generation Comment Moderation
Screenshot of ClassifAI post tagging Screenshot of ClassifAI recommended content Screenshot of ClassifAI excerpt generation Screenshot of ClassifAI comment moderation
Audio Transcripts Title Generation Expand or Condense Text Text to Speech
Screenshot of ClassifAI audio transcript generation Screenshot of ClassifAI title generation Screenshot of ClassifAI expand/condense text feature Screenshot of ClassifAI text to speech generation

Image Processing

Alt Text Smart Cropping Tagging Generate Images
Screenshot of ClassifAI alt-text Screenshot of ClassifAI smart coppring Screenshot of ClassifAI image tagging Screenshot of ClassifAI image generation

Requirements

  • PHP 7.4+
  • WordPress 6.1+
  • To utilize the NLU Language Processing functionality, you will need an active IBM Watson account.
  • To utilize the ChatGPT, Embeddings, or Whisper Language Processing functionality or DALL·E Image Processing functionality, you will need an active OpenAI account.
  • To utilize the Azure AI Vision Image Processing functionality or Text to Speech Language Processing functionality, you will need an active Microsoft Azure account.
  • To utilize the Azure OpenAI Language Processing functionality, you will need an active Microsoft Azure account and you will need to apply for OpenAI access.
  • To utilize the Google Gemini Language Processing functionality, you will need an active Google Gemini account.

Pricing

Note that there is no cost to using ClassifAI itself. Both IBM Watson and Microsoft Azure have free plans for some of their AI services, but above those free plans there are paid levels as well. So if you expect to process a high volume of content, then you'll want to review the pricing plans for these services to understand if you'll incur any costs. For the most part, both services' free plans are quite generous and should at least allow for testing ClassifAI to better understand its featureset and could at best allow for totally free usage. OpenAI has a limited trial option that can be used for testing but will require a valid paid plan after that.

IBM Watson's Natural Language Understanding ("NLU"), which is one of the providers that powers the classification feature, has a "lite" pricing tier that offers 30,000 free NLU items per month.

OpenAI, which is one of the providers that powers the classification, title generation, excerpt generation, content resizing, audio transcripts generation, moderation and image generation features, has a limited free trial and then requires a pay per usage plan.

Microsoft Azure AI Vision, which is one of the providers that powers the descriptive text generator, image tags generator, image cropping, image text extraction and PDF text extraction features, has a "free" pricing tier that offers 20 transactions per minute and 5,000 transactions per month.

Microsoft Azure AI Speech, which is one of the providers that powers the text to speech feature, has a "free" pricing tier that offers 0.5 million characters per month.

Microsoft Azure AI Personalizer, which is one of the providers that powers the recommended content feature, has a "free" pricing tier that offers 50,000 transactions per month.

Microsoft Azure OpenAI, which is one of the providers that powers the title generation, excerpt generation and content resizing features, has a pay per usage plan.

Google Gemini, which is one of the providers that powers the title generation, excerpt generation and content resizing features, has a "free" pricing tier that offers 60 queries per minute.

Installation

Manual Installation

1. Download or Clone this repo, install dependencies and build

  • git clone https://github.com/10up/classifai.git && cd classifai
  • composer install && npm install && npm run build

2. Activate Plugin

Installation via Composer

ClassifAI releases can be installed via Composer.

1. Update composer.json

Instruct Composer to install ClassifAI into the plugins directory by adding or modifying the "extra" section of your project's composer.json file to match the following:

"extra": {
    "installer-paths": {
        "plugins/{$name}": [
            "type:wordpress-plugin"
        ]
    }
}

Add this repository to composer.json, specifying a release version, as shown below:

"repositories": [
    {
        "type": "package",
        "package": {
            "name": "10up/classifai",
            "version": "2.0.0",
            "type": "wordpress-plugin",
            "dist": {
                "url": "https://github.com/10up/classifai/archive/refs/tags/2.0.0.zip",
                "type": "zip"
            }
        }
    }
]

Finally, require the plugin, using the version number you specified in the previous step:

"require": {
    "10up/classifai": "3.0.0"
}

After you run composer update, ClassifAI will be installed in the plugins directory with no build steps needed.

2. Activate Plugin

Register ClassifAI account

ClassifAI is a sophisticated solution that we want organizations of all shapes and sizes to count on. To keep adopters apprised of major updates and beta testing opportunities, gather feedback, support auto updates, and prioritize common use cases, we're asking for a little bit of information in exchange for a free key. Your information will be kept confidential.

1. Register for a ClassifAI account

  • Register for a free ClassifAI account here.
  • Check for an email from ClassifAI Team which contains the registration key.
  • Note that the email will be sent from opensource@10up.com, so please whitelist this email address if needed.

2. Configure ClassifAI Registration Key under Tools > ClassifAI

  • In the Registered Email field, enter the email you used for registration.
  • In the Registration Key field, enter the registration key from the email in step 1 above.

Screenshot of registration settings

Set Up Classification (via IBM Watson)

1. Sign up for Watson services

  • Register for an IBM Cloud account or sign into your existing one.
  • Check for an email from IBM Cloud and click the Confirm Account link.
  • Log into your account (accepting the privacy policy) and create a new Natural Language Understanding Resource if you do not already have one. It may take a minute for your account to fully populate with the default resource group to use.
  • Click Manage in the left hand menu, then Show credentials on the Manage page to view the credentials for this resource.

2. Configure IBM Watson API Keys under Tools > ClassifAI > Language Processing > Classification

  • Select IBM Watson NLU in the provider dropdown.

The credentials screen will show either an API key or a username/password combination.

If your credentials contain an API Key, then:

  • In the API URL field enter the URL
  • Enter your API Key in the API Key field.

If your credentials contain a username and password, then:

  • In the API URL field enter the URL
  • Enter the username value into the API Username.
  • Enter the password into the API Key field.

⚠️ Note: Deprecated Endpoint URLs: watsonplatform.net

IBM Watson endpoint urls with watsonplatform.net were deprecated on 26 May 2021. The pattern for the new endpoint URLs is api.{location}.{offering}.watson.cloud.ibm.com. For example, Watson's NLU service offering endpoint will be like: api.{location}.natural-language-understanding.watson.cloud.ibm.com

For more information, see https://cloud.ibm.com/docs/watson?topic=watson-endpoint-change.

Taxonomy options

IBM Watson's Categories, Keywords, Concepts & Entities can each be stored in existing WordPress taxonomies or a custom Watson taxonomy.

3. Configure Post Types to classify and IBM Watson Features to enable under ClassifAI > Language Processing > Classification

  • Choose which public post types to classify when saved.
  • Choose whether to assign category, keyword, entity, and concept as well as the thresholds and taxonomies used for each.

4. Save a Post/Page/CPT or run WP CLI command to batch classify your content

Set Up Language Processing Features (via OpenAI ChatGPT)

1. Sign up for OpenAI

  • Sign up for an OpenAI account or sign into your existing one.
  • If creating a new account, complete the verification process (requires confirming your email and phone number).
  • Log into your account and go to the API key page.
  • Click Create new secret key and copy the key that is shown.

2. Configure OpenAI API Keys under Tools > ClassifAI > Language Processing > Title Generation, Excerpt Generation or Content Resizing

  • Select OpenAI ChatGPT in the provider dropdown.
  • Enter your API Key copied from the above step into the API Key field.

3. Enable specific Language Processing feature settings

  • For each feature, set any options as needed.
  • Save changes and ensure a success message is shown. An error will show if API authentication fails.

4. Edit a content type to test enabled features

  • To test excerpt generation, edit (or create) an item that supports excerpts. Note: only the block editor is supported.
  • Ensure this item has content saved.
  • Open the Excerpt panel in the sidebar and click on Generate Excerpt.
  • To test title generation, edit (or create) an item that supports titles.
  • Ensure this item has content saved.
  • Open the Summary panel in the sidebar and click on Generate titles.
  • To test content resizing, edit (or create) an item. Note: only the block editor is supported.
  • Add a paragraph block with some content.
  • With this block selected, select the AI icon in the toolbar and choose to either expand or condense the text.
  • In the modal that pops up, select one of the options.

Set Up Language Processing Features (via Azure OpenAI)

1. Sign up for Azure services

  • Register for a Microsoft Azure account or sign into your existing one.
  • Request access to Azure OpenAI, if not already granted.
  • Log into your account and create a new Azure OpenAI resource if you do not already have one.
  • Copy the name you chose for the deployment when deploying the resource in the previous step.
  • Click Keys and Endpoint in the left hand Resource Management menu to get the endpoint for this resource.
  • Click the copy icon next to KEY 1 to copy the API Key credential for this resource.

2. Configure API Keys under Tools > ClassifAI > Language Processing > Title Generation, Excerpt Generation or Content Resizing

  • Select Azure OpenAI in the provider dropdown.
  • Enter your endpoint you copied from the above step into the Endpoint URL field.
  • Enter your API Key copied from the above step into the API key field.
  • Enter your deployment name copied from the above step into the Deployment name field.

3. Enable specific Language Processing features

  • Check the "Enable" checkbox in above screen.
  • Set the other options as needed.
  • Save changes and ensure a success message is shown. An error will show if API authentication fails.

4. Edit a content type to test enabled features

  • To test excerpt generation, edit (or create) an item that supports excerpts.
  • Ensure this item has content saved.
  • Open the Excerpt panel in the sidebar and click on Generate Excerpt.
  • To test title generation, edit (or create) an item that supports titles.
  • Ensure this item has content saved.
  • Open the Summary panel in the sidebar and click on Generate titles.
  • To test content resizing, edit (or create) an item. Note: only the block editor is supported.
  • Add a paragraph block with some content.
  • With this block selected, select the AI icon in the toolbar and choose to either expand or condense the text.
  • In the modal that pops up, select one of the options.

Set Up Language Processing Features (via Google AI (Gemini API))

1. Sign up for Google AI

  • Sign up for a Google account or sign into your existing one.
  • Go to Google AI Gemini website and click on the Get API key button or go to the API key page directly.
  • Note that if this page doesn't work, it's likely that Gemini is not enabled in your workspace. Contact your workspace administrator to get this enabled.
  • Click Create API key and copy the key that is shown.

2. Configure API Keys under Tools > ClassifAI > Language Processing > Title Generation, Excerpt Generation or Content Resizing

  • Select Google AI (Gemini API) in the provider dropdown.
  • Enter your API Key copied from the above step into the API Key field.

3. Enable specific Language Processing features

  • Check the "Enable" checkbox in above screen.
  • Set the other options as needed.
  • Save changes and ensure a success message is shown. An error will show if API authentication fails.

4. Edit a content type to test enabled features

  • To test excerpt generation, edit (or create) an item that supports excerpts.
  • Ensure this item has content saved.
  • Open the Excerpt panel in the sidebar and click on Generate Excerpt.
  • To test title generation, edit (or create) an item that supports titles.
  • Ensure this item has content saved.
  • Open the Summary panel in the sidebar and click on Generate titles.
  • To test content resizing, edit (or create) an item. Note: only the block editor is supported.
  • Add a paragraph block with some content.
  • With this block selected, select the AI icon in the toolbar and choose to either expand or condense the text.
  • In the modal that pops up, select one of the options.

Set Up Classification (via OpenAI Embeddings)

1. Sign up for OpenAI

  • Sign up for an OpenAI account or sign into your existing one.
  • If creating a new account, complete the verification process (requires confirming your email and phone number).
  • Log into your account and go to the API key page.
  • Click Create new secret key and copy the key that is shown.

2. Configure OpenAI API Keys under Tools > ClassifAI > Language Processing > Classification

  • Select OpenAI Embeddings in the provider dropdown.
  • Enter your API Key copied from the above step into the API Key field.

3. Enable specific Language Processing features

  • Choose to automatically classify content.
  • Set the other options as needed.
  • Save changes and ensure a success message is shown. An error will show if API authentication fails.

4. Edit a content item

  • Create one or more terms within the taxonomy (or taxonomies) chosen in settings.
  • Create a new piece of content that matches the post type and post status chosen in settings.
  • Open the taxonomy panel in the sidebar and see terms that were auto-applied.

Set Up Audio Transcripts Generation (via OpenAI Whisper)

Note that OpenAI can create a transcript for audio files that meet the following requirements:

  • The file must be presented in mp3, mp4, mpeg, mpga, m4a, wav, or webm format
  • The file size must be less than 25 megabytes (MB)

1. Sign up for OpenAI

  • Sign up for an OpenAI account or sign into your existing one.
  • If creating a new account, complete the verification process (requires confirming your email and phone number).
  • Log into your account and go to the API key page.
  • Click Create new secret key and copy the key that is shown.

2. Configure OpenAI API Keys under Tools > ClassifAI > Language Processing > Audio Transcripts Generation

  • Select OpenAI Embeddings in the provider dropdown.
  • Enter your API Key copied from the above step into the API Key field.

3. Enable specific features

  • Choose to enable the ability to automatically generate transcripts from supported audio files.
  • Choose which user roles have access to this ability.
  • Save changes and ensure a success message is shown. An error will show if API authentication fails.

4. Upload a new audio file

  • Upload a new audio file.
  • Check to make sure the transcript was stored in the Description field.

Set Up Text to Speech (via Microsoft Azure)

1. Sign up for Azure services

  • Register for a Microsoft Azure account or sign into your existing one.
  • Log into your account and create a new Speech Service if you do not already have one. It may take a minute for your account to fully populate with the default resource group to use.
  • Click Keys and Endpoint in the left hand Resource Management menu to view the Location/Region for this resource.
  • Click the copy icon next to KEY 1 to copy the API Key credential for this resource.

2. Configure Microsoft Azure API and Key under Tools > ClassifAI > Language Processing > Text to Speech

  • Select Microsoft Azure AI Speech in the provider dropdown.
  • In the Endpoint URL field, enter the following URL, replacing LOCATION with the Location/Region you found above: https://LOCATION.tts.speech.microsoft.com/.
  • In the API Key field, enter your KEY 1 copied from above.
  • Click Save Changes (the page will reload).
  • If connected successfully, a new dropdown with the label "Voices" will be displayed.
  • Select a voice as per your choice.
  • Select a post type that should use this service.

3. Using the Text to Speech service

  • Assuming the post type selected is "post", create a new post and publish it.
  • After a few seconds, a "Preview" button will appear under the ClassifAI settings panel.
  • Click the button to preview the generated speech audio for the post.
  • View the post on the front-end and see a read-to-me feature has been added

Set Up Image Processing features (via Microsoft Azure)

Note that Azure AI Vision can analyze and crop images that meet the following requirements:

  • The image must be presented in JPEG, PNG, GIF, or BMP format
  • The file size of the image must be less than 4 megabytes (MB)
  • The dimensions of the image must be greater than 50 x 50 pixels
  • The file must be externally accessible via URL (i.e. local sites and setups that block direct file access will not work out of the box)

1. Sign up for Azure services

  • Register for a Microsoft Azure account or sign into your existing one.
  • Log into your account and create a new Azure AI Vision Service if you do not already have one. It may take a minute for your account to fully populate with the default resource group to use.
  • Click Keys and Endpoint in the left hand Resource Management menu to view the Endpoint URL for this resource.
  • Click the copy icon next to KEY 1 to copy the API Key credential for this resource.

2. Configure Microsoft Azure API and Key under Tools > ClassifAI > Image Processing > Descriptive Text Generator, Image Tags Generator, Image Cropping, Image Text Extraction or PDF Text Extraction

  • Select Microsoft Azure AI Vision in the provider dropdown.
  • In the Endpoint URL field, enter your API endpoint.
  • In the API Key field, enter your KEY 1.

3. Configure specific Image Processing features

  • For features that have thresholds or taxonomy settings, set those as needed.
  • Image tagging uses Azure's Describe Image

4. Save Image or PDF file or run WP CLI command to batch classify your content

Set Up Image Generation (via OpenAI)

1. Sign up for OpenAI

  • Sign up for an OpenAI account or sign into your existing one.
  • If creating a new account, complete the verification process (requires confirming your email and phone number).
  • Log into your account and go to the API key page.
  • Click Create new secret key and copy the key that is shown.

2. Configure OpenAI API Keys under Tools > ClassifAI > Image Processing > Image Generation

  • Select OpenAI DALL·E 3 in the provider dropdown.
  • Enter your API Key copied from the above step into the API Key field.

3. Enable specific Image Processing features

  • Choose to add the ability to generate images.
  • If image generation is configured, set the other options as needed.
  • Save changes and ensure a success message is shown. An error will show if API authentication fails.

4. Trigger the media flow within a content item

  • Create a new content item
  • Insert an Image block or choose to add a featured image and choose a new item from the Media Library
  • In the media modal that opens, click on the Generate image tab
  • Enter in a prompt to generate an image
  • Once images are generated, choose one or more images to import into your media library
  • Choose one image to insert into the content

Set Up Comment Moderation (via OpenAI Moderation)

1. Sign up for OpenAI

  • Sign up for an OpenAI account or sign into your existing one.
  • If creating a new account, complete the verification process (requires confirming your email and phone number).
  • Log into your account and go to the API key page.
  • Click Create new secret key and copy the key that is shown.

2. Configure OpenAI API Keys under Tools > ClassifAI > Language Processing > Moderation

  • Select OpenAI Moderation in the provider dropdown.
  • Enter your API Key copied from the above step into the API Key field.

3. Enable Comment Moderation

  • Select the "Enable" checkbox in above screen.
  • Select "Comments" in the "Content to moderate" section.

Set Up Recommended Content (via Microsoft Azure AI Personalizer)

Azure AI Personalizer has been retired by Microsoft as of September 2023. The service will continue to work until 2026 but Personalizer resources can no longer be created. As such, consider this provider deprecated and be aware that we will be removing this in the near future. We are hoping to replace with a new provider to maintain the same functionality (see issue#392).

Note that Personalizer requires sufficient data volume to enable Personalizer to learn. In general, we recommend a minimum of ~1,000 events per day to ensure Personalizer learns effectively. If Personalizer doesn't receive sufficient data, the service takes longer to determine the best actions.

1. Sign up for Azure services

  • Register for a Microsoft Azure account or sign into your existing one.
  • Log into your account and create a new Personalizer resource.
  • Enter your service name, select a subscription, location, pricing tier, and resource group.
  • Select Create to create the resource.
  • After your resource has deployed, select the Go to Resource button to go to your Personalizer resource.
  • Click Keys and Endpoint in the left hand Resource Management menu to view the Endpoint URL for this resource.
  • Click the copy icon next to KEY 1 to copy the API Key credential for this resource.

For more information, see https://docs.microsoft.com/en-us/azure/cognitive-services/personalizer/how-to-create-resource

2. Configure Microsoft Azure API and Key under Tools > ClassifAI > Recommended Content

  • In the Endpoint URL field, enter your Endpoint URL from Step 1 above.
  • In the API Key field, enter your KEY 1 from Step 1 above.

3. Use "Recommended Content" block to display recommended content on your website

WP CLI Commands

Frequently Asked Questions

What data does ClassifAI gather?

ClassifAI connects your WordPress site directly to your account with specific service provider(s) (e.g. Microsoft Azure AI, IBM Watson, OpenAI), so no data is gathered by 10up. The data gathered in our registration form is used simply to stay in touch with users so we can provide product updates and news. More information is available in the Privacy Policy on ClassifAIplugin.com.

What are the Categories, Keywords, Concepts, and Entities within the NLU Language Processing feature?

Categories are five levels of hierarchies that IBM Watson can identify from your text. Keywords are specific terms from your text that IBM Watson is able to identify. Concepts are high-level concepts that are not necessarily directly referenced in your text. Entities are people, companies, locations, and classifications that are made by IBM Watson from your text.

How can I view the taxonomies that are generated from the NLU classification?

Whatever options you have selected in the Category, Keyword, Entity, and Concept taxonomy dropdowns in the NLU classification settings can be viewed within Classic Editor metaboxes and the Block Editor side panel. They can also be viewed in the All Posts and All Pages table list views by utilizing the Screen Options to enable those columns if they're not already appearing in your table list view.

Should I alert my site's users that AI tools are being used?

We recommend that you are transparent with your users that AI tools are being used. This can be done by adding a notice to your site's Privacy Policy or similar page. Sample copy is provided below:

This site makes use of Artificial Intelligence tools to help with tasks like language processing, image processing, and content recommendations.

When a post is sent to OpenAI (e.g. to generate a title or excerpt), is the post content fed into OpenAI and used for other customers?

According to OpenAI, they do not train their models on any data that is sent via API requests (see https://openai.com/enterprise-privacy). OpenAI may keep the data for up to 30 days to identify abuse, though you can request zero data retention (ZDR) with a qualifying use-case.

Support Level

Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.

Changelog

A complete listing of all notable changes to ClassifAI are documented in CHANGELOG.md.

Contributing

Please read CODE_OF_CONDUCT.md for details on our code of conduct, CONTRIBUTING.md for details on the process for submitting pull requests to us, and CREDITS.md for a listing of maintainers, contributors, and libraries for ClassifAI.

Like what you see?

Work with us at 10up