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

# Get Webrtc Token

> Get a WebRTC session token for real-time communication.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/convai/conversation/token
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/conversation/token:
    get:
      tags:
        - Agents Platform
      summary: Get Webrtc Token
      description: Get a WebRTC session token for real-time communication.
      operationId: get_livekit_token
      parameters:
        - name: agent_id
          in: query
          required: true
          schema:
            type: string
            description: >-
              Agent id (agent_…) or speech engine external id (seng_), resolved
              to the same underlying resource.
            examples:
              - agent_3701k3ttaq12ewp8b7qv5rfyszkz
              - seng_3701k3ttaq12ewp8b7qv5rfyszkz
            title: Agent Id
          description: >-
            Agent id (agent_…) or speech engine external id (seng_), resolved to
            the same underlying resource.
        - name: participant_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Optional custom participant name. If not provided, user ID will be
              used
            title: Participant Name
          description: >-
            Optional custom participant name. If not provided, user ID will be
            used
        - name: branch_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The ID of the branch to use
            title: Branch Id
          description: The ID of the branch to use
        - name: environment
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              The environment to use for resolving environment variables (e.g.
              'production', 'staging'). Defaults to 'production'.
            title: Environment
          description: >-
            The environment to use for resolving environment variables (e.g.
            'production', 'staging'). Defaults to 'production'.
        - name: debug_events_request
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Whether to enable debug events. Only available for users with
              editor access to the agent.
            default: false
            title: Debug Events Request
          description: >-
            Whether to enable debug events. Only available for users with editor
            access to the agent.
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TokenResponseModel:
      properties:
        token:
          type: string
          title: Token
        conversation_id:
          type: string
          title: Conversation Id
      type: object
      required:
        - token
        - conversation_id
      title: TokenResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````