Create a session token
Mints a session token that your page or app can start one Nuance Live conversation with. Call it from your server with an API key, never from a browser. What you send here (the interface and its setup, the personality and your id for the person) is fixed for the conversation the token creates.
apiKeyAuthorizationBearer <token>An API key from your organization's API keys page on the platform, nk_…. Server only.
application/json- body
What the conversation the token creates will be, and who it is for. Send end_user_id with every token; leave the other fields out for the defaults.
personality?|Who the persona is in the conversation, fixed for its whole life. Leave it out for the default personality.
end_user_id?|Your own id for the person the conversation is for, such as a hash of your user id. Repeated policy violations then pause new conversations for this person only. Letters, digits and _ . : -, up to 128 characters; never an email address or a name.
interface?|nuance_live, the default, so you can leave it out.
interface_setup?|A Nuance Live session's own settings. See Set up a session.
expressiveness?|How much the persona's face and head move, from 0 to 2: lower is calmer, higher more expressive. Leave it out for 1, the persona's own tuned level. A value outside 0 to 2 is refused with 422.
Successful Response
application/json- response
A session token to hand to your page.
token*stringThe session token, st_…, for your page or app to create the conversation with.
expires_at*stringWhen the token stops being able to start a conversation (UTC). Once it has started one, it lasts as long as that conversation.
date-timewarnings*array<string>What to change in how you mint tokens; empty when nothing. Without end_user_id, it says that policy pauses count against all your organization's conversations without one.
curl -X POST 'https://api.nuancelabs.ai/session-tokens' \ -H 'Content-Type: application/json' \ -d '{}'{ "token": "string", "expires_at": "2019-08-24T14:15:22Z", "warnings": [ "string" ]}API overview
The routes your server and your page or app call to run a conversation.
Get a transcript GET
What the person and the AI persona said in a conversation, turn by turn, with each word's time. It is ready shortly after the conversation ends; until then the response is `null`. Reaches only your organization's conversations: another's answers 404.