{"owner":"AlexxIT","repo":"go2rtc","hasSpec":true,"specFile":"website/api/openapi.yaml","branch":"HEAD","format":"yaml","version":"3.x (YAML)","title":"go2rtc","description":"","endpoints":[],"spec":"openapi: 3.1.0\n\ninfo:\n  title: go2rtc\n  version: 1.9.13\n  license: { name: MIT,url: https://opensource.org/licenses/MIT }\n  contact: { url: https://github.com/AlexxIT/go2rtc }\n  description: |\n    Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.\n\nservers:\n  - url: http://localhost:1984\n\ntags:\n  - name: Application\n    description: \"[Module: API](https://github.com/AlexxIT/go2rtc#module-api)\"\n  - name: Config\n    description: \"[Configuration](https://github.com/AlexxIT/go2rtc#configuration)\"\n  - name: Streams list\n    description: \"[Module: Streams](https://github.com/AlexxIT/go2rtc#module-streams)\"\n  - name: Consume stream\n  - name: HLS\n  - name: Snapshot\n  - name: Produce stream\n  - name: WebSocket\n    description: \"WebSocket API endpoint: `/api/ws` (see `api/README.md`)\"\n  - name: Discovery\n  - name: HomeKit\n  - name: ONVIF\n  - name: RTSPtoWebRTC\n  - name: WebTorrent\n    description: \"[Module: WebTorrent](https://github.com/AlexxIT/go2rtc#module-webtorrent)\"\n  - name: FFmpeg\n  - name: Debug\n\ncomponents:\n  parameters:\n    stream_src_path:\n      name: src\n      in: path\n      description: Source stream name\n      required: true\n      schema: { type: string }\n      example: camera1\n\n    stream_dst_path:\n      name: dst\n      in: path\n      description: Destination stream name\n      required: true\n      schema: { type: string }\n      example: camera1\n\n    stream_src_query:\n      name: src\n      in: query\n      description: Source stream name\n      required: true\n      schema: { type: string }\n      example: camera1\n\n    hls_session_id_path:\n      name: id\n      in: path\n      description: HLS session ID (passed as query param `id`)\n      required: true\n      schema: { type: string }\n      example: DvmHdd9w\n\n    mp4_filter:\n      name: mp4\n      in: query\n      description: MP4 codecs filter\n      required: false\n      schema:\n        type: string\n        enum: [ \"\", flac, all ]\n      example: flac\n\n    video_filter:\n      name: video\n      in: query\n      description: Video codecs filter\n      schema:\n        type: string\n        enum: [ \"\", all, h264, h265, mjpeg ]\n      example: h264,h265\n\n    audio_filter:\n      name: audio\n      in: query\n      description: Audio codecs filter\n      schema:\n        type: string\n        enum: [ \"\", all, aac, opus, pcm, pcmu, pcma ]\n      example: aac\n\n  responses:\n    discovery:\n      description: \"\"\n      content:\n        application/json:\n          example: { streams: [ { \"name\": \"Camera 1\",\"url\": \"...\" } ] }\n\n    webtorrent:\n      description: \"\"\n      content:\n        application/json:\n          example: { share: AKDypPy4zz, pwd: H0Km1HLTTP }\n\npaths:\n  /api:\n    get:\n      summary: Get application info\n      tags: [ Application ]\n      responses:\n        \"200\":\n          description: \"\"\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  config_path: { type: string, example: \"/config/go2rtc.yaml\" }\n                  host: { type: string, example: \"192.168.1.123:1984\" }\n                  rtsp:\n                    type: object\n                    properties:\n                      listen: { type: string, example: \":8554\" }\n                      default_query: { type: string, example: \"video&audio\" }\n                  version: { type: string, example: \"1.9.12\" }\n\n  /api/exit:\n    post:\n      summary: Close application\n      tags: [ Application ]\n      parameters:\n        - name: code\n          in: query\n          description: Application exit code\n          required: false\n          schema: { type: integer }\n          example: 100\n      responses:\n        default:\n          description: \"\"\n\n  /api/restart:\n    post:\n      summary: Restart daemon\n      description: Restarts the daemon.\n      tags: [ Application ]\n      responses:\n        default:\n          description: \"\"\n\n  /api/log:\n    get:\n      summary: Get in-memory logs buffer\n      description: |\n        Returns current log output from the in-memory circular buffer.\n      tags: [ Application ]\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/jsonlines:\n              example: |\n                {\"level\":\"info\",\"version\":\"1.9.13\",\"platform\":\"linux/amd64\",\"revision\":\"dfe4755\",\"time\":1766841087331,\"message\":\"go2rtc\"}\n    delete:\n      summary: Clear in-memory logs buffer\n      tags: [ Application ]\n      responses:\n        \"200\":\n          description: \"\"\n          content:\n            text/plain: { example: \"\" }\n\n  /api/config:\n    get:\n      summary: Get main config file content\n      tags: [ Config ]\n      responses:\n        \"200\":\n          description: \"\"\n          content:\n            application/yaml: { example: \"streams:...\" }\n        \"404\":\n          description: Config file not found\n    post:\n      summary: Rewrite main config file\n      tags: [ Config ]\n      requestBody:\n        content:\n          \"*/*\": { example: \"streams:...\" }\n      responses:\n        default:\n          description: \"\"\n    patch:\n      summary: Merge changes to main config file\n      tags: [ Config ]\n      requestBody:\n        content:\n          \"*/*\": { example: \"streams:...\" }\n      responses:\n        default:\n          description: \"\"\n\n\n\n  /api/streams:\n    get:\n      summary: Get all streams info\n      tags: [ Streams list ]\n      responses:\n        \"200\":\n          description: \"\"\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: object\n                  properties:\n                    producers:\n                      type: array\n                    consumers:\n                      type: array\n    put:\n      summary: Create new stream\n      tags: [ Streams list ]\n      parameters:\n        - name: src\n          in: query\n          description: Stream source (URI)\n          required: true\n          schema: { type: string }\n          example: \"rtsp://rtsp:12345678@192.168.1.123/av_stream/ch0\"\n        - name: name\n          in: query\n          description: Stream name\n          required: false\n          schema: { type: string }\n          example: camera1\n      responses:\n        default:\n          description: \"\"\n    patch:\n      summary: Update stream source\n      tags: [ Streams list ]\n      parameters:\n        - name: src\n          in: query\n          description: Stream source (URI)\n          required: true\n          schema: { type: string }\n          example: \"rtsp://rtsp:12345678@192.168.1.123/av_stream/ch0\"\n        - name: name\n          in: query\n          description: Stream name\n          required: true\n          schema: { type: string }\n          example: camera1\n      responses:\n        default:\n          description: \"\"\n    delete:\n      summary: Delete stream\n      tags: [ Streams list ]\n      parameters:\n        - name: src\n          in: query\n          description: Stream name\n          required: true\n          schema: { type: string }\n          example: camera1\n      responses:\n        default:\n          description: \"\"\n    post:\n      summary: Send stream from source to destination\n      description: \"[Stream to camera](https://github.com/AlexxIT/go2rtc#stream-to-camera)\"\n      tags: [ Streams list ]\n      parameters:\n        - name: src\n          in: query\n          description: Stream source (URI)\n          required: true\n          schema: { type: string }\n          example: \"ffmpeg:http://example.com/song.mp3#audio=pcma#input=file\"\n        - name: dst\n          in: query\n          description: Destination stream name\n          required: true\n          schema: { type: string }\n          example: camera1\n      responses:\n        default:\n          description: \"\"\n\n  /api/streams.dot:\n    get:\n      summary: Get streams graph in Graphviz DOT format\n      tags: [ Streams list ]\n      parameters:\n        - name: src\n          in: query\n          description: Stream name filter. Repeat `src` to include multiple streams.\n          required: false\n          schema: { type: string }\n          example: camera1\n      responses:\n        \"200\":\n          description: OK\n          content:\n            text/vnd.graphviz:\n              example: \"digraph { ... }\"\n\n  /api/preload:\n    get:\n      summary: Get all preloaded streams\n      tags: [ Streams list ]\n      responses:\n        \"200\":\n          description: \"\"\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: object\n                  properties:\n                    consumer:\n                      type: object\n                    query:\n                      type: string\n                      example: \"video&audio\"\n    put:\n      summary: Preload new stream\n      tags: [ Streams list ]\n      parameters:\n        - name: src\n          in: query\n          description: Stream source (name)\n          required: true\n          schema: { type: string }\n          example: \"camera1\"\n        - name: video\n          in: query\n          description: Video codecs filter\n          required: false\n          schema: { type: string }\n          example: all,h264,h265,...\n        - name: audio\n          in: query\n          description: Audio codecs filter\n          required: false\n          schema: { type: string }\n          example: all,aac,opus,...\n        - name: microphone\n          in: query\n          description: Microphone codecs filter\n          required: false\n          schema: { type: string }\n          example: all,aac,opus,...\n      responses:\n        default:\n          description: \"\"\n    delete:\n      summary: Delete preloaded stream\n      tags: [ Streams list ]\n      parameters:\n        - name: src\n          in: query\n          description: Stream source (name)\n          required: true\n          schema: { type: string }\n          example: \"camera1\"\n      responses:\n        default:\n          description: \"\"\n\n  /api/schemes:\n    get:\n      summary: Get supported source URL schemes\n      tags: [ Streams list ]\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: array\n                items: { type: string }\n              example: [ rtsp, rtmp, webrtc, ffmpeg, hass ]\n\n\n  /api/streams?src={src}:\n    get:\n      summary: Get stream info in JSON format\n      tags: [ Consume stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      responses:\n        \"200\":\n          description: \"\"\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: object\n                  properties:\n                    producers:\n                      type: array\n                      items: { type: object }\n                    consumers:\n                      type: array\n                      items: { type: object }\n\n  /api/webrtc?src={src}:\n    post:\n      summary: Get stream in WebRTC format (WHEP)\n      description: \"[Module: WebRTC](https://github.com/AlexxIT/go2rtc#module-webrtc)\"\n      tags: [ Consume stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      requestBody:\n        description: |\n          Support:\n          - JSON format (`Content-Type: application/json`)\n          - WHEP standard (`Content-Type: application/sdp`)\n          - raw SDP (`Content-Type: anything`)\n        required: true\n        content:\n          application/json: { example: { type: offer, sdp: \"v=0...\" } }\n          \"application/sdp\": { example: \"v=0...\" }\n          \"*/*\": { example: \"v=0...\" }\n      responses:\n        \"200\":\n          description: \"Response on JSON or raw SDP\"\n          content:\n            application/json: { example: { type: answer, sdp: \"v=0...\" } }\n            application/sdp: { example: \"v=0...\" }\n        \"201\":\n          description: \"Response on `Content-Type: application/sdp`\"\n          content:\n            application/sdp: { example: \"v=0...\" }\n\n  /api/stream.mp4?src={src}:\n    get:\n      summary: Get stream in MP4 format (HTTP progressive)\n      description: \"[Module: MP4](https://github.com/AlexxIT/go2rtc#module-mp4)\"\n      tags: [ Consume stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n        - name: duration\n          in: query\n          description: Limit the length of the stream in seconds\n          required: false\n          schema: { type: string }\n          example: 15\n        - name: filename\n          in: query\n          description: Download as a file with this name\n          required: false\n          schema: { type: string }\n          example: camera1.mp4\n        - name: rotate\n          in: query\n          description: \"Rotate video (degrees). Supported values: 90, 180, 270.\"\n          required: false\n          schema: { type: integer, enum: [ 90, 180, 270 ] }\n        - name: scale\n          in: query\n          description: Scale video in format `width:height`\n          required: false\n          schema: { type: string, example: \"1280:720\" }\n        - $ref: \"#/components/parameters/mp4_filter\"\n        - $ref: \"#/components/parameters/video_filter\"\n        - $ref: \"#/components/parameters/audio_filter\"\n      responses:\n        200:\n          description: \"\"\n          content: { video/mp4: { example: \"\" } }\n\n  /api/stream.m3u8?src={src}:\n    get:\n      summary: Get stream in HLS format\n      description: \"[Module: HLS](https://github.com/AlexxIT/go2rtc#module-hls)\"\n      tags: [ Consume stream, HLS ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n        - $ref: \"#/components/parameters/mp4_filter\"\n        - $ref: \"#/components/parameters/video_filter\"\n        - $ref: \"#/components/parameters/audio_filter\"\n      responses:\n        200:\n          description: \"\"\n          content: { application/vnd.apple.mpegurl: { example: \"\" } }\n\n  /api/hls/playlist.m3u8?id={id}:\n    get:\n      summary: Get HLS media playlist for an active session\n      tags: [ HLS ]\n      parameters:\n        - $ref: \"#/components/parameters/hls_session_id_path\"\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/vnd.apple.mpegurl: { example: \"\" }\n        \"404\":\n          description: Session not found\n\n  /api/hls/segment.ts?id={id}:\n    get:\n      summary: Get HLS MPEG-TS segment for an active session\n      tags: [ HLS ]\n      parameters:\n        - $ref: \"#/components/parameters/hls_session_id_path\"\n      responses:\n        \"200\":\n          description: OK\n          content:\n            video/mp2t: { example: \"\" }\n        \"404\":\n          description: Segment or session not found\n\n  /api/hls/init.mp4?id={id}:\n    get:\n      summary: Get HLS fMP4 init segment for an active session\n      tags: [ HLS ]\n      parameters:\n        - $ref: \"#/components/parameters/hls_session_id_path\"\n      responses:\n        \"200\":\n          description: OK\n          content:\n            video/mp4: { example: \"\" }\n        \"404\":\n          description: Segment or session not found\n\n  /api/hls/segment.m4s?id={id}:\n    get:\n      summary: Get HLS fMP4 media segment for an active session\n      tags: [ HLS ]\n      parameters:\n        - $ref: \"#/components/parameters/hls_session_id_path\"\n      responses:\n        \"200\":\n          description: OK\n          content:\n            video/iso.segment: { example: \"\" }\n        \"404\":\n          description: Segment or session not found\n\n  /api/stream.mjpeg?src={src}:\n    get:\n      summary: Get stream in MJPEG format\n      description: \"[Module: MJPEG](https://github.com/AlexxIT/go2rtc#module-mjpeg)\"\n      tags: [ Consume stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      responses:\n        200:\n          description: \"\"\n          content: { multipart/x-mixed-replace: { example: \"\" } }\n\n  /api/stream.ascii?src={src}:\n    get:\n      summary: Get stream in ASCII-art format (ANSI escape codes)\n      description: \"[Module: MJPEG](https://github.com/AlexxIT/go2rtc#module-mjpeg)\"\n      tags: [ Consume stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n        - name: color\n          in: query\n          description: Foreground mode (`8`, `256`, `rgb` or ANSI SGR code)\n          required: false\n          schema: { type: string }\n        - name: back\n          in: query\n          description: Background mode (`8`, `256`, `rgb` or ANSI SGR code)\n          required: false\n          schema: { type: string }\n        - name: text\n          in: query\n          description: Charset preset (empty/default, `block`) or custom characters\n          required: false\n          schema: { type: string }\n      responses:\n        \"200\":\n          description: OK\n          content:\n            text/plain: { example: \"\" }\n        \"404\":\n          description: Stream not found\n\n  /api/stream.y4m?src={src}:\n    get:\n      summary: Get stream in YUV4MPEG2 format (y4m)\n      tags: [ Consume stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/octet-stream: { example: \"\" }\n        \"404\":\n          description: Stream not found\n\n  /api/stream.ts?src={src}:\n    get:\n      summary: Get stream in MPEG-TS format\n      tags: [ Consume stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      responses:\n        \"200\":\n          description: OK\n          content:\n            video/mp2t: { example: \"\" }\n        \"404\":\n          description: Stream not found\n\n  /api/stream.aac?src={src}:\n    get:\n      summary: Get stream audio in AAC (ADTS) format\n      tags: [ Consume stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      responses:\n        \"200\":\n          description: OK\n          content:\n            audio/aac: { example: \"\" }\n        \"404\":\n          description: Stream not found\n\n  /api/stream.flv?src={src}:\n    get:\n      summary: Get stream in FLV format\n      tags: [ Consume stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      responses:\n        \"200\":\n          description: OK\n          content:\n            video/x-flv: { example: \"\" }\n        \"404\":\n          description: Stream not found\n\n  /api/frame.jpeg?src={src}:\n    get:\n      summary: Get snapshot in JPEG format\n      description: \"[Module: MJPEG](https://github.com/AlexxIT/go2rtc#module-mjpeg)\"\n      tags: [ Snapshot ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n        - name: name\n          in: query\n          description: Optional stream name to create/update if `src` is a URL\n          required: false\n          schema: { type: string }\n        - name: width\n          in: query\n          description: \"Scale output width (alias: `w`)\"\n          required: false\n          schema: { type: integer, minimum: 1 }\n        - name: height\n          in: query\n          description: \"Scale output height (alias: `h`)\"\n          required: false\n          schema: { type: integer, minimum: 1 }\n        - name: rotate\n          in: query\n          description: \"Rotate output (degrees). Supported values: 90, 180, 270.\"\n          required: false\n          schema: { type: integer, enum: [ 90, 180, 270 ] }\n        - name: hardware\n          in: query\n          description: \"Hardware acceleration engine for FFmpeg snapshot transcoding (alias: `hw`)\"\n          required: false\n          schema: { type: string }\n      responses:\n        \"200\":\n          description: \"\"\n          content:\n            image/jpeg: { example: \"\" }\n\n  /api/frame.mp4?src={src}:\n    get:\n      summary: Get snapshot in MP4 format\n      description: \"[Module: MP4](https://github.com/AlexxIT/go2rtc#module-mp4)\"\n      tags: [ Snapshot ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n        - name: filename\n          in: query\n          description: Download as a file with this name\n          required: false\n          schema: { type: string }\n          example: camera1.mp4\n      responses:\n        200:\n          description: \"\"\n          content:\n            video/mp4: { example: \"\" }\n\n\n\n  /api/webrtc?dst={dst}:\n    post:\n      summary: Post stream in WebRTC format (WHIP)\n      description: \"[Incoming: WebRTC/WHIP](https://github.com/AlexxIT/go2rtc#incoming-webrtcwhip)\"\n      tags: [ Produce stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_dst_path\"\n      responses:\n        \"201\":\n          description: Created\n          headers:\n            Location:\n              description: Resource URL for session\n              schema: { type: string }\n          content:\n            application/sdp: { example: \"v=0...\" }\n        \"404\":\n          description: Stream not found\n\n  /api/stream?dst={dst}:\n    post:\n      summary: Post stream in auto-detected format\n      description: |\n        Incoming source with automatic format detection. Use for pushing a stream into an existing `dst` stream.\n      tags: [ Produce stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_dst_path\"\n      responses:\n        default:\n          description: \"\"\n\n  /api/stream.flv?dst={dst}:\n    post:\n      summary: Post stream in FLV format\n      description: \"[Incoming sources](https://github.com/AlexxIT/go2rtc#incoming-sources)\"\n      tags: [ Produce stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_dst_path\"\n      responses:\n        default:\n          description: \"\"\n\n  /api/stream.ts?dst={dst}:\n    post:\n      summary: Post stream in MPEG-TS format\n      description: \"[Incoming sources](https://github.com/AlexxIT/go2rtc#incoming-sources)\"\n      tags: [ Produce stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_dst_path\"\n      responses:\n        default:\n          description: \"\"\n\n  /api/stream.mjpeg?dst={dst}:\n    post:\n      summary: Post stream in MJPEG format\n      description: \"[Incoming sources](https://github.com/AlexxIT/go2rtc#incoming-sources)\"\n      tags: [ Produce stream ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_dst_path\"\n      responses:\n        default:\n          description: \"\"\n\n\n  /api/ffmpeg:\n    post:\n      summary: Play file/live/TTS into a stream via FFmpeg\n      description: |\n        Helper endpoint for \"stream to camera\" scenarios.\n        Exactly one of `file`, `live`, `text` should be provided.\n      tags: [ FFmpeg ]\n      parameters:\n        - name: dst\n          in: query\n          description: Destination stream name\n          required: true\n          schema: { type: string }\n          example: camera1\n        - name: file\n          in: query\n          description: Input URL to treat as file (`#input=file`)\n          required: false\n          schema: { type: string }\n          example: \"http://example.com/song.mp3\"\n        - name: live\n          in: query\n          description: Live input URL\n          required: false\n          schema: { type: string }\n          example: \"http://example.com/live.mp3\"\n        - name: text\n          in: query\n          description: Text-to-speech phrase\n          required: false\n          schema: { type: string }\n          example: \"Hello\"\n        - name: voice\n          in: query\n          description: Optional TTS voice (engine-dependent)\n          required: false\n          schema: { type: string }\n      responses:\n        \"200\":\n          description: OK\n        \"400\":\n          description: Invalid parameters\n        \"404\":\n          description: Stream not found\n\n\n  /api/dvrip:\n    get:\n      summary: DVRIP cameras discovery\n      description: \"[Source: DVRIP](https://github.com/AlexxIT/go2rtc#source-dvrip)\"\n      tags: [ Discovery ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n\n  /api/ffmpeg/devices:\n    get:\n      summary: FFmpeg USB devices discovery\n      description: \"[Source: FFmpeg Device](https://github.com/AlexxIT/go2rtc#source-ffmpeg-device)\"\n      tags: [ Discovery ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n  \n  /api/ffmpeg/hardware:\n    get:\n      summary: FFmpeg hardware transcoding discovery\n      description: \"[Hardware acceleration](https://github.com/AlexxIT/go2rtc/wiki/Hardware-acceleration)\"\n      tags: [ Discovery ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n  \n  /api/v4l2:\n    get:\n      summary: V4L2 video devices discovery (Linux)\n      tags: [ Discovery ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n  \n  /api/alsa:\n    get:\n      summary: ALSA audio devices discovery (Linux)\n      tags: [ Discovery ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n  \n  /api/gopro:\n    get:\n      summary: GoPro cameras discovery\n      tags: [ Discovery ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n\n  /api/ring:\n    get:\n      summary: Ring cameras discovery\n      description: |\n        Provide either `email`/`password` (and optional `code` for 2FA) or `refresh_token`.\n        If 2FA is required, returns a JSON prompt instead of sources.\n      tags: [ Discovery ]\n      parameters:\n        - name: email\n          in: query\n          required: false\n          schema: { type: string }\n        - name: password\n          in: query\n          required: false\n          schema: { type: string }\n        - name: code\n          in: query\n          required: false\n          schema: { type: string }\n        - name: refresh_token\n          in: query\n          required: false\n          schema: { type: string }\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/json: { example: \"\" }\n\n  /api/tuya:\n    get:\n      summary: Tuya cameras discovery\n      tags: [ Discovery ]\n      parameters:\n        - name: region\n          in: query\n          description: Tuya API host (region)\n          required: true\n          schema: { type: string }\n          example: \"openapi.tuyaus.com\"\n        - name: email\n          in: query\n          required: true\n          schema: { type: string }\n        - name: password\n          in: query\n          required: true\n          schema: { type: string }\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n        \"400\":\n          description: Invalid parameters\n        \"404\":\n          description: No cameras found\n  \n  /api/hass:\n    get:\n      summary: Home Assistant cameras discovery\n      description: \"[Source: Hass](https://github.com/AlexxIT/go2rtc#source-hass)\"\n      tags: [ Discovery ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n        \"404\": { description: No Hass config }\n\n  /api/discovery/homekit:\n    get:\n      summary: HomeKit cameras discovery\n      description: \"[Source: HomeKit](https://github.com/AlexxIT/go2rtc#source-homekit)\"\n      tags: [ Discovery ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n\n  /api/nest:\n    get:\n      summary: Nest cameras discovery\n      tags: [ Discovery ]\n      parameters:\n        - name: client_id\n          in: query\n          required: true\n          schema: { type: string }\n        - name: client_secret\n          in: query\n          required: true\n          schema: { type: string }\n        - name: refresh_token\n          in: query\n          required: true\n          schema: { type: string }\n        - name: project_id\n          in: query\n          required: true\n          schema: { type: string }\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n\n  /api/onvif:\n    get:\n      summary: ONVIF cameras discovery\n      description: \"[Source: ONVIF](https://github.com/AlexxIT/go2rtc#source-onvif)\"\n      tags: [ Discovery ]\n      parameters:\n        - name: src\n          in: query\n          description: Optional ONVIF device URL to enumerate profiles\n          required: false\n          schema: { type: string }\n          example: \"onvif://user:pass@192.168.1.50:80\"\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n\n  /api/roborock:\n    get:\n      summary: Roborock vacuums discovery (requires prior auth)\n      description: \"[Source: Roborock](https://github.com/AlexxIT/go2rtc#source-roborock)\"\n      tags: [ Discovery ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n        \"404\":\n          description: No auth\n    post:\n      summary: Roborock login and discovery\n      tags: [ Discovery ]\n      requestBody:\n        required: true\n        content:\n          multipart/form-data:\n            schema:\n              type: object\n              properties:\n                username: { type: string }\n                password: { type: string }\n              required: [ username, password ]\n      responses:\n        \"200\": { $ref: \"#/components/responses/discovery\" }\n\n  /api/homekit:\n    get:\n      summary: Get HomeKit servers state\n      tags: [ HomeKit ]\n      parameters:\n        - name: id\n          in: query\n          description: Optional stream name (server ID)\n          required: false\n          schema: { type: string }\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/json: { example: \"\" }\n        \"404\":\n          description: Server not found\n    post:\n      summary: Pair HomeKit camera and create/update stream\n      tags: [ HomeKit ]\n      parameters:\n        - name: id\n          in: query\n          description: Stream name to create/update\n          required: true\n          schema: { type: string }\n        - name: src\n          in: query\n          description: HomeKit URL (without pin)\n          required: true\n          schema: { type: string }\n        - name: pin\n          in: query\n          description: HomeKit PIN\n          required: true\n          schema: { type: string }\n      responses:\n        \"200\":\n          description: OK\n    delete:\n      summary: Unpair HomeKit camera and delete stream\n      tags: [ HomeKit ]\n      parameters:\n        - name: id\n          in: query\n          description: Stream name / server ID\n          required: true\n          schema: { type: string }\n      responses:\n        \"200\":\n          description: OK\n        \"404\":\n          description: Stream not found\n\n  /api/homekit/accessories:\n    get:\n      summary: Get HomeKit accessories JSON for a stream\n      tags: [ HomeKit ]\n      parameters:\n        - name: id\n          in: query\n          description: Stream name\n          required: true\n          schema: { type: string }\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/json: { example: { } }\n        \"404\":\n          description: Stream not found\n\n  /pair-setup:\n    post:\n      summary: HomeKit Pair Setup (HAP)\n      description: HomeKit Accessory Protocol endpoint (TLV8).\n      tags: [ HomeKit ]\n      requestBody:\n        required: true\n        content:\n          application/pairing+tlv8: { example: \"\" }\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/pairing+tlv8: { example: \"\" }\n\n  /pair-verify:\n    post:\n      summary: HomeKit Pair Verify (HAP)\n      description: HomeKit Accessory Protocol endpoint (TLV8).\n      tags: [ HomeKit ]\n      requestBody:\n        required: true\n        content:\n          application/pairing+tlv8: { example: \"\" }\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/pairing+tlv8: { example: \"\" }\n\n\n  /onvif/:\n    get:\n      summary: ONVIF server implementation\n      description: Simple realisation of the ONVIF protocol. Accepts any suburl requests\n      tags: [ ONVIF ]\n      responses:\n        default:\n          description: \"\"\n\n\n\n  /stream/:\n    get:\n      summary: RTSPtoWebRTC server implementation\n      description: Simple API for support [RTSPtoWebRTC](https://www.home-assistant.io/integrations/rtsp_to_webrtc/) integration\n      tags: [ RTSPtoWebRTC ]\n      responses:\n        default:\n          description: \"\"\n\n\n  /api/ws:\n    get:\n      summary: WebSocket endpoint\n      description: |\n        Upgrade to WebSocket and exchange JSON messages:\n        - Request: `{ \"type\": \"...\", \"value\": ... }`\n        - Response: `{ \"type\": \"...\", \"value\": ... }`\n        \n        Supported message types depend on enabled modules (see `api/README.md`).\n      tags: [ WebSocket ]\n      parameters:\n        - name: src\n          in: query\n          description: Stream name (consumer)\n          required: false\n          schema: { type: string }\n        - name: dst\n          in: query\n          description: Stream name (producer)\n          required: false\n          schema: { type: string }\n      responses:\n        \"101\": { description: Switching Protocols }\n\n\n\n  /api/webtorrent?src={src}:\n    get:\n      summary: Get WebTorrent share info\n      tags: [ WebTorrent ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      responses:\n        200: { $ref: \"#/components/responses/webtorrent\" }\n    post:\n      summary: Add WebTorrent share\n      tags: [ WebTorrent ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      responses:\n        200: { $ref: \"#/components/responses/webtorrent\" }\n    delete:\n      summary: Delete WebTorrent share\n      tags: [ WebTorrent ]\n      parameters:\n        - $ref: \"#/components/parameters/stream_src_path\"\n      responses:\n        default: { description: \"\" }\n\n  /api/webtorrent:\n    get:\n      summary: Get all WebTorrent shares info\n      tags: [ WebTorrent ]\n      responses:\n        200: { $ref: \"#/components/responses/discovery\" }\n\n\n\n  /api/stack:\n    get:\n      summary: Show list unknown goroutines\n      tags: [ Debug ]\n      responses:\n        200:\n          description: \"\"\n          content: { text/plain: { example: \"\" } }\n"}