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

# Create Speech-to-Video Session

> Create speech-to-video session.

Tip: do not to use this directly, use the LiveKit plugin instead. https://docs.livekit.io/agents/integrations/avatar/bey



## OpenAPI

````yaml /openapi.json post /v1/sessions
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v1/sessions:
    post:
      tags:
        - Sessions
      summary: Create Speech-to-Video Session
      description: >-
        Create speech-to-video session.


        Tip: do not to use this directly, use the LiveKit plugin instead.
        https://docs.livekit.io/agents/integrations/avatar/bey
      operationId: create_session_v1_sessions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSessionRequest'
        required: true
      responses:
        '201':
          description: Created LiveKit Audio-to-Video Session with ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CreateSessionRequest:
      anyOf:
        - $ref: '#/components/schemas/CreateLivekitSessionRequest'
        - $ref: '#/components/schemas/CreatePipecatSessionRequest'
    SessionResponse:
      oneOf:
        - $ref: '#/components/schemas/LivekitSessionResponse'
        - $ref: '#/components/schemas/PipecatSessionResponse'
      discriminator:
        propertyName: transport
        mapping:
          livekit:
            $ref: '#/components/schemas/LivekitSessionResponse'
          pipecat:
            $ref: '#/components/schemas/PipecatSessionResponse'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreateLivekitSessionRequest:
      properties:
        transport:
          type: string
          const: livekit
          title: Transport
          default: livekit
        avatar_id:
          type: string
          title: Avatar Id
          description: ID of avatar to use.
          examples:
            - 01234567-89ab-cdef-0123-456789abcdef
        url:
          type: string
          title: Url
          description: URL of LiveKit server the avatar worker should connect to.
          examples:
            - wss://<your-domain>.livekit.cloud
        token:
          type: string
          format: password
          title: Token
          description: The token used to join your LiveKit room.
          writeOnly: true
          examples:
            - <your-livekit-token>
      type: object
      required:
        - avatar_id
        - url
        - token
      title: CreateLivekitSessionRequest
      description: Request body to create a LiveKit speech-to-video session.
    CreatePipecatSessionRequest:
      properties:
        transport:
          type: string
          const: pipecat
          title: Transport
          default: pipecat
        avatar_id:
          type: string
          title: Avatar Id
          description: ID of avatar to use.
          examples:
            - 01234567-89ab-cdef-0123-456789abcdef
        url:
          type: string
          title: Url
          description: URL of Daily room the video bot should connect to.
          examples:
            - wss://<your-domain>.pipecat.cloud
        token:
          type: string
          format: password
          title: Token
          description: The token used to join your Daily room.
          writeOnly: true
          examples:
            - <your-pipecat-token>
      type: object
      required:
        - avatar_id
        - url
        - token
      title: CreatePipecatSessionRequest
      description: Request body to create a Pipecat speech-to-video session.
    LivekitSessionResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the object in the database.
          examples:
            - 01234567-89ab-cdef-0123-456789abcdef
        transport:
          type: string
          const: livekit
          title: Transport
          default: livekit
        avatar_id:
          type: string
          title: Avatar Id
          description: ID of avatar to use.
          examples:
            - 01234567-89ab-cdef-0123-456789abcdef
        url:
          type: string
          title: Url
          description: URL of LiveKit server the avatar worker should connect to.
          examples:
            - wss://<your-domain>.livekit.cloud
        started_at:
          type: string
          title: Started At
          description: Start time in ISO 8601 format.
          examples:
            - '2022-01-01T00:00:00Z'
      type: object
      required:
        - id
        - avatar_id
        - url
        - started_at
      title: LivekitSessionResponse
      description: Response body for a LiveKit speech-to-video session.
    PipecatSessionResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the object in the database.
          examples:
            - 01234567-89ab-cdef-0123-456789abcdef
        transport:
          type: string
          const: pipecat
          title: Transport
          default: pipecat
        avatar_id:
          type: string
          title: Avatar Id
          description: ID of avatar to use.
          examples:
            - 01234567-89ab-cdef-0123-456789abcdef
        url:
          type: string
          title: Url
          description: URL of Daily room the video bot should connect to.
          examples:
            - wss://<your-domain>.pipecat.cloud
        started_at:
          type: string
          title: Started At
          description: Start time in ISO 8601 format.
          examples:
            - '2022-01-01T00:00:00Z'
      type: object
      required:
        - id
        - avatar_id
        - url
        - started_at
      title: PipecatSessionResponse
      description: Response body for a Pipecat speech-to-video session.
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Your Beyond Presence API Key.
      in: header
      name: x-api-key

````