---
title: Display AI content labels
related:
  - https://docs.kentico.com/documentation/business-users/aira.md
  - https://docs.kentico.com/documentation/developers-and-admins/configuration/aira-configuration.md
  - https://docs.kentico.com/documentation/developers-and-admins/api/management-api/use-management-mcp-server.md
---

> **Documentation indexes**
> The indexes below list current page URLs with titles and descriptions. Links on this page point to the Markdown versions of the linked pages.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

Xperience records which fields of pages, emails, content items, and headless items contain content generated or modified by AI. Xperience sets the marking automatically when AIRA generates or refines content, editors can set or remove it in the administration, and AI agents can set it through the [Management MCP server](https://docs.kentico.com/documentation/developers-and-admins/api/management-api/use-management-mcp-server.md#ai-content-marking). The marking is the same regardless of its source. See [AI content marking](https://docs.kentico.com/documentation/business-users/aira.md#ai-content-marking).

Xperience can't recognize AI-generated text or images by itself. Content that editors create with AI tools outside Xperience and then add to a field stays unmarked until someone marks the field.

The marking is stored as machine-readable data with the content. Visitors of your website or users of your other channels don't see it unless your implementation displays it. This page describes how to retrieve the marking and use it to display labels.

> **Note:** **Disclosing AI content is your responsibility**\
> Xperience provides the marking, but it doesn't display AI labels to your audience or decide whether your content needs them. Regulations such as the EU AI Act, or other laws that apply in your region, may require you to disclose AI-generated or AI-modified content to the people who read it. Assess which requirements apply to your project and implement the labels accordingly. For an overview of the EU AI Act's transparency duties, see [EU AI Act transparency for your website](https://docs.kentico.com/guides/digital-marketing/work-with-content-governance/eu-ai-act-transparency.md).

## AI provenance data

Xperience stores the marking, also called _AI provenance_, separately for each field and language variant of an item. Each marked field has one of the following origins, represented by the `AiProvenanceOrigin` enumeration from the `CMS.ContentEngine` namespace:

- `AiGenerated` – the field's content was generated by AI.
- `AiModified` – content written by a person was modified by AI.

Fields without a marking have the `None` origin.

## Retrieve the marking

The AI provenance is not retrieved by default. Use the option that matches how you retrieve content:

- **Content item query** – call [WithAiProvenance](https://docs.kentico.com/documentation/developers-and-admins/api/content-item-api/reference-content-item-query.md#referencecontentitemquery-withaiprovenance) in the subquery parameters, and read the result using the [AI provenance extension methods](https://docs.kentico.com/documentation/developers-and-admins/api/content-item-api/reference-content-item-query.md#referencecontentitemquery-withaiprovenanceread).
- **ContentRetriever API** – call `WithAiProvenance` in the additional query configuration. See [Retrieve AI provenance](https://docs.kentico.com/documentation/developers-and-admins/api/content-item-api/content-retriever-api.md#retrieve-ai-provenance).
- **Headless channels** – query the `aiProvenance` sub-field of the `_system` field. See [AI content marking](https://docs.kentico.com/documentation/developers-and-admins/development/content-retrieval/retrieve-headless-content.md#ai-content-marking).
- **Page Builder and Email Builder widgets** – call `GetAiProvenanceOrigin` on the widget's property model. The widget needs to have the marking enabled. See [Enable AI content marking](https://docs.kentico.com/documentation/developers-and-admins/development/builders/page-builder/widgets-for-page-builder/widget-properties.md#enable-ai-content-marking) for Page Builder and [AI content marking for widget properties](https://docs.kentico.com/documentation/developers-and-admins/development/builders/email-builder/develop-email-builder-components.md#ai-content-marking-for-widget-properties) for Email Builder.
- **Page Builder Rich text widget** – override the partial view that renders the widget's content. See [Display labels for the Rich text widget](#display-labels-for-the-rich-text-widget).

## Display AI labels

The following example retrieves an article page with its AI provenance and passes the origin of the article's text to the view. The view displays a label above the text if the text is marked.

```csharp title="ArticleController.cs" highlight="14,21"
using System.Threading.Tasks;

using CMS.ContentEngine;
using Kentico.Content.Web.Mvc;
using Microsoft.AspNetCore.Mvc;

public class ArticleController(IContentRetriever contentRetriever) : Controller
{
    public async Task<IActionResult> Index()
    {
        var article = await contentRetriever.RetrieveCurrentPage<ArticlePage>(
            parameters: RetrieveCurrentPageParameters.Default,
            // Includes the AI provenance of the page's fields
            additionalQueryConfiguration: query => query.WithAiProvenance(),
            cacheSettings: new RetrievalCacheSettings(
                cacheItemNameSuffix: nameof(RetrieveCurrentPageQueryParameters.WithAiProvenance)));

        var model = new ArticleViewModel
        {
            Text = article.ArticleText,
            TextOrigin = article.GetAiProvenanceOrigin(nameof(ArticlePage.ArticleText))
        };

        return View(model);
    }
}
```

```csharp title="ArticleViewModel.cs"
using CMS.ContentEngine;

public class ArticleViewModel
{
    public string Text { get; init; }

    // AI origin of the 'ArticleText' field
    public AiProvenanceOrigin TextOrigin { get; init; }
}
```

```cshtml title="Index.cshtml"
@using CMS.ContentEngine
@model ArticleViewModel

@if (Model.TextOrigin != AiProvenanceOrigin.None)
{
    <p class="ai-label">
        @(Model.TextOrigin == AiProvenanceOrigin.AiGenerated ? "AI generated" : "AI modified")
    </p>
}
<div class="article-text">
    @Html.Raw(Model.Text)
</div>
```

The marking applies to the whole field, so place the label where it clearly relates to the field's content, for example, directly above or below it.

## Display labels for images

Files, such as images, are stored in _Content item asset_ fields of reusable content items. A page usually displays an image by linking the image's content item, so the marking belongs to a field of the linked item, not to a field of the page.

When you call `WithAiProvenance`, the query also retrieves the AI provenance of the linked items it loads. Include the linked items in the query, and then call `GetAiProvenanceOrigin` on the linked item with the name of its asset field:

```csharp title="Read the marking of a linked image"
using System.Linq;

using CMS.ContentEngine;
using Kentico.Content.Web.Mvc;

// ...

var article = await contentRetriever.RetrieveCurrentPage<ArticlePage>(
    parameters: new RetrieveCurrentPageParameters
    {
        // Includes the linked teaser image
        LinkedItemsMaxLevel = 1
    },
    // Includes the AI provenance of the page and of its linked items
    additionalQueryConfiguration: query => query.WithAiProvenance(),
    cacheSettings: new RetrievalCacheSettings(
        cacheItemNameSuffix: nameof(RetrieveCurrentPageQueryParameters.WithAiProvenance)));

Image? teaser = article.ArticleTeaser.FirstOrDefault();

// Gets the AI origin of the teaser's image file
AiProvenanceOrigin teaserOrigin =
    teaser?.GetAiProvenanceOrigin(nameof(Image.ImageFile))
    ?? AiProvenanceOrigin.None;
```

Display the label on the image or next to it, in the same way as for text.

## Display labels for the Rich text widget

Editors can mark the content of the system Page Builder _Rich text_ widget without any code in your project. On the live site, the widget renders its content through the `~/Views/Shared/Kentico/Widgets/RichText/_RichTextWidgetContent.cshtml` partial view. The view's model is `RichTextWidgetContentViewModel` from the `Kentico.Components.Web.Mvc.Widgets` namespace, with the following properties:

- `Html` – the sanitized HTML of the widget's content, with dynamic text resolved.
- `AiProvenanceOrigin` – the AI origin of the widget's content.

To display a label, add a partial view with the same path to your project. Your view replaces the default view, which renders only the content.

```cshtml title="~/Views/Shared/Kentico/Widgets/RichText/_RichTextWidgetContent.cshtml"
@using CMS.ContentEngine
@model Kentico.Components.Web.Mvc.Widgets.RichTextWidgetContentViewModel

@if (Model.AiProvenanceOrigin == AiProvenanceOrigin.AiGenerated)
{
    <p class="ai-label">This content was generated by AI.</p>
}
else if (Model.AiProvenanceOrigin == AiProvenanceOrigin.AiModified)
{
    <p class="ai-label">This content was modified by AI.</p>
}
@Html.Raw(Model.Html)
```

The partial view isn't used in Page Builder edit mode, where the widget displays the rich text inline editor.

## Limitations

Keep the following in mind when you rely on the marking:

- **Field-level marking** – the marking applies to the whole field, even if AI generated or modified only part of its content.
- **Supported fields** – the marking is available for fields that use the _Text input_, _Text area_, or _Rich text editor_ form component, for _Content item asset_ fields, and for fields that use a custom form component with the marking enabled. See [Enable AI content marking](https://docs.kentico.com/documentation/developers-and-admins/customization/extend-the-administration-interface/ui-form-components.md#enable-ai-content-marking).
- **No marking in the text itself** – Xperience doesn't embed watermarks or other markers into the text. If the text is copied or exported without the provenance data, for example, as plain text, the AI origin can't be detected from the text alone.
- **AI watermarks** – Xperience doesn't detect AI watermarks in uploaded images or in text, such as [C2PA content credentials](https://c2pa.org/) or [SynthID](https://deepmind.google/models/synthid/), and doesn't mark content based on them. Image processing, for example, image optimization or creating cropped and resized image variants, can also damage these watermarks in the delivered image. AIRA actions that change text, such as refinements, can damage watermarks in the text. AI-generated and AI-modified content needs to be marked manually by editors, or by an AI agent through the Management MCP server when the user states how the content was created.
- **Downstream systems** – systems that receive your content, such as external search indexes or integrations, keep the marking only if they retrieve and store the provenance data.
- **Manual markings** – Xperience can't verify the origin of content that editors mark manually, and doesn't record whether a marking was set by AIRA or by a person.
- **External AI tools** – Xperience can't recognize AI-generated text or images. Content created with AI tools outside Xperience is marked only if an editor marks it manually, if the AI agent that writes it through the Management MCP server declares it, or if your own code sets the marking when it creates or updates [content items](https://docs.kentico.com/api/content-management/content-items.md#mark-content-item-fields-as-ai-content), [content item assets](https://docs.kentico.com/api/content-management/content-items.md#mark-content-item-assets-as-ai-content), or [pages](https://docs.kentico.com/api/content-management/pages.md#mark-page-fields-as-ai-content).
