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

# Create realtime session

> Create realtime session. See the Audio API guide for limits, lifecycle and examples.

See the [Audio API guide](/api-reference/elevenlabs/overview) for request examples, limits, billing and delivery behavior.


## OpenAPI

````yaml openapi/audio.yaml POST /audio/realtime/sessions
openapi: 3.1.0
info:
  title: GENGEN Audio API
  version: 1.0.0
  description: >-
    Speech, dialogue, complete-turn WebSocket sessions, voices and completion
    webhooks. See the Audio API guide for frame format and signature
    verification.
servers:
  - url: https://gengen.farm/api/gengen/v1
security:
  - bearerAuth: []
paths:
  /audio/realtime/sessions:
    post:
      tags:
        - WebSocket
      summary: Create realtime session
      description: >-
        Create realtime session. See the Audio API guide for limits, lifecycle
        and examples.
      operationId: audio-create-session
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionRequest'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ticket'
        default:
          description: Request failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SessionRequest:
      type: object
      properties:
        model:
          type: string
          enum:
            - eleven_v3
            - eleven_v4
            - eleven_v4_turbo
        controls:
          type: object
          properties:
            voiceId:
              type: string
            outputFormat:
              type: string
              enum:
                - mp3_44100_128
                - pcm_24000
            languageCode:
              type: string
          required:
            - voiceId
        maxCostUsd:
          type: number
          exclusiveMinimum: 0
          maximum: 10
          default: 1
      required:
        - model
        - controls
      additionalProperties: false
    Ticket:
      type: object
      properties:
        sessionId:
          type: string
        url:
          type: string
          format: uri
        token:
          type: string
          description: >-
            One-use ticket, expires after 60 seconds. Send in first WebSocket
            frame, never in URL.
        tokenExpiresAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        inputMode:
          const: completeTurn
      required:
        - sessionId
        - url
        - token
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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