{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nuance-labs/json-schema/nuance-labs-create-session-token-request-schema.json",
  "title": "CreateSessionTokenRequest",
  "description": "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.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nuance-labs-openapi.yml#/components/schemas/CreateSessionTokenRequest",
  "type": "object",
  "properties": {
    "personality": {
      "anyOf": [
        {
          "$ref": "#/$defs/PersonalityChoice"
        },
        {
          "type": "null"
        }
      ],
      "description": "Who the persona is in the conversation, fixed for its whole life. Leave it out for the default personality."
    },
    "end_user_id": {
      "anyOf": [
        {
          "pattern": "^[A-Za-z0-9_.:\\-]{1,128}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "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": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "`nuance_live`, the default, so you can leave it out."
    },
    "interface_setup": {
      "anyOf": [
        {
          "$ref": "#/$defs/InterfaceSetup"
        },
        {
          "type": "null"
        }
      ],
      "description": "A Nuance Live session's own settings. See [Set up a session](/setup)."
    },
    "expressiveness": {
      "anyOf": [
        {
          "maximum": 2,
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "description": "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`."
    }
  },
  "$defs": {
    "InterfaceSetup": {
      "type": "object",
      "description": "What you settle about a Nuance Live session. Any other key is refused with `422` `interface_setup`.",
      "properties": {
        "delegation": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "description": "Who does the work the persona hands off: `{\"type\": \"client\"}`, the default, `{\"type\": \"responses\", \"responses\": {…}}` for a backend that calls your tools, or `{\"type\": \"none\"}` for nobody. See [Delegation and tools](/delegation)."
        },
        "video": {
          "anyOf": [
            {
              "$ref": "#/$defs/InterfaceVideo"
            },
            {
              "type": "null"
            }
          ],
          "description": "`{\"input\": {\"camera\": false}}` keeps the persona from using the user's camera."
        },
        "runtime_tools": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "description": "The persona's own tools, each `true` or `false`: `stay_quiet` (on by default), `end_call` and `call_time` (off by default). See [the persona's own tools](/setup#the-personas-own-tools)."
        }
      }
    },
    "InterfaceVideo": {
      "type": "object",
      "description": "The user's camera in a Nuance Live session.",
      "properties": {
        "input": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "description": "`{\"camera\": false}` keeps the persona from using the camera your page publishes. Left out, the persona uses it."
        }
      }
    },
    "PersonalityChoice": {
      "type": "object",
      "description": "Who the AI persona is in a conversation.",
      "properties": {
        "system_prompt": {
          "anyOf": [
            {
              "maxLength": 64000,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Your own prompt, in plain text: who the persona is, where it works, what it knows about the person and the situation. Give the persona a name in it: it has none otherwise."
        },
        "persona_id": {
          "anyOf": [
            {
              "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Who the persona looks and sounds like: `sam`, `sonia` or `mira` ([Personas](/personas) shows each). Left out, `sam`. Any other id is refused with a `400`."
        }
      }
    }
  }
}