{"openapi":"3.1.0","info":{"title":"Bunny Stream (BYOK) API","version":"0.1.0","description":"Bunny Stream (BYOK) lets an AI assistant read your own Bunny Stream data through the Bunny Stream API with a key you supply (Stream library API key). Read-only: 8 tools (list_videos, get_video, list_collections, get_collection, get_statistics, get_video_heatmap, list_live_streams, get_live_stream). The BYOK key travels with each request, is used for that one call only and is never stored, logged...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-bunny-stream.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-bunny-stream/docs"},"termsOfService":"https://connectorbay.com/byok-bunny-stream/terms"},"servers":[{"url":"https://byok-bunny-stream.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-bunny-stream/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_videos":{"post":{"operationId":"list_videos","summary":"List the videos of a Stream library with title, upload date, views, duration, size, resolutions, encoding status and wat","description":"List the videos of a Stream library with title, upload date, views, duration, size, resolutions, encoding status and watch time. Status: 0 created, 1 uploaded, 2 processing, 3 transcoding, 4 finished, 5 error, 6 upload failed, 7 JIT segmenting, 8 JIT playlists created. Use for \"Which videos are in my Bunny Stream library and are they finished encoding\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"library_id":{"description":"Numeric ID of the video library (shown in the Stream section of the bunny.net dashboard).","title":"Library Id","type":"integer"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"items_per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many items per page (1 to 100).","title":"Items Per Page"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search in video titles.","title":"Search"},"collection":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only videos of this collection GUID.","title":"Collection"},"order_by":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":"date","description":"Sort field, for example date (default) or title.","title":"Order By"}},"required":["library_id"],"title":"list_videosArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_video":{"post":{"operationId":"get_video","summary":"Get one video: title, description, dates, views, duration, size, resolutions, codecs, encode progress, category and watc","description":"Get one video: title, description, dates, views, duration, size, resolutions, codecs, encode progress, category and watch time. Status: 0 created, 1 uploaded, 2 processing, 3 transcoding, 4 finished, 5 error, 6 upload failed, 7 JIT segmenting, 8 JIT playlists created. Use for \"Is Bunny Stream video a1b2c3d4 ready and how long is it\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"library_id":{"description":"Numeric ID of the video library (shown in the Stream section of the bunny.net dashboard).","title":"Library Id","type":"integer"},"video_id":{"description":"GUID of the video from list_videos.","maxLength":64,"title":"Video Id","type":"string"}},"required":["library_id","video_id"],"title":"get_videoArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_collections":{"post":{"operationId":"list_collections","summary":"List the collections (folders) of a Stream library with video count and total size. Use for \"What collections does my Bu","description":"List the collections (folders) of a Stream library with video count and total size. Use for \"What collections does my Bunny Stream library have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"library_id":{"description":"Numeric ID of the video library (shown in the Stream section of the bunny.net dashboard).","title":"Library Id","type":"integer"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"items_per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many items per page (1 to 100).","title":"Items Per Page"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search in collection names.","title":"Search"},"order_by":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":"date","description":"Sort field, for example date (default) or name.","title":"Order By"}},"required":["library_id"],"title":"list_collectionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_collection":{"post":{"operationId":"get_collection","summary":"Get one collection: name, number of videos and total storage size. Use for \"How many videos are in Bunny Stream collecti","description":"Get one collection: name, number of videos and total storage size. Use for \"How many videos are in Bunny Stream collection c1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"library_id":{"description":"Numeric ID of the video library (shown in the Stream section of the bunny.net dashboard).","title":"Library Id","type":"integer"},"collection_id":{"description":"GUID of the collection from list_collections.","maxLength":64,"title":"Collection Id","type":"string"}},"required":["library_id","collection_id"],"title":"get_collectionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_statistics":{"post":{"operationId":"get_statistics","summary":"Get view statistics of a library (or of one video): views and watch time over time, views and watch time by country, and","description":"Get view statistics of a library (or of one video): views and watch time over time, views and watch time by country, and an engagement score. Last 30 days if no dates are given. Use for \"How many views did my Bunny Stream library get this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"library_id":{"description":"Numeric ID of the video library (shown in the Stream section of the bunny.net dashboard).","title":"Library Id","type":"integer"},"date_from":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the range as an ISO 8601 UTC date or time, for example 2026-01-01.","title":"Date From"},"date_to":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of the range as an ISO 8601 UTC date or time (defaults to now).","title":"Date To"},"hourly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True for hourly data, false for daily.","title":"Hourly"},"video_guid":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only this video (GUID); leave empty for library-level totals.","title":"Video Guid"}},"required":["library_id"],"title":"get_statisticsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_video_heatmap":{"post":{"operationId":"get_video_heatmap","summary":"Get the engagement heatmap of one video: viewer attention (0 to 100) per timeline segment. Use for \"Which parts of my Bu","description":"Get the engagement heatmap of one video: viewer attention (0 to 100) per timeline segment. Use for \"Which parts of my Bunny Stream video do people watch most\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"library_id":{"description":"Numeric ID of the video library (shown in the Stream section of the bunny.net dashboard).","title":"Library Id","type":"integer"},"video_id":{"description":"GUID of the video from list_videos.","maxLength":64,"title":"Video Id","type":"string"}},"required":["library_id","video_id"],"title":"get_video_heatmapArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_live_streams":{"post":{"operationId":"list_live_streams","summary":"List live streams of a library with title, status, schedule, duration, peak concurrent viewers and total viewer seconds.","description":"List live streams of a library with title, status, schedule, duration, peak concurrent viewers and total viewer seconds. Status: 0 unknown, 1 created, 2 scheduled, 3 preview, 4 running, 5 ended, 6 VOD processing, 7 error. Stream keys are not returned. Use for \"Which Bunny Stream live streams are running now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"library_id":{"description":"Numeric ID of the video library (shown in the Stream section of the bunny.net dashboard).","title":"Library Id","type":"integer"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"items_per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many items per page (1 to 100).","title":"Items Per Page"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search in stream titles.","title":"Search"},"order_by":{"anyOf":[{"enum":["date","title","status","started","ended","planned"],"type":"string"},{"type":"null"}],"default":"date","description":"Sort field: date (default), title, status, started, ended or planned.","title":"Order By"}},"required":["library_id"],"title":"list_live_streamsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_live_stream":{"post":{"operationId":"get_live_stream","summary":"Get one live stream: title, status, schedule, resolution, ingest region, DVR settings and viewer numbers. The stream key","description":"Get one live stream: title, status, schedule, resolution, ingest region, DVR settings and viewer numbers. The stream key is not returned. Use for \"Is Bunny Stream live stream s1 running and how many viewers peaked\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"library_id":{"description":"Numeric ID of the video library (shown in the Stream section of the bunny.net dashboard).","title":"Library Id","type":"integer"},"stream_id":{"description":"GUID of the live stream from list_live_streams.","maxLength":64,"title":"Stream Id","type":"string"}},"required":["library_id","stream_id"],"title":"get_live_streamArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}