Docs
Security and privacy for developers
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'sOriginheader 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.
Every request the widget makes
| Request | When | What it carries |
|---|---|---|
| POST /api/embed/validate | on load | Your embed key and the page's origin. Answers yes or no. Nothing about the visitor. |
| GET /api/embed/config | on load | Your 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 needed | Your embed key, then a redirect to a short-lived signed link for the character file. |
| POST /api/chat | per message, chat mode only | The conversation so far (the last 20 turns) and your embed key. The reply streams back. We do not store the messages. |
| POST /api/analytics | conversation start, message sent | A 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.
Loading behind a consent banner
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.
// 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.