Client integration example
Embed Kiia explanations in any website.
This static sample shows the smallest production-ready integration: load the Kiia script,
provide a container, and call Kiia.explain() with a topic and widget key.
Live demo
Generate an explanation
Replace YOUR_KIIA_WIDGET_KEY with your assigned Kiia widget key to run the demo.
Minimal integration
Copy this into your site
<script src="https://kiia.ai/embed/kiia.js"></script>
<div id="kiia-container"></div>
<script>
const EXPLANATION_TYPES = {
fast: 1,
thinking: 2,
depth: 3
};
Kiia.explain("binary search", {
key: "YOUR_KIIA_WIDGET_KEY",
container: "#kiia-container",
type: EXPLANATION_TYPES.fast,
onReady: function () {
console.log("Kiia explanation ready");
},
onError: function (error) {
console.error("Kiia error", error);
}
});
</script>