Docs / label.js

Label AI content with label.js

label.js adds a standard "AI-generated" label to the text and images you mark on your website, and keeps a public record of each one.

Early access: labels appear once we've activated your site. After you've verified it (step 2), request it with Request activation next to your site in the dashboard.

1. Add your site

Sign up (free, no card) and create a project. Then open the project, go to Content labeling and add your site's hostname. Use exactly what your browser's address bar shows, for example www.example.com.

2. Paste the script tag

Copy the script tag from the dashboard (Show setup) and paste it into the <head> of every page. Publish your site, then click Check verification.

<script src="https://cdn.disclarion.com/v1/label.js" data-site="site_YOUR_SITE_CODE" async></script>

Not sure where to paste it? See the platform guides for WordPress, Webflow, Squarespace and others.

3. Mark your AI content

Add data-disclarion="ai-generated" to the element that holds the AI text, or to the image itself. Put only the AI-written text inside it.

<div data-disclarion="ai-generated">
  <p>A relaxed linen shirt in a warm sand tone, cut for hot days.</p>
</div>

<img src="https://www.example.com/images/hero.png" alt="Linen shirt"
     data-disclarion="ai-generated">

Use ai-assisted instead if a person edited the content; the label then reads "AI-modified". You can also name the model, for example data-disclarion-model="gpt-image-1"; it then appears on the label's public record.

More on what to put inside the marked element, and on images: Marking content.

4. Check it

Reload your page: a small "AI-generated" label appears on each marked item. In the dashboard, the item appears under Labeled content, first as Pending, then as Verified.

If nothing appears, check that your site shows Active since a date in the dashboard.

Good to know

This is an AI-powered assistant.