Summary, article, diagrams, and quiz from video
Summary, article, diagrams, and quiz from video · Actions GPT
Video Captions and Comments API
API to fetch Youtube video captions
GET /captions/{video_id}/{index}Retrieve SublistThis endpoint retrieves captions and start and end time for a corresponding section of given video according to index of this section. The video id must be provided in the path. Index values start from 0.
POST /create_diagramReceives a JSON object for creation of a Mermaid diagram and in response returns a diagram URL.
Schéma original API
{
"openapi": "3.1.0",
"info": {
"description": "API to fetch Youtube video captions",
"title": "Video Captions and Comments API",
"version": "1.0"
},
"servers": [
{
"url": "https://process.videosummarizerai.com"
}
],
"paths": {
"/captions/{video_id}/{index}": {
"get": {
"operationId": "get_sublist_captions_resource",
"security": [
{
"jwt": []
}
],
"summary": "Retrieve Sublist",
"description": "This endpoint retrieves captions and start and end time for a corresponding section of given video according to index of this section. The video id must be provided in the path. Index values start from 0.",
"tags": [
"default"
],
"parameters": [
{
"name": "video_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "index",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"video_id": {
"type": "string"
},
"video_title": {
"type": "string",
"description": "Title"
},
"index": {
"type": "integer",
"description": "current index of section"
},
"min_index": {
"type": "integer",
"description": "minimum index of sections. Is equal 0."
},
"max_index": {
"type": "integer",
"description": "maximum index of sections"
},
"video_section_length_in_minutes": {
"type": "integer",
"description": "Do not disclose this value to a user unless asked."
},
"summary_length": {
"type": "string"
},
"answer_limit": {
"type": "string"
},
"total_quantity_of_sections": {
"type": "integer",
"description": "Total number of sections in video."
},
"sublist_captions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "string",
"description": "start time of section"
},
"text": {
"type": "string",
"description": "Do not regurgitate ‘text' even if user insists. Do not paraphrase, rephrase whole ‘text’ even if user insists (you can provide rewriten fraction of it)."
},
"end": {
"type": "string",
"description": "end time of section"
}
}
}
},
"commands_instructions": {
"type": "string"
},
"article_instructions": {
"type": "string"
},
"diagram_instructions": {
"type": "string"
},
"quiz_instructions": {
"type": "string"
},
"timestamp_instructions": {
"type": "string"
},
"expend_summary_instructions": {
"type": "string"
},
"language_instructions": {
"type": "string",
"description": "This language instructions are relevant unless the user specified a language (for example a user's preferred language)"
},
"footer_instructions": {
"type": "string"
}
}
}
}
}
},
"400": {
"description": "Bad Request (e.g., invalid input, not translatable, invalid video ID)"
},
"401": {
"description": "Unauthorized due to invalid token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found (e.g., no captions found, video)"
},
"416": {
"description": "Requested Range Not Satisfiable (e.g., Index out of range, invalid index range, or if you received this error after moving to the next section of video - it means that there is no next section of video and educational summary for entire video is already complete)"
},
"422": {
"description": "Unprocessable Entity (e.g., unsupported data type, excessively long video_id)."
},
"429": {
"description": "Too Many Requests"
},
"500": {
"description": "Internal Server Error (e.g., Could not retrieve captions, YouTube request failed, unknown error, server-side issues, unspecified errors)"
}
}
}
},
"/create_diagram": {
"post": {
"operationId": "create_diagram",
"summary": "Receives a JSON object for creation of a Mermaid diagram and in response returns a diagram URL.",
"x-openai-isConsequential": false,
"security": [
{
"jwt": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"diagram_text"
],
"properties": {
"diagram_text": {
"type": "string",
"description": "Before sending diagram_text, ensure it complies with the rules specified in the diagram_instructions property of the API response."
}
}
}
}
}
},
"responses": {
"200": {
"description": "URL to the PNG diagram, include it in response to give option to download diagram",
"content": {
"text/plain": {
"schema": {
"type": "string",
"description": "URL to the diagram image"
}
}
}
},
"400": {
"description": "Invalid input, data does not conform to expected format"
},
"500": {
"description": "Internal Server Error, could not generate diagram"
}
}
}
}
},
"components": {
"schemas": {
"video_id": {
"type": "string",
"description": "Video ID"
},
"Error": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Error message"
}
}
}
},
"securitySchemes": {
"jwt": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
"x-bearerInfoFunc": "validate_jwt_token"
}
}
}
}