{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ThreadRealtimeStartParams",
  "description": "EXPERIMENTAL - start a thread-scoped realtime session.",
  "type": "object",
  "required": [
    "outputModality",
    "threadId"
  ],
  "properties": {
    "outputModality": {
      "description": "Selects text or audio output for the realtime session. Transport and voice stay independent so clients can choose how they connect separately from what the model emits.",
      "allOf": [
        {
          "$ref": "#/definitions/RealtimeOutputModality"
        }
      ]
    },
    "prompt": {
      "type": [
        "string",
        "null"
      ]
    },
    "sessionId": {
      "type": [
        "string",
        "null"
      ]
    },
    "threadId": {
      "type": "string"
    },
    "transport": {
      "anyOf": [
        {
          "$ref": "#/definitions/ThreadRealtimeStartTransport"
        },
        {
          "type": "null"
        }
      ]
    },
    "voice": {
      "anyOf": [
        {
          "$ref": "#/definitions/RealtimeVoice"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "definitions": {
    "RealtimeOutputModality": {
      "type": "string",
      "enum": [
        "text",
        "audio"
      ]
    },
    "RealtimeVoice": {
      "type": "string",
      "enum": [
        "alloy",
        "arbor",
        "ash",
        "ballad",
        "breeze",
        "cedar",
        "coral",
        "cove",
        "echo",
        "ember",
        "juniper",
        "maple",
        "marin",
        "sage",
        "shimmer",
        "sol",
        "spruce",
        "vale",
        "verse"
      ]
    },
    "ThreadRealtimeStartTransport": {
      "description": "EXPERIMENTAL - transport used by thread realtime.",
      "oneOf": [
        {
          "type": "object",
          "required": [
            "type"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "websocket"
              ],
              "title": "WebsocketThreadRealtimeStartTransportType"
            }
          },
          "title": "WebsocketThreadRealtimeStartTransport"
        },
        {
          "type": "object",
          "required": [
            "sdp",
            "type"
          ],
          "properties": {
            "sdp": {
              "description": "SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the realtime events data channel.",
              "type": "string"
            },
            "type": {
              "type": "string",
              "enum": [
                "webrtc"
              ],
              "title": "WebrtcThreadRealtimeStartTransportType"
            }
          },
          "title": "WebrtcThreadRealtimeStartTransport"
        }
      ]
    }
  }
}