Skip to main content
POST

Authorizations

Authorization
string
header
required

Device credential issued from the Humain admin panel under Kiosk → Credentials → Issue new credential.

Format: hk_live_ (production) or hk_test_ (sandbox) followed by 43 base64url characters (32 random bytes). The raw token is shown only once at creation time and is never stored in plain text.

Body

application/json
mode
enum<string>
required

The session interaction mode.

  • text — REST + WebSocket messaging
  • voice — WebRTC real-time audio
  • voip — SIP telephony bridge
Available options:
text,
voice,
voip
preferred_language
string

BCP-47 language code for this session (e.g. "tr", "ar", "de"). The server uses the matching language persona if one is configured on the kiosk. Falls back to the kiosk's default language if no match is found. Omit to use the kiosk's default.

Example:

"tr"

conversation_initiation_data
object

Optional structured data attached to the session at open time.

Response

Session created

session_id
string<uuid>

Unique session identifier — pass this to all subsequent calls.

agent_url
string<uri>

Base URL for every real-time call on this session — the WebSocket (GET {agent_url}/v1/sessions/{sid}/ws), WebRTC signalling (POST {agent_url}/v1/sessions/{sid}/webrtc/offer and .../ice), and POST {agent_url}/v1/sessions/{sid}/end. Do not assume it equals the host that served this request. Treat it as opaque — in most deployments it is the same public API host behind a reverse proxy.

Example:

"https://api.humain.ai"

detected_language
string

Currently just echoes the preferred_language you sent — the server does not yet perform real language detection. Omitted if preferred_language was not sent.

Example:

"tr"

disclosure_text
string

Reserved for a forthcoming EU AI Act disclosure feature. Not yet populated by the server — always omitted from the response today. Do not build a UI that depends on this field appearing.

ice_servers
object[]

TURN/STUN server credentials, present only when TURN relay is configured for this workspace. Pass directly to RTCPeerConnection's iceServers config.