{
  "openapi": "3.1.0",
  "info": {
    "title": "原生OpenAI格式",
    "version": "1.0.0",
    "description": "建立 WebSocket 连接用于实时对话。\n\n**注意**: 这是一个 WebSocket 端点，需要使用 WebSocket 协议连接。\n\n连接 URL 示例: `wss://api.example.com/v1/realtime?model=gpt-4o-realtime`\n"
  },
  "tags": [
    {
      "name": "实时语音（Realtime）"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "使用 Bearer Token 认证。\n格式: `Authorization: Bearer sk-xxxxxx`\n"
      }
    }
  },
  "paths": {
    "/v1/realtime": {
      "get": {
        "tags": [
          "实时语音（Realtime）"
        ],
        "summary": "原生OpenAI格式",
        "description": "建立 WebSocket 连接用于实时对话。\n\n**注意**: 这是一个 WebSocket 端点，需要使用 WebSocket 协议连接。\n\n连接 URL 示例: `wss://api.example.com/v1/realtime?model=gpt-4o-realtime`\n",
        "operationId": "createrealtimesession",
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "required": false,
            "description": "要使用的模型",
            "schema": {
              "type": "string",
              "examples": [
                "gpt-4o-realtime-preview"
              ]
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "101": {
            "description": "WebSocket 协议切换"
          },
          "400": {
            "description": "请求错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "description": "错误信息"
                        },
                        "type": {
                          "type": "string",
                          "description": "错误类型"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "相关参数"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "错误代码"
                        }
                      },
                      "x-apifox-orders": [
                        "message",
                        "type",
                        "param",
                        "code"
                      ]
                    }
                  },
                  "x-apifox-orders": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.xiexus.cn",
      "description": "固定生产地址"
    }
  ]
}
