Use a browser-safe public key, authorize your exact or wildcard domains, and choose avatar mode, text mode, or both. Your private AI brain remains behind Atina's gateway.
3D avatar:
https://www.atina.comfylearnhub.com/atina-embed/assets/index-bc07bc84.js
Text SDK:
https://www.atina.comfylearnhub.com/atina-embed-sdk/atina-sdk.js
public_key is required. The SDK sends it with the browser origin to create a temporary session token after your domain is validated.
<script>
window.ATINA_CONTEXT = {
public_key: "atina_pk_live_your_public_key",
external_user_id: "optional-user-id-from-your-app",
mode: "text"
};
</script>
<div id="atina-root" style="height: 620px"></div>
<link rel="stylesheet" href="https://www.atina.comfylearnhub.com/atina-embed/assets/index-5b0ac9c0.css">
<script type="module" src="https://www.atina.comfylearnhub.com/atina-embed/assets/index-bc07bc84.js"></script>
<div id="atina-text-root"></div>
<div class="my-atina-history"></div>
<link rel="stylesheet" href="https://www.atina.comfylearnhub.com/atina-embed-sdk/atina-sdk.css">
<script src="https://www.atina.comfylearnhub.com/atina-embed-sdk/atina-sdk.js"></script>
<script>
window.AtinaEvents.registerCallbacks([
function (event) {
console.log("Atina conversation updated", event.conversation_id);
}
]);
window.AtinaSDK.mountChatHistory(".my-atina-history");
</script>
The SDK starts in window.ATINA_CONTEXT.mode when provided. You can also switch modes from your own button or menu.
<button id="atinaModeToggle">Toggle Atina Mode</button>
<button onclick="window.AtinaSDK.setMode('text')">Text</button>
<button onclick="window.AtinaSDK.setMode('avatar')">Avatar</button>
<script>
document.getElementById("atinaModeToggle").addEventListener("click", function () {
window.AtinaSDK.toggleMode();
});
</script>
atina_pk_live_ public keys.Choose your frontend, copy or download the starter, then replace atina_pk_live_your_public_key with your own public key.
Paste your public key, choose a mode, and try the CDN setup from this page. Without a valid key and authorized domain, the widget loads but requests are rejected.
Atina App
Install Atina for a focused, full-screen experience with faster access to your AI companion.
No download store. No extra sign in.