Documentation menu

Docs

Security and privacy for developers

You are putting our script on your website, so you should know exactly what it does. This page is the developer-facing version; Security covers how we run the service, and the Privacy Policy is the legal one.

Two kinds of key

  • Your publishable key (pk_live_…) is public. It is in your page source and that is fine: it only works from the domains you registered. Both the key and the browser's Origin header are checked on every request, including the character download.
  • Your AI provider key is secret and never leaves our server. It is encrypted at rest with AES-256-GCM, decrypted in memory only to call your provider, and never returned to any browser — including yours. See Bring your own AI key.
If your embed key ever appears on a domain you do not control, the fix is to remove that domain from the allow list — not to rotate the key. The allow list is the control.

Every request the widget makes

RequestWhenWhat it carries
POST /api/embed/validateon loadYour embed key and the page's origin. Answers yes or no. Nothing about the visitor.
GET /api/embed/configon loadYour embed key. Answers with the character's display name, model URL, style and poster — never the persona prompt, the AI key or your allowed domains.
GET /api/models/…when the 3D character is first neededYour embed key, then a redirect to a short-lived signed link for the character file.
POST /api/chatper message, chat mode onlyThe conversation so far (the last 20 turns) and your embed key. The reply streams back. We do not store the messages.
POST /api/analyticsconversation start, message sentA beacon with the event name, your embed key, the page's hostname and a message count. No message text, no visitor identifier.

Everything goes to our origin. Your visitors' messages reach your AI provider from our server, with your key — so the provider you choose is the one that sees them. That choice is a privacy decision as much as a cost one.

What the widget does in the browser

  • No cookies. No local storage. The widget sets neither, so it adds nothing to your cookie banner on its own account. The conversation lives in memory and is gone when the tab closes.
  • Closed shadow DOM. Our CSS cannot reach your page and yours cannot reach ours. Your scripts cannot read inside the widget either.
  • One global. window.nikoori, plus the element <nikoori-widget> on <body>. Nothing else is added to your page.
  • No third-party calls. The widget talks to our origin only; no analytics vendor, no ad network, no font CDN.

The widget contacts our server as soon as it runs, so if your consent regime requires that nothing happens before acceptance, do not put the tag in your HTML — insert it when consent is given.

Consent-gated loading
// Only add the script once the visitor has accepted.
function loadNikoori() {
  if (document.getElementById("nikoori-embed")) return;
  var s = document.createElement("script");
  s.id = "nikoori-embed";
  s.src = "https://live2d.noiselimited.com/v1/nikoori.js";
  s.async = true;
  s.dataset.key = "pk_live_your_key";
  document.body.appendChild(s);
}

// And to remove it again if consent is withdrawn:
function unloadNikoori() {
  window.nikoori?.destroy();
  document.getElementById("nikoori-embed")?.remove();
}

What to tell your visitors

You are the data controller for what your visitors type; we process it for you, and so does your AI provider. Practically, that means naming both in your own privacy notice. Our Data Processing Addendum is written for exactly that, and the list of who can see what is in the Privacy Policy.

A short version you can adapt: “Our chat assistant is provided by Nikoori (Noise Limited, Hong Kong). Messages you type are sent to Nikoori and to our AI provider to generate a reply. Nikoori does not store the conversation.”

Content Security Policy

If your site sends a CSP, the widget needs a few allowances — the exact directives are on Troubleshooting, together with the one strict setting we cannot yet work around.

Reporting something

Found a vulnerability in the widget or an endpoint? Email security@nikoori.com. We would much rather hear it from you than read about it. Please do not run automated scans against customer sites.