> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liveavatar.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create FULL Session Token

> Create session token for an API-key-authenticated user.

Minting a session token is only doable via an API key (``APIUserDep``) — a
session JWT (``SessionUser``) cannot mint a token for another participant.
HeyGen gateway identities mint through ``/heygen_session_token``.
This route only authenticates native API keys.

> [!TIP]
>
> Bringing your own agent? [Create a LITE session token](https://docs.liveavatar.com/api-reference/sessions/create-session-token.md) instead.


## OpenAPI

````yaml /openapi-full.json post /v1/sessions/token
openapi: 3.1.0
info:
  title: Live avatar API
  version: 0.1.0
servers:
  - url: https://api.liveavatar.com
security: []
paths:
  /v1/sessions/token:
    post:
      tags:
        - Sessions
      summary: Create Session Token
      description: >-
        Create session token for an API-key-authenticated user.


        Minting a session token is only doable via an API key (``APIUserDep``) —
        a

        session JWT (``SessionUser``) cannot mint a token for another
        participant.

        HeyGen gateway identities mint through ``/heygen_session_token``.

        This route only authenticates native API keys.
      operationId: create_session_token_v1_sessions_token_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FullSDKSessionTokenConfigDataSchema'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response_SDKSessionTokenSchema_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    FullSDKSessionTokenConfigDataSchema:
      properties:
        mode:
          type: string
          const: FULL
          title: Mode
          default: FULL
        avatar_id:
          type: string
          format: uuid
          title: Avatar Id
        is_sandbox:
          type: boolean
          title: Is Sandbox
          default: false
        video_settings:
          anyOf:
            - $ref: '#/components/schemas/VideoSettings'
            - type: 'null'
          description: Video encoding settings
        max_session_duration:
          title: Max Session Duration
          description: >-
            Maximum session duration in seconds. Must be <= the configured limit
            for your subscription tier.
          type: integer
        avatar_persona:
          anyOf:
            - $ref: '#/components/schemas/AvatarPersonaSchema'
            - type: 'null'
          description: >-
            Inline voice / context / voice_settings. Mutually exclusive with
            voice_agent.
          deprecated: true
        voice_agent:
          anyOf:
            - $ref: '#/components/schemas/VoiceAgentRef'
            - type: 'null'
          description: >-
            Reference a stored voice_agent by id; the server resolves its
            agent_type and builds the session accordingly (which per-session
            overrides apply depends on the type — see VoiceAgentRef). An
            elevenlabs_agent produces a LITE session even on this FULL request.
            Mutually exclusive with avatar_persona.
        interactivity_type:
          $ref: '#/components/schemas/SessionInteractivityTypeEnum'
          default: CONVERSATIONAL
        llm_configuration_id:
          title: Llm Configuration Id
          description: Optional custom LLM configuration ID
          type: string
          format: uuid
        dynamic_variables:
          title: Dynamic Variables
          description: >-
            Values for ${var} placeholders in the context's opening_text and
            prompt. Required keys are derived from the context; extra keys are
            ignored. At most 50 entries; keys <= 64 chars; values <= 1000 chars.
          additionalProperties:
            type: string
          type: object
        memory:
          anyOf:
            - $ref: '#/components/schemas/MemoryRef'
            - type: 'null'
          description: >-
            Attach session memory. Provide `prev_session_id` to seed/reuse from
            a prior session, `session_memory_id` to attach an existing memory,
            or both (must resolve to the same memory_id).
      type: object
      required:
        - avatar_id
      title: Full Mode
    Response_SDKSessionTokenSchema_:
      properties:
        code:
          type: integer
          title: Code
          default: 100
        data:
          anyOf:
            - $ref: '#/components/schemas/SDKSessionTokenSchema'
            - type: 'null'
        message:
          title: Message
          type: string
      type: object
      title: Response[SDKSessionTokenSchema]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VideoSettings:
      properties:
        quality:
          $ref: '#/components/schemas/VideoQualityEnum'
          default: high
        encoding:
          $ref: '#/components/schemas/VideoEncodingEnum'
          default: H264
      type: object
      title: VideoSettings
      description: Video encoding settings for session configuration
    AvatarPersonaSchema:
      properties:
        voice_id:
          title: Voice Id
          description: Voice ID. If empty use default avatar voice
          type: string
          format: uuid
        context_id:
          title: Context Id
          description: Context ID
          type: string
          format: uuid
        language:
          type: string
          title: Language
          description: Language
          default: en
        voice_settings:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ElevenLabsVoiceSettings'
                - $ref: '#/components/schemas/FishAudioVoiceSettings'
                - $ref: '#/components/schemas/CartesiaVoiceSettings'
              discriminator:
                propertyName: provider
                mapping:
                  cartesia: '#/components/schemas/CartesiaVoiceSettings'
                  elevenLabs: '#/components/schemas/ElevenLabsVoiceSettings'
                  fish: '#/components/schemas/FishAudioVoiceSettings'
            - type: 'null'
          title: Voice Settings
          description: >-
            Additional voice settings (provider-specific, discriminated by
            'provider' field)
        stt_config:
          anyOf:
            - $ref: '#/components/schemas/STTConfigSchema-Input'
            - type: 'null'
          description: ASR/STT configuration override
        llm_settings:
          anyOf:
            - $ref: '#/components/schemas/OpenAILLMSetting'
            - type: 'null'
          description: LLM selection (provider + model). None → the managed default model.
      type: object
      title: AvatarPersonaSchema
    VoiceAgentRef:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: >-
            Stored voice_agent id. Its server-resolved agent_type determines
            which of the override fields below are accepted.
        language:
          title: Language
          description: >-
            Per-session language override, layered over the agent's stored
            language. Accepted only for a liveavatar_agent; rejected with a 400
            for an elevenlabs_agent.
          type: string
        dynamic_variables:
          title: Dynamic Variables
          description: >-
            Per-session dynamic_variables override. Accepted only for a
            liveavatar_agent, where values must be strings (substituted as text
            into the context's ${var} placeholders; non-string values are
            rejected with a 400). Rejected with a 400 for an elevenlabs_agent.
            Mutually exclusive with the top-level dynamic_variables (400 if both
            set). At most 50 entries; keys <= 64 chars; string values <= 1000
            chars.
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: number
              - type: boolean
          type: object
      type: object
      required:
        - id
      title: VoiceAgentRef
      description: >-
        Reference to a stored voice_agent, plus optional per-session overrides.


        The caller passes only the agent ``id``; the server resolves the stored

        agent's ``agent_type`` and decides how the session is built. The
        override

        fields below are NOT universal — which ones are accepted depends on the

        resolved type, and an override that doesn't apply is rejected (400)
        rather

        than silently ignored:


        * ``liveavatar_agent`` (managed STT -> LLM -> TTS pipeline):
        ``language``
          and ``dynamic_variables`` are honored, layered over the stored agent's
          config for this session only.
        * ``elevenlabs_agent`` (ElevenLabs-hosted): the stored agent is used
        as-is;
          passing ``language`` or ``dynamic_variables`` is rejected with a 400.

        Overrides are per-session-at-creation choices, not properties of the
        stored

        agent — the same agent is reused across sessions with different values
        each

        time, and the resolved result is what gets frozen into the session
        snapshot.

        Shared across the SDK and app token requests.


        ``dynamic_variables`` is typed as the bounded union for
        forward-compatibility

        (a single wire type across agent types); the server narrows or rejects
        it per

        the resolved ``agent_type`` as described on the field.
    SessionInteractivityTypeEnum:
      type: string
      enum:
        - CONVERSATIONAL
        - PUSH_TO_TALK
      title: SessionInteractivityTypeEnum
    MemoryRef:
      properties:
        prev_session_id:
          title: Prev Session Id
          description: >-
            Seed memory from a prior FULL-mode session. Reused if a
            session-memory already exists for that session; otherwise
            sync-bootstrapped.
          type: string
          format: uuid
        session_memory_id:
          title: Session Memory Id
          description: >-
            Attach an existing session-typed memory by id (must belong to
            caller's space).
          type: string
          format: uuid
      type: object
      title: MemoryRef
      description: |-
        Session-memory attach request.

        Either field may be set. If both are set, they must resolve to the same
        memory_id; mismatch -> 400.
    SDKSessionTokenSchema:
      properties:
        session_id:
          type: string
          format: uuid
          title: Session Id
        session_token:
          type: string
          title: Session Token
      type: object
      required:
        - session_id
        - session_token
      title: SDKSessionTokenSchema
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          title: Message
          type: string
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    VideoQualityEnum:
      type: string
      enum:
        - very_high
        - high
        - medium
        - low
      title: VideoQualityEnum
    VideoEncodingEnum:
      type: string
      enum:
        - VP8
        - H264
      title: VideoEncodingEnum
    ElevenLabsVoiceSettings:
      properties:
        provider:
          type: string
          const: elevenLabs
          title: Provider
          default: elevenLabs
        speed:
          type: number
          maximum: 1.2
          minimum: 0.8
          title: Speed
          default: 1
        stability:
          type: number
          maximum: 1
          minimum: 0
          title: Stability
          default: 0.75
        similarity_boost:
          type: number
          maximum: 1
          minimum: 0
          title: Similarity Boost
          default: 0.75
        style:
          type: number
          maximum: 1
          minimum: 0
          title: Style
          default: 0
        use_speaker_boost:
          type: boolean
          title: Use Speaker Boost
          default: true
        model:
          $ref: '#/components/schemas/ElevenLabsModelEnum'
          description: >-
            ElevenLabs TTS model. 'eleven_flash_v2_5' (default, fastest),
            'eleven_multilingual_v2' (higher quality), 'eleven_v3',
            'eleven_v3_conversational' and 'eleven_v4_turbo' (most expressive;
            these honor only 'stability' from the voice settings).
          default: eleven_flash_v2_5
        apply_language_text_normalization:
          type: boolean
          title: Apply Language Text Normalization
          description: >-
            Apply ElevenLabs language-specific text normalization. Improves
            pronunciation for languages with complex orthography — currently
            only Japanese ('ja') is supported. Enabling this adds latency, so it
            is opt-in and only valid when the session language is set to 'ja'.
          default: false
      type: object
      title: ElevenLabsVoiceSettings
      description: ElevenLabs-specific voice settings for TTS configuration.
    FishAudioVoiceSettings:
      properties:
        provider:
          type: string
          const: fish
          title: Provider
          default: fish
        speed:
          type: number
          maximum: 1.2
          minimum: 0.8
          title: Speed
          default: 1
        model:
          $ref: '#/components/schemas/FishAudioModelEnum'
          description: Fish Audio TTS model.
          default: s2.1-pro
        latency_mode:
          type: string
          enum:
            - normal
            - balanced
            - low
          title: Latency Mode
          description: >-
            Latency mode: 'normal' (best quality), 'balanced', or 'low' (lowest
            latency).
          default: balanced
      type: object
      title: FishAudioVoiceSettings
      description: Fish Audio-specific voice settings for TTS configuration.
    CartesiaVoiceSettings:
      properties:
        provider:
          type: string
          const: cartesia
          title: Provider
          default: cartesia
        speed:
          type: number
          maximum: 1.5
          minimum: 0.6
          title: Speed
          default: 1
        model:
          $ref: '#/components/schemas/CartesiaModelEnum'
          description: Cartesia TTS model.
          default: sonic-3.6
      type: object
      title: CartesiaVoiceSettings
      description: Cartesia-specific voice settings for TTS configuration.
    STTConfigSchema-Input:
      properties:
        provider:
          $ref: '#/components/schemas/STTProviderEnum'
          description: STT provider. Auto-selected if not specified.
      type: object
      required:
        - provider
      title: STTConfigSchema
      description: User-provided STT configuration for sessions.
    OpenAILLMSetting:
      properties:
        provider:
          type: string
          const: openai
          title: Provider
          default: openai
        model:
          $ref: '#/components/schemas/OpenAIModelEnum'
          default: gpt-5.4-nano
      type: object
      title: OpenAILLMSetting
    ElevenLabsModelEnum:
      type: string
      enum:
        - eleven_flash_v2_5
        - eleven_multilingual_v2
        - eleven_v3
        - eleven_v3_conversational
        - eleven_v4_turbo
      title: ElevenLabsModelEnum
    FishAudioModelEnum:
      type: string
      enum:
        - s1
        - s2
        - s2-pro
        - s2.1-pro
      title: FishAudioModelEnum
    CartesiaModelEnum:
      type: string
      enum:
        - sonic-3.6
        - sonic-3.5
        - sonic-3
        - sonic-2
        - sonic-turbo
      title: CartesiaModelEnum
    STTProviderEnum:
      type: string
      enum:
        - deepgram
        - assembly_ai
        - gladia
        - elevenlabs
      title: STTProviderEnum
    OpenAIModelEnum:
      type: string
      enum:
        - gpt-4o
        - gpt-4o-mini
        - gpt-5-nano
        - gpt-5.4-nano
      title: OpenAIModelEnum
      description: Recommended OpenAI chat models selectable for the FULL pipeline.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.