Skip to main content

Install

Import from the Vue 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 composable

useKioskSession is the core primitive. Use it when you need full control over the chat UI.

Composable return values

Drop-in components

For most use cases the pre-built components are the fastest path.

<KioskChat>

<KioskVoice>

Both components emit the same events as their React counterparts: open, close, message, response, error, status-change.

Advanced topics

The Humain SDK uses browser APIs (WebSocket, WebRTC). In Nuxt, restrict these components to client-side rendering:
Or use the .client.vue file naming convention to mark the entire component as client-only — Nuxt will not attempt to SSR it.For credentials, store your live token in .env and access it via useRuntimeConfig(). Do not expose live credentials in NUXT_PUBLIC_* variables.
To share session state across multiple components, store the session in a Pinia store:
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.