{
    "openapi": "3.0.2",
    "info": {
        "title": "JSON2Video API",
        "version": "2.0.0",
        "description": "Create and edit awesome videos programmatically"
    },
    "servers": [
        {
            "url": "https://api.json2video.com/v2",
            "description": "Version 2 endpoint"
        }
    ],
    "paths": {
        "/movies": {
            "get": {
                "operationId": "getMovies",
                "summary": "Get the status of your movies",
                "description": "Get the status any of your movies by passing your project ID in the <code>project</code> query parameter. You can get your project ID from the response of the POST request.",
                "responses": {
                    "200": {
                        "description": "Ok"
                    }
                }
            },
            "post": {
                "operationId": "newMovie",
                "summary": "Create a new movie",
                "description": "Submit a new movie rendering job.",
                "responses": {
                    "200": {
                        "description": "Added"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/movie"
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "movie": {
                "title": "Movie",
                "type": "object",
                "description": "Object defining the movie to be rendered",
                "additionalProperties": false,
                "required": [
                    "scenes"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Movie ID string. It must be unique per project",
                        "default": "@randomString"
                    },
                    "comment": {
                        "type": "string",
                        "description": "Used for adding your comments"
                    },
                    "draft": {
                        "type": "boolean",
                        "deprecated": true,
                        "description": "Deprecated. This property is ignored and has no effect. Watermarking is now controlled automatically based on the account plan.",
                        "default": true,
                        "enum": [ true, false ]
                    },
                    "variables": {
                        "type": "object",
                        "description": "Variables of the template. Variable names can only contain letters, numbers and underscores",
                        "default": {},
                        "example": {
                            "myVariable": "myValue",
                            "myOtherVariable": true,
                            "myThirdVariable": 123
                        }
                    },
                    "resolution": {
                        "type": "string",
                        "description": "Set the movie size based on common use cases. Use <code>custom</code> to set a custom size with the <code>width</code> and <code>height</code> properties",
                        "default": "custom",
                        "enum": [
                            "sd",
                            "hd",
                            "full-hd",
                            "squared",
                            "instagram-story",
                            "instagram-feed",
                            "twitter-landscape",
                            "twitter-portrait",
                            "custom"
                        ]
                    },
                    "width": {
                        "type": "integer",
                        "description": "Width of the movie. Only applicable if resolution is set to <code>custom</code>",
                        "dependsOn": {
                            "resolution": "custom"
                        },
                        "default": 640,
                        "minimum": 50,
                        "maximum": 3840,
                        "example": 640
                    },
                    "height": {
                        "type": "integer",
                        "description": "Height of the movie. Only applicable if resolution is set to <code>custom</code>",
                        "dependsOn": {
                            "resolution": "custom"
                        },
                        "default": 360,
                        "minimum": 50,
                        "maximum": 3840,
                        "example": 360
                    },
                    "quality": {
                        "type": "string",
                        "description": "Quality of the final rendered movie. Use it for speeding up the rendering process. <code>low</code> is the lowest quality, <code>high</code> is the highest quality",
                        "enum": [
                            "low",
                            "medium",
                            "high"
                        ],
                        "default": "high"
                    },
                    "fps": {
                        "hidden": true,
                        "type": "integer",
                        "description": "Frames per second",
                        "default": 25
                    },
                    "client-data": {
                        "hidden": false,
                        "type": "object",
                        "description": "Key-value pairs that will be included in the response of the GET requests and in the webhook payloads. Client data is intended to pass on information to the following steps of the workflow.",
                        "default": {}
                    },
                    "settings": {
                        "hidden": true,
                        "type": "object",
                        "description": "Deprecated"
                    },
                    "scenes": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/scene"
                        }
                    },
                    "elements": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/video"
                                },
                                {
                                    "$ref": "#/components/schemas/image"
                                },
                                {
                                    "$ref": "#/components/schemas/text"
                                },
                                {
                                    "$ref": "#/components/schemas/html"
                                },
                                {
                                    "$ref": "#/components/schemas/component"
                                },
                                {
                                    "$ref": "#/components/schemas/template"
                                },
                                {
                                    "$ref": "#/components/schemas/audio"
                                },
                                {
                                    "$ref": "#/components/schemas/voice"
                                },
                                {
                                    "$ref": "#/components/schemas/audiogram"
                                },
                                {
                                    "$ref": "#/components/schemas/subtitles"
                                }
                            ],
                            "discriminator": {
                                "propertyName": "type"
                            }
                        }
                    },
                    "cache": {
                        "type": "boolean",
                        "description": "Use the cached version of the movie if its available",
                        "default": true
                    },
                    "exports": {
                        "type": "array",
                        "description": "You can define different types of exports for your movie. Check the <a href=\"https://json2video.com/docs/tutorial/exports\">documentation</a> for more information",
                        "items": {
                            "export": {
                                "title": "export",
                                "description": "Export type",
                                "type": "object"
                            }
                        }
                    }
                },
                "example": {
                    "comment": "MyProject",
                    "resolution": "full-hd",
                    "scenes": [{
                        "elements": [{
                            "type": "video",
                            "src": "https://example.com/path/to/my/video.mp4"
                        }]
                    }]
                }
            },
            "scene": {
                "title": "Scene",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "ID of the scene",
                        "default": "@randomString"
                    },
                    "condition": {
                        "type": "string",
                        "description": "OPTIONAL. Condition to be met for the scene to be rendered. If the value is false or empty string, the scene is removed from the movie"
                    },
                    "variables": {
                        "type": "object",
                        "description": "Local variables of the scene. Variable names can only contain letters, numbers and underscores",
                        "default": {},
                        "example": {
                            "myVariable": "myValue",
                            "myOtherVariable": true,
                            "myThirdVariable": 123
                        }
                    },
                    "comment": {
                        "type": "string",
                        "description": "Used for adding your comments"
                    },
                    "background-color": {
                        "type": "string",
                        "control": "color",
                        "description": "A hexadecimal representation of a color or 'transparent'",
                        "example": "#FF0000",
                        "default": "#000000"
                    },
                    "duration": {
                        "type": "number",
                        "format": "float",
                        "description": "Sets the scene duration in seconds. A value of -1 means that the scene lasts enough to contain all its elements",
                        "default": -1
                    },
                    "elements": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/video"
                                },
                                {
                                    "$ref": "#/components/schemas/image"
                                },
                                {
                                    "$ref": "#/components/schemas/text"
                                },
                                {
                                    "$ref": "#/components/schemas/html"
                                },
                                {
                                    "$ref": "#/components/schemas/component"
                                },
                                {
                                    "$ref": "#/components/schemas/audio"
                                },
                                {
                                    "$ref": "#/components/schemas/voice"
                                },
                                {
                                    "$ref": "#/components/schemas/audiogram"
                                },
                                {
                                    "$ref": "#/components/schemas/subtitles"
                                }
                            ],
                            "discriminator": {
                                "propertyName": "type"
                            }
                        }
                    },
                    "transition": {
                        "type": "object",
                        "hidden": true,
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "default": "xfade",
                                "enum": [
                                    "xfade"
                                ]
                            },
                            "style": {
                                "type": "string",
                                "default": "fade",
                                "example": "circleopen",
                                "enum": [
                                    "fade",
                                    "wipeleft",
                                    "wiperight",
                                    "wipeup",
                                    "wipedown",
                                    "slideleft",
                                    "slideright",
                                    "slideup",
                                    "slidedown",
                                    "circlecrop",
                                    "rectcrop",
                                    "distance",
                                    "fadeblack",
                                    "fadewhite",
                                    "radial",
                                    "smoothleft",
                                    "smoothright",
                                    "smoothup",
                                    "smoothdown",
                                    "circleopen",
                                    "circleclose",
                                    "vertopen",
                                    "vertclose",
                                    "horzopen",
                                    "horzclose",
                                    "dissolve",
                                    "pixelize",
                                    "diagtl",
                                    "diagtr",
                                    "diagbl",
                                    "diagbr",
                                    "hlslice",
                                    "hrslice",
                                    "vuslice",
                                    "vdslice",
                                    "hblur",
                                    "fadegrays",
                                    "wipetl",
                                    "wipetr",
                                    "wipebl",
                                    "wipebr",
                                    "squeezeh",
                                    "squeezev"
                                ]
                            },
                            "duration": {
                                "type": "number",
                                "description": "Duration of the transition in seconds",
                                "format": "float",
                                "example": 1.5
                            }
                        }
                    },
                    "cache": {
                        "type": "boolean",
                        "default": true,
                        "description": "Use the cached version of the scene if its available"
                    }
                }
            },
            "BaseElement": {
                "title": "BaseElement",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "ID of the element",
                        "default": "@randomString"
                    },
                    "condition": {
                        "type": "string",
                        "description": "OPTIONAL. Condition to be met for the element to be rendered. If the value is false or empty string, the element is removed from the scene"
                    },
                    "variables": {
                        "type": "object",
                        "description": "Local variables of the element. Variable names can only contain letters, numbers and underscores",
                        "default": {},
                        "example": {
                            "myVariable": "myValue",
                            "myOtherVariable": true,
                            "myThirdVariable": 123
                        }
                    },
                    "comment": {
                        "type": "string",
                        "description": "Used for adding your comments"
                    },
                    "duration": {
                        "type": "number",
                        "default": -1,
                        "example": 7.3,
                        "format": "float",
                        "description": "Element's duration in seconds. A value of -1 auto calculates the duration based on the asset/file intrinsic length. A value of -2 sets the element duration to the parent scene or element duration"
                    },
                    "start": {
                        "type": "number",
                        "format": "float",
                        "default": 0,
                        "description": "Element's starting time in seconds relative to the container scene or the movie if the element is in the Movie's elements array."
                    },
                    "extra-time": {
                        "type": "number",
                        "default": 0,
                        "example": 0.5,
                        "format": "float",
                        "description": "Element's time span added after the playback."
                    },
                    "z-index": {
                        "type": "number",
                        "default": 0,
                        "minimum": -99,
                        "maximum": 99,
                        "example": 3,
                        "format": "integer",
                        "description": "Element's z-index. Use this property to reorganize the layering of the elements like in HTML"
                    },
                    "cache": {
                        "type": "boolean",
                        "default": true,
                        "example": false,
                        "format": "boolean",
                        "description": "Use the cached version of the element if its available"
                    },
                    "fade-in": {
                        "type": "number",
                        "format": "float",
                        "minimum": 0,
                        "description": "Adds a fade in effect to the element. Value in seconds."
                    },
                    "fade-out": {
                        "type": "number",
                        "format": "float",
                        "minimum": 0,
                        "description": "Adds a fade out effect to the element. Value in seconds."
                    }
                }
            },
            "AudioElement": {
                "title": "AudioElement",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "muted": {
                        "type": "boolean",
                        "default": false,
                        "description": "Mutes the audio"
                    },
                    "volume": {
                        "type": "number",
                        "description": "Volume gain of the audio. A value of 1 means no gain. Higher values increase the volume. Values lower than 1 decrease the volume",
                        "default": 1.0,
                        "minimum": 0,
                        "maximum": 10
                    },
                    "speed": {
                        "type": "number",
                        "description": "Playback speed multiplier applied to the asset. A value of 1 plays at normal speed, values greater than 1 play faster (e.g. 1.5 is 50% faster) and values lower than 1 play slower (e.g. 0.5 is half speed). For video the frames are retimed; for audio the tempo is changed while preserving pitch. The element duration shortens or lengthens accordingly. Note: 'seek' is measured in the original asset timeline (it is applied before the speed change).",
                        "default": 1,
                        "minimum": 0.5,
                        "maximum": 4
                    }
                }
            },
            "VisualElement": {
                "title": "VisualElement",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "position": {
                        "type": "string",
                        "description": "Sets the element position in the scene. A value of 'custom' sets a custom position based on the provided 'x' and 'y' properties",
                        "enum": [ 
                            "top-left", "top-right", "bottom-right", "bottom-left", "center-center", "custom"
                        ],
                        "default": "custom"
                    },
                    "x": {
                        "type": "number",
                        "format": "integer",
                        "dependsOn": {
                            "position": "custom"
                        },
                        "description": "Sets the horizontal position of the element in the scene. The value <code>0</code> is on the left side",
                        "default": 0
                    },
                    "y": {
                        "type": "number",
                        "format": "integer",
                        "dependsOn": {
                            "position": "custom"
                        },
                        "description": "Sets the vertical position of the element in the scene. The value <code>0</code> is on the top side",
                        "default": 0
                    },
                    "resize": {
                        "type": "string",
                        "description": "Sets the resize mode of the element. A value of 'cover' or 'fill' stretches the element to cover the entire movie canvas. A value of 'fit' or 'contain' stretches the element to fit the movie canvas. If set, the 'width' and 'height' properties are ignored",
                        "enum": [ "cover", "fill", "fit", "contain" ]
                    },
                    "width": {
                        "type": "integer",
                        "description": "Sets the width of the element, scaling up or down if required. A value of '-1' means to keep the aspect ratio",
                        "minimum": -1,
                        "default": -1
                    },
                    "height": {
                        "type": "integer",
                        "description": "Sets the height of the element, scaling up or down if required. A value of '-1' means to keep the aspect ratio",
                        "minimum": -1,
                        "default": -1
                    },
                    "scale": {
                        "type": "object",
                        "description": "This property is deprecated. Use 'width' and 'height' instead",
                        "additionalProperties": false,
                        "properties": {
                            "width": {
                                "type": "integer",
                                "description": "Sets the width for scaling the element",
                                "minimum": -1,
                                "default": -1
                            },
                            "height": {
                                "type": "integer",
                                "description": "Sets the height for scaling the element",
                                "minimum": -1,
                                "default": -1
                            }
                        }
                    },
                    "rotate": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "angle": {
                                "type": "number",
                                "description": "Sets the angle of rotation",
                                "minimum": -360,
                                "maximum": 360,
                                "default": 0
                            },
                            "speed": {
                                "type": "number",
                                "description": "Sets the time it takes to rotate the provided angle. A zero value means no movement",
                                "minimum": 0,
                                "default": 0
                            }
                        },
                        "required": [ "angle" ]
                    },
                    "crop": {
                        "type": "object",
                        "additionalProperties": false,
                        "description": "Crops the element",
                        "properties": {
                            "x": {
                                "type": "integer",
                                "description": "Sets the left point of croping",
                                "default": 0
                            },
                            "y": {
                                "type": "integer",
                                "description": "Sets the top point of croping",
                                "default": 0
                            },
                            "width": {
                                "type": "integer",
                                "description": "Sets the width of the croping"
                            },
                            "height": {
                                "type": "integer",
                                "description": "Sets the height of the croping"
                            }
                        },
                        "required": [
                            "width",
                            "height"
                        ]
                    },
                    "zoom": {
                        "type": "integer",
                        "description": "Zooms the element with the specified level percentage. Positive values zoom in, negative values zoom out, zero does not zoom. Zoom can be combined with the <code>pan</code> property to set the focus point of the zooming",
                        "minimum": -10,
                        "maximum": 10
                    },
                    "pan": {
                        "type": "string",
                        "description": "Pans the element to the specified direction. If <code>zoom</code> property is not specified, the effect is a non-zooming pan",
                        "enum": [ 
                            "left", "top", "right", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"
                        ]
                    },
                    "pan-distance": {
                        "type": "number",
                        "format": "float",
                        "description": "Is the distance of the panning effect. A higher value means a larger panning movement (higher speed)",
                        "minimum": 0.01,
                        "default": 0.1,
                        "maximum": 0.5
                    },
                    "pan-crop": {
                        "type": "boolean",
                        "description": "Enable or disable the crop effect when panning",
                        "default": true
                    },
                    "chroma-key": {
                        "type": "object",
                        "description": "Allows to define a color (or a range of colors) that will be converted to transparent",
                        "properties": {
                            "color": {
                                "type": "string",
                                "description": "Set the color for which alpha will be set to 0 (full transparency)",
                                "example": "#00b140"
                            },
                            "tolerance": {
                                "type": "integer",
                                "description": "Makes the selection more or less sensitive to changes in color. A value of 1 will select only the provided color. A value of 100 will select all colors, so the full canvas",
                                "minimum": 1,
                                "maximum": 100,
                                "default": 25
                            }
                        },
                        "required": [ "color" ]
                    },
                    "correction": {
                        "type": "object",
                        "description": "Allows to adjust the contrast, brightness, saturation and gamma of the element",
                        "additionalProperties": false,
                        "properties": {
                            "contrast": {
                                "type": "number",
                                "description": "Adjust the contrast",
                                "minimum": -1000,
                                "maximum": 1000,
                                "default": 1
                            },
                            "brightness": {
                                "type": "number",
                                "description": "Adjust the brightness",
                                "minimum": -1,
                                "maximum": 1,
                                "default": 0
                            },
                            "saturation": {
                                "type": "number",
                                "description": "Adjust the saturation",
                                "minimum": 0,
                                "maximum": 3,
                                "default": 1
                            },
                            "gamma": {
                                "type": "number",
                                "description": "Adjust the gamma",
                                "minimum": 0.1,
                                "maximum": 10,
                                "default": 1
                            },
                            "blur": {
                                "type": "number",
                                "description": "Apply gaussian blur. A value of 0 means no blur. A value of 10 means maximum blur.",
                                "minimum": 0,
                                "maximum": 50,
                                "default": 0
                            }
                        }
                    },
                    "flip-horizontal": {
                        "type": "boolean",
                        "description": "Flips the element horizontally",
                        "default": false
                    },
                    "flip-vertical": {
                        "type": "boolean",
                        "description": "Flips the element vertically",
                        "default": false
                    },
                    "mask": {
                        "type": "object",
                        "description": "A predefined mask name or a URL to a PNG or video file defining a mask for the element. For external mask files, black color is transparent, white is solid, and gray tones in between are partially transparent. Predefined masks names are: 'circle'.",
                        "properties": {
                            "src": {
                                "type": "string",
                                "description": "URL to the mask file"
                            },
                            "seek": {
                                "type": "number",
                                "description": "Seek to the specified time in seconds relative to the begining of the asset. Use negative values to seek backwards",
                                "format": "float",
                                "default": 0
                            }
                        }
                    }
                }
            },
            "CaptureProperty": {
                "title": "CaptureProperty",
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "capture": {
                        "type": "object",
                        "description": "Browser capture settings",
                        "additionalProperties": false,
                        "properties": {
                            "width": {
                                "type": "integer",
                                "description": "Viewport width",
                                "default": 640,
                                "minimum": 50,
                                "maximum": 1920
                            },
                            "height": {
                                "type": "integer",
                                "description": "Viewport height",
                                "default": 360,
                                "minimum": 50,
                                "maximum": 1920
                            },
                            "duration": {
                                "type": "number",
                                "format": "float",
                                "description": "Screen recording duration in seconds. Use 0 to take a screenshot",
                                "default": 0,
                                "minimum": 0,
                                "maximum": 10
                            }
                        },
                        "required": [
                            "width",
                            "height"
                        ]
                    }
                }
            },
            "video": {
                "title": "Video",
                "allOf": [
                    {
                        "type": "object",
                        "required": [
                            "type"
                        ],
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "video"
                                ]
                            },
                            "src": {
                                "type": "string",
                                "format": "uri",
                                "description": "URL to the asset file. Videos can be in MP4, MKV, MOV but MP4 is recommended."
                            }
                        }
                    },
                    {
                        "$ref": "#/components/schemas/BaseElement"
                    },
                    {
                        "$ref": "#/components/schemas/VisualElement"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "loop": {
                                "type": "integer",
                                "minimum": -1,
                                "example": -1,
                                "description": "Sets the number of loops the video to play. Use -1 for an infinite loop. The default value of 1 plays the video just once."
                            },
                            "seek": {
                                "type": "number",
                                "description": "Seek to the specified time in seconds relative to the begining of the asset. Use negative values to seek backwards",
                                "format": "float",
                                "default": 0
                            }
                        }
                    },
                    {
                        "$ref": "#/components/schemas/AudioElement"
                    }
                ]
            },
            "image": {
                "title": "Image",
                "allOf": [
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "image"
                                ]
                            },
                            "src": {
                                "type": "string",
                                "format": "uri",
                                "description": "URL to the asset file. Images can be in JPG, PNG, GIF or any common image format."
                            }
                        }
                    },
                    {
                        "$ref": "#/components/schemas/BaseElement"
                    },
                    {
                        "$ref": "#/components/schemas/VisualElement"
                    }
                ]
            },

            "text": {
                "title": "Text",
                "description": "Creates a text element of a given style",
                "allOf": [
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "text"
                                ]
                            },
                            "style": {
                                "type": "string",
                                "control": "component-picker",
                                "description": "Style of the text element. Check all available text style at <a href='https://json2video.com/docs/resources/text/'>https://json2video.com/resources/text/</a>",
                                "example": "003",
                                "default": "001"
                            },
                            "text": {
                                "type": "string",
                                "description": "Text to be printed. The text string does not accept HTML formatting.",
                                "example": "Lorem ipsum dolor sit amet"
                            },
                            "settings": {
                                "type": "object",
                                "control": "component-settings",
                                "dependsOn": {
                                    "style": "__not_empty__"
                                },
                                "description": "Text formatting settings, applied to the text as CSS properties: use the exact CSS property name, for example <code>font-size</code>, <code>color</code>, <code>font-family</code>, <code>font-weight</code>, <code>text-align</code> or <code>background-color</code>. The text color property is <code>color</code> \u2014 <code>font-color</code> is not a CSS property and is silently ignored. Keys that are not supported CSS properties are ignored here (never rejected), so a typo shows up as unstyled text, not as an error. See the styles to confirm which properties are available. Note: the <code>subtitles</code> element does NOT use these settings \u2014 it has its own fixed list (<code>word-color</code>, <code>line-color</code>, \u2026).",
                                "default": {},
                                "example": {
                                    "font-size": "60px",
                                    "color": "#FF0000"
                                }
                            },
                            "width": {
                                "type": "integer",
                                "description": "Desired text element width. A value of '-1' inherits movie width",
                                "minimum": -1,
                                "maximum": 1920,
                                "default": -1
                            },
                            "height": {
                                "type": "integer",
                                "description": "Desired text element height. A value of '-1' inherits movie height",
                                "minimum": -1,
                                "maximum": 1080,
                                "default": -1
                            }
                        },
                        "required": [
                            "type", "text"
                        ]
                    },
                    {
                        "$ref": "#/components/schemas/BaseElement"
                    },
                    {
                        "$ref": "#/components/schemas/VisualElement"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "duration": {
                                "type": "number",
                                "format": "float",
                                "default": -2,
                                "minimum": -2,
                                "example": -1,
                                "description": "Element's duration in seconds. A value of -1 auto calculates the duration based on the asset/file intrinsic length. A value of -2 sets the element duration to the parent scene or element duration"
                            }
                        }
                    }
                ]
            },
            
            "component": {
                "title": "Component",
                "description": "Creates an element based on the specified feature",
                "allOf": [
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "component"
                                ]
                            },
                            "component": {
                                "type": "string",
                                "control": "component-picker",
                                "description": "ID of the Component element. Check all available components in the <a href='https://json2video.com/docs/resources/basic/'>library</a>",
                                "example": "basic/001"
                            },
                            "settings": {
                                "type": "object",
                                "control": "component-settings",
                                "dependsOn": {
                                    "component": "__not_empty__"
                                },
                                "description": "Settings to be passed to the component"
                            },
                            "width": {
                                "type": "integer",
                                "description": "Desired component element width. A value of '-1' inherits movie width",
                                "minimum": -1,
                                "maximum": 1920,
                                "default": -1
                            },
                            "height": {
                                "type": "integer",
                                "description": "Desired component element height. A value of '-1' inherits movie height",
                                "minimum": -1,
                                "maximum": 1080,
                                "default": -1
                            }
                        },
                        "required": [
                            "type", "component"
                        ]
                    },
                    {
                        "$ref": "#/components/schemas/BaseElement"
                    },
                    {
                        "$ref": "#/components/schemas/VisualElement"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "duration": {
                                "type": "number",
                                "format": "float",
                                "default": -2,
                                "minimum": -2,
                                "example": -1,
                                "description": "Element's duration in seconds. A value of -1 auto calculates the duration based on the asset/file intrinsic length. A value of -2 sets the element duration to the parent scene or element duration"
                            }
                        }
                    }
                ]
            },

            "template": {
                "title": "Template",
                "description": "Creates an element based on the specified feature",
                "allOf": [
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "template"
                                ]
                            },
                            "template": {
                                "type": "string",
                                "description": "ID of the Component element. Check all available components at <a href='https://json2video.com/docs/resources/basic/'>https://json2video.com/docs/resources/basic/</a>",
                                "example": "basic/001"
                            },
                            "settings": {
                                "type": "object",
                                "description": "Settings to be passed to the component"
                            },
                            "width": {
                                "type": "integer",
                                "description": "Desired text element width, but can be overriden by the component defaults. A value of <code>-1</code> means inherits scenes or movie width",
                                "minimum": -1,
                                "maximum": 1920,
                                "default": -1
                            },
                            "height": {
                                "type": "integer",
                                "description": "Desired text element height, but can be overriden by the component defaults. A value of <code>-1</code> means inherits scenes or movie height",
                                "minimum": -1,
                                "maximum": 1920,
                                "default": -1
                            }
                        },
                        "required": [
                            "type", "template"
                        ]
                    },
                    {
                        "$ref": "#/components/schemas/BaseElement"
                    },
                    {
                        "$ref": "#/components/schemas/VisualElement"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "duration": {
                                "type": "number",
                                "format": "float",
                                "default": -2,
                                "minimum": -2,
                                "example": -1,
                                "description": "Element's duration in seconds. A value of -1 auto calculates the duration based on the asset/file intrinsic length. A value of -2 sets the element duration to the parent scene or element duration"
                            }
                        }
                    }
                ]
            },

            "html": {
                "title": "HTML",
                "description": "Creates a video recording or a screenshot of the provided HTML snippet",
                "allOf": [
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "html"
                                ]
                            },
                            "html": {
                                "type": "string",
                                "description": "HTML snippet to render. Compatible with HTML5, CSS3 and Javascript",
                                "example": "&lt;h1&gt;Hello world&lt;/h1&gt;"
                            },
                            "src": {
                                "type": "string",
                                "description": "URL to the web page"
                            },
                            "wait": {
                                "type": "number",
                                "description": "Time in seconds to wait before taking the screenshot",
                                "default": 2,
                                "maximum": 5,
                                "minimum": 0
                            },
                            "tailwindcss": {
                                "type": "boolean",
                                "description": "Enables usage of TailwindCSS for the HTML snippet",
                                "default": false,
                                "example": true
                            },
                            "width": {
                                "type": "integer",
                                "description": "Desired text element width. A value of <code>-1</code> means inherits scenes or movie width",
                                "minimum": -1,
                                "maximum": 1920,
                                "default": -1
                            },
                            "height": {
                                "type": "integer",
                                "description": "Desired text element height. A value of <code>-1</code> means inherits scenes or movie height",
                                "minimum": -1,
                                "maximum": 1920,
                                "default": -1
                            }
                        },
                        "required": [
                            "type"
                        ]
                    },
                    {
                        "$ref": "#/components/schemas/BaseElement"
                    },
                    {
                        "$ref": "#/components/schemas/VisualElement"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "duration": {
                                "type": "number",
                                "format": "float",
                                "default": -2,
                                "minimum": -2,
                                "example": -1,
                                "description": "Element's duration in seconds. A value of -1 auto calculates the duration based on the asset/file intrinsic length. A value of -2 sets the element duration to the parent scene or element duration"
                            }
                        }
                    }
                ]
            },
            "audio": {
                "title": "Audio",
                "allOf": [
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "audio"
                                ]
                            },
                            "src": {
                                "type": "string",
                                "format": "uri",
                                "description": "URL to the asset file. Audios can be in MP3, WAV or any common audio format."
                            }
                        }
                    },
                    {
                        "$ref": "#/components/schemas/BaseElement"
                    },
                    {
                        "$ref": "#/components/schemas/AudioElement"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "loop": {
                                "type": "integer",
                                "minimum": -1,
                                "example": -1,
                                "description": "Sets the number of loops the video to play. Use -1 for an infinite loop. The default value of 1 plays the video just once."
                            },
                            "seek": {
                                "type": "number",
                                "description": "Seek to the specified time in seconds relative to the begining of the asset. Use negative values to seek backwards",
                                "format": "float",
                                "default": 0
                            }
                        }
                    }
                ]
            },
            "voice": {
                "title": "Voice",
                "description": "Creates a voice audio element from the provided text",
                "allOf": [
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "voice"
                                ]
                            },
                            "text": {
                                "type": "string",
                                "description": "The sentence or sentences to be converted to voice audio",
                                "control": "voice-generator"
                            },
                            "voice": {
                                "type": "string",
                                "description": "The voice name to be used. Check <a href=\"/docs/tutorial/voice-elements/\">available voices</a>."
                            },
                            "model": {
                                "type": "string",
                                "description": "The text-to-speech provider to use. Defaults to <code>azure</code>. Supported values include <code>azure</code> and <code>elevenlabs</code>."
                            },
                            "connection": {
                                "type": "string",
                                "description": "Connection ID to use for voice synthesis. If specified, the API key in the connection will be used. If not specified, JSON2Video's default keys are used and credits may be deducted."
                            }
                        },
                        "required": [
                            "type",
                            "text"
                        ]
                    },
                    {
                        "$ref": "#/components/schemas/BaseElement"
                    },
                    {
                        "$ref": "#/components/schemas/AudioElement"
                    }
                ]
            },

            "audiogram": {
                "title": "Audiogram",
                "description": "Visualizes the audio of the scene or movie as an audiogram",
                "allOf": [
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "audiogram"
                                ]
                            },
                            "color": {
                                "type": "string",
                                "description": "Color of the audiogram waves in hexadecimal format"
                            },
                            "opacity": {
                                "type": "number",
                                "format": "float",
                                "description": "Opacity of the audiogram",
                                "minimum": 0,
                                "maximum": 1,
                                "default": 0.5
                            },
                            "width": {
                                "type": "integer",
                                "description": "Desired audiogram element width. A value of '-1' inherits movie width",
                                "minimum": -1,
                                "maximum": 1920,
                                "default": -1
                            },
                            "height": {
                                "type": "integer",
                                "description": "Desired audiogram element height. A value of '-1' inherits movie height",
                                "minimum": -1,
                                "maximum": 1080,
                                "default": -1
                            },
                            "amplitude": {
                                "type": "number",
                                "format": "float",
                                "description": "Relative amplitude of the audiogram",
                                "minimum": 0,
                                "maximum": 10,
                                "default": 5
                            }
                        },
                        "required": [
                            "type"
                        ]
                    },
                    {
                        "$ref": "#/components/schemas/BaseElement"
                    },
                    {
                        "$ref": "#/components/schemas/VisualElement"
                    },
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "duration": {
                                "type": "number",
                                "format": "float",
                                "default": -2,
                                "minimum": -2,
                                "example": -1,
                                "description": "Element's duration in seconds. A value of -1 auto calculates the duration based on the asset/file intrinsic length. A value of -2 sets the element duration to the parent scene or element duration"
                            }
                        }
                    }
                ]
            },

            "subtitles": {
                "title": "Subtitles",
                "description": "Adds subtitles to the scene or movie by transcribing the voice audio.",
                "allOf": [
                    {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "subtitles"
                                ]
                            },
                            "comment": {
                                "type": "string",
                                "description": "Use it for your comments"
                            },
                            "language": {
                                "type": "string",
                                "description": "Language of the audio. Use <code>auto</code> to let the API detect the language automatically.",
                                "default": "auto",
                                "enum": [
                                    "auto", "en", "bg", "ca", "cs", "da", "nl", "en-AU", "en-GB", "en-NZ", "en-IN", "en-US",
                                    "et", "fr", "fi", "nl-BE", "de", "de-CH", "el", "hi", "hi-Latn", "hu", "id", "it", "ja",
                                    "ko", "lv", "lt", "ms", "no", "pl", "pt", "pt-BR", "ro", "ru", "sk", "es", "es-419", 
                                    "sv", "th", "tr", "uk", "vi", "zh", "zh-TW"
                                ]
                            },
                            "model": {
                                "type": "string",
                                "description": "Model to use for transcription. If no model is provided, a default model is used."
                            },
                            "captions": {
                                "type": "string",
                                "description": "Captions to use as subtitles. The string can be a URL to a file with the captions or the actual captions content properly encoded. Supported formats are SRT, VTT or ASS. If this property is ommited, the subtitles will be generated automatically from the audio."
                            },
                            "settings": {
                                "type": "object",
                                "description": "Settings to customize the subtitles. Unlike the CSS-based settings of the <code>text</code> element, this is a CLOSED list: only the properties below are accepted and any other key is rejected with <code>Property 'X' is not allowed in movie/elements[N]/settings</code>. In particular there is no <code>color</code> or <code>font-color</code> here \u2014 the colors are <code>word-color</code> (the word being spoken), <code>line-color</code> (the rest of the line), <code>outline-color</code>, <code>shadow-color</code> and <code>box-color</code>.",
                                "default": {},
                                "additionalProperties": false,
                                "properties": {
                                    "style": {
                                        "type": "string",
                                        "description": "Style of the subtitles. Check the tutorial for more details.",
                                        "enum": [
                                            "classic",
                                            "classic-progressive",
                                            "classic-one-word",
                                            "boxed-line",
                                            "boxed-word"
                                        ],
                                        "default": "classic"
                                    },
                                    "font-url": {
                                        "type": "string",
                                        "description": "URL to the font file to use for the subtitles. The font file must be in TTF format. The <code>font-family</code> property must match the font family name in the font file."
                                    },
                                    "font-family": {
                                        "type": "string",
                                        "description": "Font family of the subtitles. One of the font families below or a custom font family name if <code>font-url</code> is provided.",
                                        "default": "Arial",
                                        "enum": [
                                            "Arial",
                                            "Arial Bold",
                                            "Katibeh",
                                            "Lalezar",
                                            "Libre Baskerville",
                                            "Lobster",
                                            "Luckiest Guy",
                                            "Nanum Pen Script",
                                            "Nunito",
                                            "Pacifico",
                                            "Roboto",
                                            "Comic Neue",
                                            "Orelega One",
                                            "Oswald",
                                            "Oswald Bold",
                                            "Shrikhand",
                                            "Fredericka the Great",
                                            "Permanent Marker",
                                            "NotoSans Bold",
                                            "Simplified Chinese",
                                            "Traditional Chinese",
                                            "Japanese",
                                            "Korean",
                                            "Korean Bold",
                                            "Thai"
                                        ]
                                    },
                                    "font-size": {
                                        "type": "integer",
                                        "description": "Font size of the subtitles. Usual sizes are between 90 and 150. Defaults to 5% of the movie width."
                                    },
                                    "word-color": {
                                        "type": "string",
                                        "description": "Color of the spoken word",
                                        "default": "#FFFF00"
                                    },
                                    "line-color": {
                                        "type": "string",
                                        "description": "Color of the rest of words in the line",
                                        "default": "#FFFFFF"
                                    },
                                    "outline-color": {
                                        "type": "string",
                                        "description": "Outline color of the subtitles",
                                        "default": "#000000"
                                    },
                                    "outline-width": {
                                        "type": "integer",
                                        "description": "Width of the outline",
                                        "default": 0
                                    },
                                    "shadow-color": {
                                        "type": "string",
                                        "description": "Shadow color of the subtitles",
                                        "default": "#000000"
                                    },
                                    "shadow-offset": {
                                        "type": "integer",
                                        "description": "Offset of the shadow",
                                        "default": 0
                                    },
                                    "box-color": {
                                        "type": "string",
                                        "description": "Color of the box behind the subtitles. Depending on the style, it can be the background color of the spoken word or the full line",
                                        "default": "#000000"
                                    },
                                    "position": {
                                        "type": "string",
                                        "description": "Position of the subtitles",
                                        "default": "bottom-center",
                                        "enum": [ "top-left", "top-center", "top-right", "center-left", "center-center", "center-right", "bottom-left", "bottom-center", "bottom-right", "mid-bottom-center", "mid-top-center", "custom" ]
                                    },
                                    "x": {
                                        "type": "integer",
                                        "description": "X coordinate of the subtitles",
                                        "default": 0
                                    },
                                    "y": {
                                        "type": "integer",
                                        "description": "Y coordinate of the subtitles",
                                        "default": 0
                                    },
                                    "max-words-per-line": {
                                        "type": "integer",
                                        "description": "Maximum number of words per line",
                                        "default": 4
                                    },
                                    "all-caps": {
                                        "type": "boolean",
                                        "description": "Makes the subtitles all caps",
                                        "default": false
                                    },
                                    "keywords": {
                                        "type": "array",
                                        "description": "Keywords provides additional vocabulary to the transcription process. Use it to improve the accuracy of the transcription of non-standard words or phrases.",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "replace": {
                                        "type": "object",
                                        "description": "Replaces words with the specified replacement. Useful to correct the transcription of non-standard words or phrases."
                                    }
                                }
                            }
                        },
                        "required": [
                            "type"
                        ]
                    }
                ]
            }
        }
    }
}