Skip to main content

Install

Import from the Svelte sub-package:
During development, issue an hk_test_ credential from the admin panel instead of a live hk_live_ one. Sandbox is a property of the credential, not a different base URL — you call the same https://api.humain.ai host either way. Sandbox sessions don’t consume production LLM credits and aren’t billed. See Sandbox mode.

The store

createKioskStore returns a Svelte-compatible readable store with session state and methods.

Store shape

Drop-in components

<KioskChat>

<KioskVoice>

Advanced topics

Svelte components that use createKioskStore or browser APIs cannot run during server-side rendering. Wrap them in a dynamic import with ssr: false:
Or use SvelteKit’s browser guard:
Never expose live credentials in client-side code. Your hk_live_… token is a long-lived secret. In browser environments, either proxy API calls through your own server or issue an hk_test_… (sandbox) credential instead for public-facing demos. Treat it like a password.