> For the complete documentation index, see [llms.txt](https://docs.stylemixthemes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stylemixthemes.com/masterstudy-lms/lms-pro-addons/ai-lab.md).

# ✨AI Lab

**AI Lab** is a powerful add-on designed to simplify and accelerate course creation within your learning management system. By integrating artificial intelligence into the content-building process, AI Lab allows instructors to generate entire courses, lessons, quizzes, assignments, and even visuals from a single input.

Whether you are creating a course from scratch or enhancing existing content, **AI Lab** helps you work faster, smarter, and with more creativity. It removes the manual workload and lets you focus on teaching, while AI cares for structure, flow, and variety.

**✅ With AI Lab, you can:**

* Generate [**full course**](#how-to-generate-course-with-ai) structures with titles, descriptions, and outlines
* Create interactive and [**well-organized lessons**](#craft-lessons-with-ai)
* Automatically produce[ **quizzes and assignments** ](#craft-quizzes-with-ai)aligned with your content
* Add relevant images to your lessons using [**AI image generation**](#image-generation-with-ai)
* Instantly rewrite or[ **improve any text content**](#improving-content-with-ai) across your course

This documentation will guide you through installing the add-on, using each feature effectively, and customizing the output to fit your teaching style.

## AI Lab Addon Settings

AI Lab addon can be activated by following **WP Dashboard > MS LMS > Pro Addons > AI Lab:**

<figure><img src="/files/fLmt1WpOUAX1ENC3WciL" alt=""><figcaption></figcaption></figure>

Once you have enabled the add-on, you can reach its settings by clicking the gear :gear: icon or by following **WP Dashboard > MS LMS > Settings > AI Lab:**

<figure><img src="/files/1P1XPegISGQxwnDV5ftq" alt=""><figcaption></figcaption></figure>

* **AI Lab Provider -** choose one of the available AI Providers. MasterStudy LMS is integrated with the most popular AI platforms to provide the best results. You can use any of them according to your needs. Available options are: *OpenAI, Grok, Gemini, Mistral, Claude.*
* **API Key** - Enter your API key for the selected AI Lab Provider. You can obtain the key [**by following these steps.**](#obtain-api-keys-for-ai-lab-providers)
* **Text Model -** Choose the desired AI Lab Provider model to generate text outputs.
* **Image Model**<mark style="color:$danger;">**\***</mark> - Choose the desired AI Lab Provider model to generate image outputs.
* **Number of Text Suggestions** - Select how many variations of AI-generated text you want to receive for each request.
* **Number of Image Suggestions** - Choose how many AI-generated image options to receive. The **DALLE-3** model will be used to generate images.
* **Instructor Access** - Enable or disable AI feature access for instructors. Use the "Manage" button to configure permissions.

<mark style="color:$danger;">**\***</mark> *Image generation is available only in **OpenAI, Grok,** and **Gemini**. If you choose Mistral and Claude as your provider, for image generation, you have to select a partner provider and provide its API Key.*

## Obtain API Keys for AI Lab Providers

There are 5 providers available for AI Lab:

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><i class="fa-openai">:openai:</i> <strong>OpenAI</strong></td><td><a href="/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-openai-credentials">/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-openai-credentials</a></td></tr><tr><td><i class="fa-x-twitter">:x-twitter:</i> <strong>Grok</strong></td><td><a href="/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-grok-xai-credentials">/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-grok-xai-credentials</a></td></tr><tr><td><i class="fa-google">:google:</i> <strong>Gemini</strong></td><td><a href="/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-gemini-google-credentials">/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-gemini-google-credentials</a></td></tr><tr><td><i class="fa-mistral">:mistral:</i> <strong>Mistral</strong></td><td><a href="/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-mistral-credentials">/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-mistral-credentials</a></td></tr><tr><td><i class="fa-claude">:claude:</i> <strong>Claude</strong></td><td><a href="/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-claude-anthropic-credentials">/pages/JnzyV0Ym7e8dEkGwKYPA#obtain-claude-anthropic-credentials</a></td></tr></tbody></table>

### Obtain OpenAI Credentials

To use the AI Lab features in MasterStudy, you need to connect your OpenAI account by entering your API key.

{% hint style="info" %}
OpenAI provides powerful language and image generation tools, but please note that these services **are not free.** Each time you generate text or images through the AI Lab, your usage is counted and charged according to OpenAI’s[ **pricing model**](https://openai.com/api/pricing/)**.** Charges depend on the number of tokens used in your requests or the number and type of images generated.

➡️ [**How to Set Up Billing?**](#how-to-set-up-billing)
{% endhint %}

{% stepper %}
{% step %}
Visit <https://platform.openai.com/> and sign in with your **OpenAI** account. If you don't have one, you will need to create it first.

<figure><img src="/files/dqeHnv6GP7h3rzVp3ycB" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
After logging in, you should be redirected to the API Keys tab <https://platform.openai.com/api-keys/>, and here you have to click on **Create New Secret Key:**

<figure><img src="/files/ufRhnUYHMFZ0uUKyWvIs" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Set the parameters **as above**, **name** your project according to your needs, and click on **Create Secret Key:**

<figure><img src="/files/fnUkVg9ALNAkJ8mZoiWU" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Copy the generated **Secret Key:**

<figure><img src="/files/vFHKUm3pRRDkvyWY5adb" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Go back to the addon settings, choose OpenAI as provider, then paste the key into the designated field, and save the settings:

<figure><img src="/files/HK0LSeShJZWzw1DbbzTo" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

Now you can go and [**set up billing**](#how-to-set-up-billing) to use the feature.

#### How to Set Up OpenAI Billing

OpenAI charges for its API based on usage, so if you haven’t already set up a payment method for billing, you’ll need to do so. **Otherwise, the API key you created won’t function.**

:heavy\_dollar\_sign: **OpenAI Pricing** 👉 <https://openai.com/api/pricing/>

{% stepper %}
{% step %}
To begin, click the settings (gear :gear:) icon in the top right corner of the **API keys** screen:

<figure><img src="/files/kPoP1nIvHooWmjDilJGA" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
On the opened page, move to the **Billing tab a**nd click on **Add Payment Details:**

<figure><img src="/files/AaHd1tsD2BKo3hlY5g0a" alt=""><figcaption><p><a href="https://platform.openai.com/settings/organization/billing/overview">https://platform.openai.com/settings/organization/billing/overview</a></p></figcaption></figure>
{% endstep %}

{% step %}
Enter your card information and billing:

<figure><img src="/files/0i5W3a6ib85a3rjQR56v" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Set up the payment amount and/or automatic recharge settings according to your needs, and initiate the payment:

<figure><img src="/files/BHfLy5EZ5DnOtIeRbnNv" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now you’ve set up billing, it’s a good idea to set usage limits to control your monthly API spending. Simply click **Limits** in the left menu, set your desired monthly budget, and choose an email notification threshold according to your needs. Finally, click **Save** to apply your settings.

<figure><img src="/files/JzTe1mjc1hrU35k2xTD5" alt=""><figcaption><p><a href="https://platform.openai.com/settings/organization/limits">https://platform.openai.com/settings/organization/limits</a></p></figcaption></figure>
{% endstep %}

{% step %}
You can also check the usage of your API right on the Usage section of the Addon Setting page:

<figure><img src="/files/2aNTYMCQIAAxra9TRpN8" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Obtain Grok (xAI) Credentials

To use Grok models in AI Lab, you need to connect your xAI account by entering your API key.

{% hint style="info" %}
xAI charges for API usage on a pay-as-you-go basis, and there is no permanent free tier. Each time you generate text or images through AI Lab using Grok, your usage is counted and charged according to xAI's [**pricing model**](https://x.ai/api).

➡️ [**How to Set Up Billing?**](#how-to-set-up-billing-grok)
{% endhint %}

{% stepper %}
{% step %}
Visit <https://console.x.ai/> and sign in with your **xAI** account. If you don't have one, you will need to create it first.
{% endstep %}

{% step %}
Complete the short onboarding steps (use case, terms acceptance) if prompted.

<figure><img src="/files/utcUlVLnzSKzGDqK8ULt" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
If you are creating a new account, you will be given a default API Key and an option to fill out your account. You can skip both:

<figure><img src="/files/k6B97g2T3sHW6VFWaHEI" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
In the left sidebar, navigate to **API Keys**, then click **Create API Key:**

<figure><img src="/files/lzhtsfA8obH9uURhWYUh" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Name** your key according to your needs (e.g., "MasterStudy AI Lab") and click <kbd>**Create**</kbd>**:**

<figure><img src="/files/ynUAx0CvaVx8gElR4dbW" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Copy the generated **Secret Key**.&#x20;

{% hint style="warning" %}
**IMPORTANT**

It is only shown once — if you lose it, you'll need to revoke it and create a new one!
{% endhint %}

<figure><img src="/files/ITIJG87Dky63hnMM9qvn" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Go back to the AI Lab addon settings, select **Grok** as your provider, paste the key into the designated field, and save the settings:

<figure><img src="/files/rcrQ027oNrMi2Ex5JGef" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

Now you can go and **set up billing** to use the feature.

#### **How to Set Up Billing (Grok)**

xAI charges per token used, so you'll need an active payment method before your key will work.

:heavy\_dollar\_sign: **xAI API Pricing** 👉 <https://x.ai/api>

{% stepper %}
{% step %}
In the [xAI Console](https://console.x.ai/), open the **Credits** (*Billing*) section from the left sidebar.

<figure><img src="/files/056gwFcQ7PLQD8LbjxWO" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click **Add Payment Method** and enter your card and billing details.

<figure><img src="/files/hiutJsAUD9glau3FupL0" alt=""><figcaption></figcaption></figure>

New xAI accounts typically receive a small amount of promotional credit that expires after a set period, so you may be able to test the integration before adding a card.
{% endstep %}
{% endstepper %}

### Obtain Gemini (Google) Credentials

To use Gemini models in AI Lab, you need to connect your Google account by entering an API key generated through Google AI Studio.

{% hint style="info" %}
Google offers a free tier for Gemini with limited rate limits, but higher-volume use through AI Lab will require billing to be enabled on the linked Google Cloud project. Charges follow Google's [**pricing model**](https://ai.google.dev/gemini-api/docs/pricing).

➡️ [**How to Set Up Billing?**](#how-to-set-up-billing-gemini)
{% endhint %}

{% stepper %}
{% step %}
Visit <https://aistudio.google.com/> and sign in with your **Google** account. Then go to [Dashboard](https://aistudio.google.com/u/2/api-keys):

<figure><img src="/files/W9W8XzuHiutDCrgbwnsi" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
In the left sidebar under the **API Keys** tab, click on the <kbd>Create API key</kbd> butto&#x6E;**:**

<figure><img src="/files/jvxQR6oWO4pZ78zLWyKr" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Name your key and click on the <kbd>Create key</kbd> button:

<figure><img src="/files/2Gefw0ORl9JoSdVpBc3F" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Copy the generated key. Unlike some providers, Google AI Studio lets you view the key again later, but it's still best practice to store it securely right away:

<figure><img src="/files/uRnmUiEBfTrWv195FeCi" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Google now requires Gemini API keys to be **restricted** (scoped to the Generative Language API) rather than left unrestricted. Newly created AI Studio keys are restricted by default — if you're reusing an older key, confirm this under **API Keys** in AI Studio before proceeding.
{% endhint %}
{% endstep %}

{% step %}
Go back to the AI Lab addon settings, select **Gemini** as your provider, paste the key into the designated field, and save the settings:

<figure><img src="/files/emcWZ2MZAstgr8HoEQvO" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

Now you can go and **set up billing** if you need higher usage limits than the free tier.

#### **How to Set Up Billing (Gemini)**

:heavy\_dollar\_sign: **Gemini API Pricing** 👉 <https://ai.google.dev/gemini-api/docs/pricing>

{% stepper %}
{% step %}
In AI Studio, go to <https://aistudio.google.com/app/apikey> and locate the Google Cloud project linked to your key.

<figure><img src="/files/8f8J6DwCMLKjlK0tyKKC" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Free-tier and paid-tier keys use the same key format and endpoint — enabling billing simply removes the free tier's rate limits (requests per minute/day).
{% endhint %}
{% endstep %}
{% endstepper %}

### Obtain Mistral Credentials

To use Mistral models in AI Lab, you need to connect your Mistral account by entering an API key generated through La Plateforme (Mistral's console).

{% hint style="info" %}
Mistral requires an active billing plan — including its free **Experiment** plan — before an API key will work. Usage beyond the free plan is charged according to Mistral's [**pricing model**](https://mistral.ai/pricing).

➡️ [**How to Set Up Billing?**](#how-to-set-up-billing-mistral)
{% endhint %}

{% stepper %}
{% step %}
Visit <https://console.mistral.ai/> and sign up or sign in (email, Google, Microsoft, or Apple). If prompted, complete your workspace setup by providing an organization name.

{% hint style="danger" %}
Before creating a key, open **Billing** **>** [**Subscription** ](https://admin.mistral.ai/subscription)in the left sidebar and choose a plan — even the free **Experiment** plan must be explicitly selected. Skipping this step is the most common reason new keys fail with an authentication error.
{% endhint %}

<figure><img src="/files/hohojD3PrqSQahjSq4Va" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
In the left sidebar, open **API Keys**

<figure><img src="/files/rHxT47fQWhPi1jh6bT78" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
From the opened pop-up, click <kbd>Create new key</kbd>**:**

<figure><img src="/files/kMcWZoox7YoqlEMs6KjM" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Give your key a descriptive **name**, optionally set an expiration date, and confirm:

<figure><img src="/files/V0zbbuRqMn8e11LBoMix" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Copy the generated key immediately — Mistral only shows it once.&#x20;

{% hint style="warning" %}
**IMPORTANT**

If you lose the generated key, you'll need to generate a new one.
{% endhint %}

<figure><img src="/files/VLCoVWADAG3XQeHRr8tU" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Go back to the AI Lab addon settings, select **Mistral** as your provider, paste the key into the designated field, and save the settings:

<figure><img src="/files/ODuzxdOPHruYv46WXRGx" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

#### **How to Set Up Billing (Mistral)**

:heavy\_dollar\_sign: **Mistral API Pricing** 👉 <https://mistral.ai/pricing>

{% stepper %}
{% step %}
In the[ Mistral console](https://console.mistral.ai/), open **Billing** from the left sidebar.

<figure><img src="/files/hf4cJk2riS2AFRVhpT1m" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Choose a subscription plan — **Experiment** (free, limited) or **Pay as you go** — and add a payment method if selecting a paid plan.

<figure><img src="/files/0ZqjjHTPHsZE4KdQq3lz" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Then, move to the billing tab and set a monthly spending limit under your workspace's billing settings to avoid unexpected charges (optional).

<figure><img src="/files/zhrtrZ6zpp02UoJLTonM" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Obtain Claude (Anthropic) Credentials

To use Claude models in AI Lab, you need to connect your Anthropic account by entering an API key generated through the Anthropic Console.

{% hint style="info" %}
Anthropic uses a prepaid credit system for API usage — you'll need to add credits before your key can make requests. Charges are counted according to Anthropic's [**pricing model**](https://www.anthropic.com/pricing).

➡️ [**How to Set Up Billing?**](#how-to-set-up-billing-claude)
{% endhint %}

{% stepper %}
{% step %}
Visit <https://console.anthropic.com/> and sign up or sign in (email or Google).
{% endstep %}

{% step %}
If this is a new account, complete onboarding by confirming your details, creating an organization (your company name or a descriptive name), and accepting the terms. If you work individually, you can go with the individual plan:

<figure><img src="/files/f3wKlpJFzsC5d37tVwmg" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You might be asked to add funds to your account. However, this step is totally skippable.
{% endhint %}
{% endstep %}

{% step %}
In the left sidebar, go to **Settings > API Keys**, then click <kbd>Create Key</kbd>**:**

<figure><img src="/files/g2ikZnTEr6iNXmhxBnhr" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Name** your key (e.g. "MasterStudy AI Lab"), choose the workspace and permission level, and confirm:

<figure><img src="/files/1GDzgGkxJVjUYkW1tvcl" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Copy the generated key immediately. It starts with `sk-ant-` and is <mark style="color:$warning;">**only shown once**</mark> — **if you close the dialog without copying it, you'll need to revoke it and create a new one:**

<figure><img src="/files/4EdqzthJ8iAZMHzQc0kb" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Go back to the AI Lab addon settings, select **Claude** as your provider, paste the key into the designated field, and save the settings:

<figure><img src="/files/EzYJ5ByGSQqdnltuRfRZ" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

Now you can go and **set up billing** to use the feature.

#### **How to Set Up Billing (Claude)**

A freshly created key cannot make calls until billing is configured — requests will return a billing error otherwise.

:heavy\_dollar\_sign: **Claude API Pricing** 👉 <https://www.anthropic.com/pricing>

{% stepper %}
{% step %}
In the [Anthropic Console](https://platform.claude.com/settings/billing), click **Credits > Billing** in the left sidebar.

<figure><img src="/files/KHFxm5JVKawCq3sJnL5T" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Add a payment method and either pre-purchase credits or enable auto-recharge:

<figure><img src="/files/agUJhCpy5fc8sarf6OnL" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Optionally, set a monthly usage limit as a safety cap, then confirm your settings.
{% endhint %}
{% endstep %}
{% endstepper %}

## How to Generate Entire Course with AI

The AI Lab add-on allows instructors to generate an entire course in just a few clicks by harnessing the power of artificial intelligence. With a **well-structured prompt**, AI can create comprehensive, well-organized courses with **sections**, **lessons**, **descriptions**, and learning objectives. Based on your input, **AI Lab** will automatically generate:

* Course title, description, and image
* Sections and lesson outlines
* Lesson content with explanations and key points
* Quizzes for selected lessons
* Assignments to reinforce learning
* Suggested images for each lesson
* Course FAQs

{% hint style="info" %}
AI Lab can not generate **audio, video, Google Meet, Stream, or Zoom lessons**. You can use tools to [**improve their text content,**](#improve-content-with-ai) but these kinds of lessons should be [**created** ](#craft-lessons-with-ai)and added manually to the course.
{% endhint %}

{% stepper %}
{% step %}
Go to the **WP Dashboard > MS LMS > Courses,** then click on the  **Generate Course** button:

<figure><img src="/files/xqHNIyCJG4DsjMnkTgvJ" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
On the opened page, you will see a special field dedicated to generating a course via prompt using AI. Click on **Generate Entire Course:**

<figure><img src="/files/BinK1vxDPLM7cAvv1P2K" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Now, we need a clear and specific prompt that describes your course.**

{% hint style="success" %}

#### 💡 What to include in your prompt:

* **Who is the course for?** Mention the target audience and their skill level.
* **What will learners achieve?** Describe learning goals and outcomes.
* **What topics should it cover?** Name specific subjects, themes, or modules.
* **What should the course image depict?** Help create a relevant and eye-catching visual.
* **Preferred tone or style?** Casual, academic, motivational, etc.
* Optionally, include any preferences for how lessons are written (e.g., “use emojis,” “include examples,” etc).

:white\_check\_mark: **You can** [**later refine**](#improve-content-with-ai) **each lesson using other AI tools in the editor.**
{% endhint %}

📝 **Here is the example prompt:**

> I want to create a course called **"Digital Marketing Basics"** for **young entrepreneurs and students aged 16 to 35**.\
> The course should introduce topics like **SEO, content strategy, social media marketing, and email campaigns**.\
> Learners should gain enough knowledge to start promoting their own brand or freelance service online.
>
> For the course image, please show **a group of diverse students at laptops learning marketing tools** in a modern, colorful setting.\
> Use a **friendly, encouraging tone** with **real-life examples** and **emojis** in the text. Lessons should include short intros and 3–4 key points.

Enter the prompt in the designated area:

<figure><img src="/files/MV1jljYpoVSOyqM5Qpmc" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now, provide the rest of the details of the course and proceed by clicking the **✨Generate Entire Course** button:

{% hint style="warning" %}
**Note** that if you enable **Create course outline** **only** setting, AI will only generate section and lesson titles without any content.
{% endhint %}

<figure><img src="/files/dDpTygXipx3PO6w5pk9K" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
It takes some time for AI to generate an entire course with lessons. Be patient and **do not close** the tab during the course generation:

<figure><img src="/files/QEWSVZS0qjcwHi1AYa0J" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
You will see the ready course preview with short and long descriptions, course cover image, and curriculum:

{% hint style="info" %}
When it comes to curriculum, only **section** and **lesson titles** will be generated. **Lesson content** will be generated in the next steps.
{% endhint %}

<figure><img src="/files/bsOElJrky2OvLU4tpkHw" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
If you do not like the AI-generated course, you have several options:

{% tabs %}
{% tab title="Regenerate Course" %}
You can do it by clicking the **Regenerate** button on the right sidebar. It simply regenerates the course without changing your original prompt:

<figure><img src="/files/9KUx6z7IfVDdY5BG6uCX" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Change Prompt" %}
If you want to add something or change your ideas, you can try changing your prompt. It can also be done by clicking the **Change prompt** button on the right sidebar:

<figure><img src="/files/gHbYBHLgJjg2pfI83o2O" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Regenerate Curriculum" %}
If you are satisfied with everything except the course curriculum, you can try regenerating it by clicking the **Regenerate Curriculum** button on the top right side of the curriculum section:

<figure><img src="/files/RTbDPaQY0ZZsAgezD40l" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}
Once you are satisfied with the outputs, proceed by the **Save and Continue** button:

{% hint style="danger" %} <mark style="color:red;">**IMPORTANT**</mark>

**Be careful,** if you **close the tab without clicking the save button**, the generated course **will be lost**. It **will not be saved as a draft either.**
{% endhint %}

<figure><img src="/files/nDeToUzJ8Y8Xw4hrkToN" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
After that, the system starts generating lesson contents. The same, wait patiently and do not close the tab:

{% hint style="info" %}
Images for the lessons will not be generated in this step. To include illustrations inside lessons, you have to individually add them via Content Generator.
{% endhint %}

<figure><img src="/files/74PkHdKPvfbZz9qNn2WX" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Once it's done, proceed by clicking the **Save and Continue** button:

<figure><img src="/files/ecqvb01PgD5mK6AZwUWv" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now, you can check the contents one by one and the rest of the settings.&#x20;

{% hint style="warning" %}
Please check each lesson, quiz, and assignment and their content one by one. **AI can make mistakes.** You can use individual **AI tools** in each lesson to improve text content and add relevant images.
{% endhint %}

<figure><img src="/files/6be1jFtRm8FLrEQ5LQfo" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Move to the Settings tab, and check the **course title, cover image, description,** and provide other relevant details (course category, level, duration, etc.):

<figure><img src="/files/iUkQXl0blOzn66I8sXSU" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
In this step, set pricing for the course on the Pricing tab and check the Course FAQs on the FAQ tab:

<figure><img src="/files/oY8ISm8ha6KFtnN1cxZH" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now the course is ready to be published. You can change the course status from Draft to Published:

<figure><img src="/files/MolxSydMUzWqRobWLvdU" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

Here is our **AI-generated** course:

<figure><img src="/files/wC9XovrvRcBFVg1L3Q4c" alt=""><figcaption></figcaption></figure>

## Improve Content with AI

In the **existing lessons and assignments**, you can find small **Generate with AI** ✨ buttons on each text field.&#x20;

{% hint style="success" %}
These buttons are **available** in **all** types of lessons and assignments.
{% endhint %}

<figure><img src="/files/dJVJrIIo2c1WjDa5Bkf6" alt=""><figcaption></figcaption></figure>

By clicking on them, you can get the **AI Text Generator** modals:

<figure><img src="/files/AwDhNgu9LqqGjPEbnDQE" alt=""><figcaption></figcaption></figure>

* **Prompt Input Field** – Describe what you need help writing. For example: “Write a blog intro about AI in education” or “Generate a course title on web development.” This is the main instruction that guides the AI. **The more specific and structured your prompt is, the better the generated content will match your expectations.**
* **Words Limit** – Sets the maximum length of the output text, in number of words. Use this to control how long the generated content should be.
* **Type** – Select the desired output format. Once you change the type, **Word Limit** will also change to the preferred amount automatically. But you can freely change it.
  * **Title** - generates short text designed to be used as a title for the lesson
  * **Paragraph** - generates a medium-sized text designed to be used as a paragraph along with other content
  * **Article** - generates long text designed to be used as a full article that covers the topic fully
* **Tone** – Choose the desired tone of voice for the content. Options includ*e Formal, Casual, Engaging, Professional, and Conversational.*
* **Language** - choose the text output language

{% hint style="success" %}
Once you provide the nice prompt and adjust the rest of the settings according to your needs, simply click on the ✨**Generate** button.
{% endhint %}

## Image Generation with AI

Images can be generated manually for the lesson contents, course cover image, or anywhere that accepts media via the [**Media File Manager**](/masterstudy-lms/lms-pro-addons/media-file-manager.md). So, make sure you have **enabled it.**

{% hint style="info" %}
**AI Lab** uses **OpenAI's** [**DALL·E** ](https://openai.com/index/dall-e/)models to generate images.
{% endhint %}

{% stepper %}
{% step %}
Go to the desired place and put the cursor where you want to add the AI-generated image:

<figure><img src="/files/PqD4jjBdi2QLA6QkdJjx" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click on the I**nsert Image** button from the **WYSIWYG** editor tools:

<figure><img src="/files/MUdykiwbWMjJZApHuJtr" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
In the **General** tab, click on the **Browse files** button:

<figure><img src="/files/W3gLiAmk6bQ3gzOnd9qp" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
On the opened pop-up, move to the **AI Generate** tab:

<figure><img src="/files/U5HDjIuuMRTrDmvsu3ai" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Describe the image you need in detail and choose the desired image style. Then simply click on the **Generate** button:

{% hint style="info" %}
It takes some time to generate an image. That's why do not close the tab and wait patiently.
{% endhint %}

<figure><img src="/files/04627oxgncRACdL4n6n3" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Based on the number of images you set in the[ **Addon Settings**](#ai-lab-addon-settings), AI Lab offers you several AI-generated images to select.&#x20;

{% tabs %}
{% tab title="1 Image Generated" %}

<figure><img src="/files/Pdl1PlSFf1HE8RsD7aGT" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="3 Images Generated" %}

<figure><img src="/files/KrGc57FgI4UaYz6y9g0u" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}
If you are not satisfied with the generated images, you can regenerate them or change the prompt. To use the image, click on the **Use Selected Image** button. It saves the image on your website and pastes it to the selected place:

<figure><img src="/files/IYhH2RwUNwhWd1uRO7GE" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

Following the same steps, you can generate the **Course Cover Image** with AI as well:

<figure><img src="/files/s7WjMwvW9ZgY01QxInm6" alt=""><figcaption><p>Course Builder > Settings > Main > Image</p></figcaption></figure>

## Craft Lessons with AI

You can apply the power of AI to your existing lessons to improve their content, or in any courses, you can simply add new lessons with AI.&#x20;

{% hint style="success" %}
A**I Lab** will generate the **lesson title, short description,** and the **main text-based lesson content**. It also **generates images** for better illustration upon request. &#x20;
{% endhint %}

{% stepper %}
{% step %}
Create any type of new lesson:

<figure><img src="/files/1bYo9aFrmaVnwTmt8ark" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
At the top of the lesson, there is a special section dedicated to creating lesson contents with AI. Click on Generate:

<figure><img src="/files/KDD4ExHvp3apUMNpXeNs" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
After that, this menu opens:

<figure><img src="/files/kdNQE1b2MFA0RsTS4zLi" alt=""><figcaption></figcaption></figure>

* **Prompt Input Field** – Provide a clear description of the lesson topic, target audience, key points, and any specific requirements or context. The AI will use this to generate the full lesson content. Additionally, describe the images you want to include as well.
* **Words Limit** – Set the maximum number of words for the AI-generated lesson. This helps control content length based on your needs.
* **Tone** – Choose the desired tone of voice for the content. Options includ*e Formal, Casual, Engaging, Professional, and Conversational.*
* **Images Limit** – Define how many images you want the AI to generate alongside the lesson. The **DALLE-3** model will be used to generate images.
* **Style** – Choose the appropriate image generation style.&#x20;
* **Language** - Choose the output language
* **Continue Manually** – If selected, it lets you skip AI generation and write the lesson manually.
  {% endstep %}

{% step %}
Write your prompt very carefully and in detail. Here is the example prompt:

> Generate a structured lesson script for a video titled “The Basics of Blockchain for Beginners.” The audience is university students with no prior experience in blockchain. The content should cover: what blockchain is, how it works, real-world use cases, and common misconceptions. Keep the tone formal, the style explanatory, and ensure that the script includes clear transitions and engaging explanations suitable for a 5-minute lesson video. Add one relevant image concept for visual aid.

Then, click on the ✨**Generate** button to proceed:

<figure><img src="/files/LZvYHzEgRtMpYmU2x6s3" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
It takes some time to generate the lesson. Do not close the tab and wait patiently:

<figure><img src="/files/HfBymTda0BXTEI0Utiaj" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
You got the success message with the contents generated.

{% hint style="info" %}
For **Audio, Video, Google Meet, Stream, and Zoom Lessons**, the rest of the content and lesson details should be provided **manually**.&#x20;
{% endhint %}

<figure><img src="/files/XdFWE0JGmQrAJtpDig4m" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now you can click on the **Create** button to add the lesson to the course:

<figure><img src="/files/QuqydjTtEVA4CFGtRISb" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Craft Quizzes with AI

Creating quizzes using AI Lab is also straightforward.

{% stepper %}
{% step %}
Create a new quiz or use the existing one. Inside the quiz, you will see the ✨**Generate Questions** button:

<figure><img src="/files/X6jnRKqFC00V3bpXibIp" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
You will see **Questions Generator**:

<figure><img src="/files/9hzpPJsvXafu1LcrisaF" alt=""><figcaption></figcaption></figure>

* **Prompt Input Field** – Describe the topic, audience level, key concepts, and any special focus areas. The clearer and more specific your instructions, the more relevant and accurate the generated questions will be.
* **Number of Questions** – Set how many quiz questions you want the AI to generate in one go.
* **Answers Limit** – Define the number of answer choices for each question (applies to formats like multiple or single choice).
* **Language** - Choose the output language
* **Preferred** [**Question Types**](/masterstudy-lms/lms-course-features/questions.md#question-types) – Select which types of questions should be included. Options are:
  * **Single Choice** – One correct answer from a list.
  * **Multiple Choice** – Multiple correct answers possible.
  * **True / False** – Binary statement-based questions.
  * **Item Match** – Matching items between two columns.
  * **Keywords** – Short-answer questions requiring a specific word or phrase.
  * **Fill in the Gap** – Questions with a blank that the student must complete.
  * <mark style="color:red;">**\***</mark>**Image Matching** – Generates *Item Match* questions where the answer options are AI-generated images instead of text.
  * <mark style="color:red;">**\***</mark>**Image Choice** – Generates *Multiple Choice* questions with AI-generated images used as answer options instead of text.

<mark style="color:red;">**\***</mark>*Please note that OpenAI has limitations on the number of image generation requests. If this limit is exceeded, the image will not be generated, and an error message will be displayed instead:*

<figure><img src="/files/mqqaR0huHutyp7lozVFC" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}

#### **IMPORTANT**

Saving quizzes that contain AI-generated images may take longer than usual. This is because the images need to be downloaded from OpenAI's servers during the saving process.

Generating images consumes API tokens, which may lead to faster usage of your token quota and result in additional costs if you're on a paid OpenAI plan. Use this feature mindfully, especially when generating multiple images at once.
{% endhint %}
{% endstep %}

{% step %}
Write your prompt in detail and adjust the rest of the setting. Then, proceed by clicking the Generate button. Here is the example prompt:

> Create 5 intermediate-level quiz questions on the topic of “Introduction to Artificial Intelligence.” Focus on key concepts such as machine learning, neural networks, supervised vs unsupervised learning, and AI applications in daily life. Include a variety of question types like multiple choice, fill-in-the-gap, and true/false. Each question should have up to 4 answer choices.

<figure><img src="/files/klHmjCsV52ngNMrlcxEk" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**AI Lab** provides a preview of the questions. If you are not satisfied, you can change the prompt or regenerate the response. If you are not satisfied with only one or two questions, you can accept the response, then manually modify it as well:

{% hint style="warning" %}
Pay attention to each generated question and answer. **AI can make mistakes.**
{% endhint %}

<figure><img src="/files/sunoWXPXiM4b6ga7ISPI" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Once you are done, you can save the settings, and that's it.

<figure><img src="/files/QDDYhjw6dz100oBoPpiT" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
**IMPORTANT!**

Be careful and check all the content generated by AI. Because **AI CAN MAKE MISTAKES.**
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stylemixthemes.com/masterstudy-lms/lms-pro-addons/ai-lab.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
