Documentation menu

Docs

Bring your own AI key

Chat mode runs on your AI account, not ours. You choose the provider and the model, you see the bill, and you can change either without touching your website.

Supported providers

Everything is called through the OpenAI-compatible chat-completions API, so anything that speaks it works — including a model you host yourself.

ProviderEndpointDefault modelKey looks like
OpenAIhttps://api.openai.com/v1gpt-4o-minisk-...
Google Geminihttps://generativelanguage.googleapis.com/v1beta/openaigemini-3.5-flash-liteAIza... or AQ...
OpenRouter (many models)https://openrouter.ai/api/v1openai/gpt-4o-minisk-or-...
Custom (OpenAI-compatible endpoint)your own https:// URLyou name ityour API key

Leave the model blank and the provider's default above is used. The dashboard suggests the models we have tested (gpt-4o-mini, gpt-4o, gpt-4.1-mini for OpenAI, gemini-3.5-flash-lite, gemini-3.8-flash, gemini-4-hydrogen for Gemini), but any model name your account can reach is accepted.

Custom endpoints must be public HTTPS. Plain http://, localhost, and private ranges (10.x, 172.16–31.x, 192.168.x, 169.254.x, .internal, .local) are refused — our server calls that URL with your key, so it must not be able to be pointed at something inside a network.

What we do with the key

  • Encrypted before it is stored. AES-256-GCM — an authenticated cipher — with a fresh random initialisation vector per key. The encryption key lives in the server environment, not in the database next to the data it protects.
  • Never returned. Not to a visitor, not to you. The dashboard is told true or false for “is a key saved”, and nothing else. You can replace it; you cannot read it back.
  • Decrypted only to make the call. On each chat request the key is decrypted in memory, used as the Authorization header to your provider, and dropped. It never reaches a browser, so it is not in your page source and not in a network tab.
  • Never shown in the widget. Only your publishable key (pk_live_…) is in the page, and that one is locked to your domains.

The full picture, including what we deliberately do not store, is on Security.

Who pays

You do, directly to your provider. We never charge you for tokens and never mark them up, because your key is billed by OpenAI, Google or OpenRouter, not by us. Our subscription pays for the character, the runtime and the delivery — see pricing.

What that means in practice: pick a small, fast model. A support conversation is a handful of short turns, and a cheap model answering in half a second beats an expensive one answering in four — the character is standing there waiting either way.

Set a spending limit at your provider. Your embed key is locked to your domains, which stops the obvious abuse, but a budget cap on the provider's side is the control that cannot be argued with. Every provider above offers one.

The persona prompt

Your character's persona is sent as the system message on every request. It stays on our server: it is never included in anything the browser receives, so a visitor cannot read your instructions out of the page.

What the chat endpoint returns

You do not have to call it — the widget does — but it is worth knowing the shape. Replies are streamed as NDJSON: one JSON object per line, content fragments as they arrive, then a single emotion line that sets the face.

POST /api/chat
POST https://live2d.noiselimited.com/api/chat
Content-Type: application/json

{"embedKey":"pk_live_your_key","messages":[{"role":"user","content":"Do you ship to Japan?"}]}

--- response: application/x-ndjson, one JSON object per line ---
{"content":"Yes"}
{"content":" — we ship"}
{"content":" to Japan in 3–5 days."}
{"emotion":"happy"}

The request is only accepted from a domain registered against that embed key. Up to 50 messages of history are accepted, each up to 8,000 characters; the widget sends the last 20.

Check it before you ship

The character's Settings page has a Test button that sends one tiny request with your saved key and reports back the model, the round-trip time and the reply — or the provider's own error message, which is usually the fastest way to learn that a key has expired or a model name is wrong.