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

# Openai Realtime

> Low-latency speech-to-speech over a WebSocket, drop-in compatible with the OpenAI Realtime GA API. Connect with `wss://api.acedata.cloud/v1/realtime?model=gpt-realtime` and an `Authorization: Bearer <token>` header (browsers pass the token via the `Sec-WebSocket-Protocol` subprotocol). Client and server exchange OpenAI Realtime JSON events (`session.update`, `input_audio_buffer.append`, `response.create`, `response.output_audio.delta`, `response.done`, ...). Audio is pcm16 @ 24kHz mono. Billed per assistant turn from `response.done.usage` (audio and text tokens priced separately).



## OpenAPI

````yaml /openapi/openai.json get /v1/realtime
openapi: 3.0.0
info:
  title: OpenAI generation
  version: 1.0.0
  description: API reference for OpenAI generation on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /v1/realtime:
    get:
      summary: Openai Realtime
      description: >-
        Low-latency speech-to-speech over a WebSocket, drop-in compatible with
        the OpenAI Realtime GA API. Connect with
        `wss://api.acedata.cloud/v1/realtime?model=gpt-realtime` and an
        `Authorization: Bearer <token>` header (browsers pass the token via the
        `Sec-WebSocket-Protocol` subprotocol). Client and server exchange OpenAI
        Realtime JSON events (`session.update`, `input_audio_buffer.append`,
        `response.create`, `response.output_audio.delta`, `response.done`, ...).
        Audio is pcm16 @ 24kHz mono. Billed per assistant turn from
        `response.done.usage` (audio and text tokens priced separately).
      operationId: openaiRealtime
      parameters:
        - name: model
          in: query
          required: true
          description: Realtime model to use.
          schema:
            type: string
            enum:
              - gpt-realtime
              - gpt-realtime-2
            default: gpt-realtime
      responses:
        '101':
          description: Switching Protocols — WebSocket established.
        '401':
          description: Unauthorized — missing or invalid bearer token.
        '403':
          description: Insufficient balance.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````