Skip to content

Badge Widget

<certivu-badge> is a framework-free web component that renders a live provenance badge for a signed token. It reads the public status endpoint and self-updates — no account, no SDK, no build step for the publisher.

The badge reports what the status endpoint returns. It never claims that unsigned content is human-made, and never claims to detect AI content — it only surfaces signed provenance when present.

<script src="https://cdn.certivu.ai/integrations/badge.js" defer></script>
<certivu-badge token="ctv_7f3kx9mq2..."></certivu-badge>

That’s it. The element fetches the token’s status and renders a pill: ✓ Verified by Certivu when the record is valid and its generator is active, or a neutral “Provenance not found” / “Unable to verify” state otherwise. Clicking the badge opens a panel with the organization, model, and signing time.

Terminal window
npm install @certivu/badge
import "@certivu/badge"; // self-registers the <certivu-badge> element
AttributeRequiredDefaultDescription
tokenyesThe ctv_… token to look up.
api-basenohttps://api.certivu.aiOverride for self-hosted or sandbox lookups.
variantnocompactcompact or full.

The badge exposes CSS custom properties on the host element:

<certivu-badge
token="ctv_..."
style="
--certivu-badge-bg: #1E1C2C;
--certivu-badge-fg: #D8D0E8;
--certivu-badge-accent: #3DD68C;
--certivu-badge-radius: 6px;
"
></certivu-badge>

It uses Shadow DOM, so its styles never leak into or out of your page.