{ "openapi": "3.0.1", "info": { "title": "VideoSummary", "version": "v1" }, "servers": [ { "url": "https://video-summary.copilot.us" } ], "paths": { "/api/video/video-summary": { "post": { "summary": "Create video summary by transcripts.", "description": "Create video summary by transcripts.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VideoRequestBody" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "ResponseInstructions": { "type": "string", "description": "Instruction is it transcripts based on which the video summary should be generated or is this already generated video summary." }, "videoSummary": { "type": "string", "description": "It can be transcripts or already generated video summary." } } } } } }, "400": { "description": "Bad request" } }, "operationId": "createVideoSummary" } }, "/api/video/videos-info": { "get": { "summary": "Get videos info from a channel", "parameters": [ { "name": "videoUrl", "in": "query", "required": true, "schema": { "type": "string" }, "description": "The video Url of the video to retrieve videos from a channel" } ], "responses": { "200": { "description": "Video list from a channel.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/videosResponseBody" } } } } }, "operationId": "getVideosInfo" } }, "/api/video/save": { "get": { "operationId": "SaveTranscriptsWithTimesCode", "summary": "Save transcripts and times code.", "parameters": [ { "name": "url", "in": "query", "required": true, "schema": { "type": "string" }, "description": "The URL of the video to retrieve transcripts and times code." } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string", "description": "Information about whether transcripts and times code have been saved. And information about next step." } } } }, "400": { "description": "Bad request" } } } }, "/api/video/filter": { "get": { "operationId": "SummariesByTimesCode", "summary": "Create summary by time codes.", "description": "Create summary by time codes.", "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "transcriptsWithTimesCode": { "type": "string", "description": "Transcripts and time codes." }, "responseInstructions": { "type": "string", "description": "Information about next step." } } } } } } } } } }, "components": { "schemas": { "timesCodeBody": { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the video." }, "start": { "type": "string", "description": "Start of part of the video." }, "end": { "type": "string", "description": "End of part of the video." } } }, "videosResponseBody": { "type": "object", "properties": { "response": { "$ref": "#/components/schemas/videoList" } } }, "videoList": { "type": "array", "items": { "$ref": "#/components/schemas/youTubeVideoBody" } }, "youTubeVideoBody": { "type": "object", "properties": { "title": { "type": "string", "description": "Title of the video." }, "description": { "type": "string", "description": "Description of the video." }, "videoSource": { "type": "string", "description": "Description of the video." } } }, "VideoRequestBody": { "type": "object", "properties": { "instructions": { "type": "string", "description": "This is a user's instructions which he wants to execute on the video. If not provided, do not populate this field." }, "url": { "type": "string", "description": "Video url.", "required": true } } } } } }