Skip to main content

What is the sandbox?

Sandbox is a property of the credential, not a different environment or base URL. Every credential is issued as either hk_live_… (production) or hk_test_… (sandbox); both work against the exact same https://api.humain.ai host and the exact same endpoints.
There is no separate sandbox base URL. If you’ve seen sandbox.api.humain.ai referenced elsewhere, that’s stale — always call https://api.humain.ai and control sandbox behavior by which credential you use.
Authentication-level checks run identically for both credential types — an inactive kiosk or a FraudGuard-blocked credential is rejected the same way whether the token is hk_live_ or hk_test_. What differs is what happens inside a session opened with a sandbox credential.

Issuing a sandbox credential

In the admin panel, when you issue a new credential under Kiosk → Credentials, choose Sandbox instead of Live. This mints an hk_test_… token rather than hk_live_… — everything else about the issuance flow is identical.

What happens in a sandbox session

Sandbox sessions skip the turn pipeline entirely for the conversational content — there is no LLM call, and critically, no per-turn guardrail or FraudGuard check runs either, since those checks live inside the same pipeline step that’s being skipped. Don’t rely on the sandbox to validate your guardrail configuration.

Text sessions

A sandbox text session echoes your message back verbatim over the WebSocket — no LLM call, no guardrail pipeline, no usage event:

Voice sessions

A sandbox voice session still runs the full WebRTC pipeline — ICE negotiation, DTLS handshake, and Opus audio transport all function normally, including the control data channel. Instead of reaching Gemini Live, the server runs a record → beep → echo loop: it plays a short tone, records your speech, and plays it back to you. This lets you verify your WebRTC signalling, audio routing, and VoiceStatus state machine without consuming any AI credits.

What is and isn’t simulated

Because guardrails don’t run against the echoed content, you cannot use the sandbox to test whether a specific input would be blocked. To test guardrail behavior, use a live credential in a low-traffic testing kiosk instead.

Switching credentials in code

Centralise the credential in one place so switching between sandbox and production is a one-line change — the base URL never changes.
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.