Usable endpoint to synchronise actual video information, including name, tags and slides.

๐Ÿ“˜

How to create proper structure

The structure of the video is quite complex, so If you want to create/update the structure of the slide from API, the best way to do it would be toย create the layout in the Elai UI, retrieve it using GET /videos/:videoId, and use the structure from response JSON body.

๐Ÿšง

Update slide status

By default, we don't re-render each slide if you don't change it. So if you want any slide to be re-rendered, you need to change its status in your PATCH call to 'edited'. Please make sure slides[].status = 'edited' is set for each slide you want to be re-rendered.

{
    "tags": [],
    "status": "draft",
    "verified": true,
    "public": true,
    "id": "628533740e4e642def3141ab",
    "name": "Greetings for {{name}}",
    "userId": "627b9a3fe5a60082d0cecc3e",
    "accountId": "627b9a3fe5a60082d0cecc3f",
    "createdAt": "2022-05-18T17:57:08.004Z",
    "updatedAt": "2022-05-18T17:57:11.339Z",
    "slides": [
        {
            "id": 1634592244043,
            "speech": "Hello {{name}} with voice!",
            "avatar": {
                "id": "zara.regular",
                "name": "Casual",
                "gif": "https://elai-media.s3.eu-west-2.amazonaws.com/avatars/zara.gif",
                "thumbnail": "https://elai-media.s3.eu-west-2.amazonaws.com/avatars/zara.jpg",
                "canvas": "https://elai-media.s3.eu-west-2.amazonaws.com/avatars/zara.png",
                "tilt": {
                    "top": -0.02
                },
                "gender": "female"
            },
            "language": "English",
            "voice": "en-US-AriaNeural",
            "voiceType": "text",
            "animation": "fade_in",
            "canvas": {
                "version": "4.4.0",
                "background": "#ffffff",
                "objects": [
                    {
                        "type": "avatar",
                        "left": 350,
                        "top": 144.6,
                        "scaleX": 0.6,
                        "scaleY": 0.6,
                        "avatarType": "transparent",
                        "src": "https://elai-media.s3.eu-west-2.amazonaws.com/avatars/zara.png",
                        "fill": "#a56ced",
                        "animation": {
                            "type": null
                        },
                        "width": 360,
                        "height": 360
                    }
                ]
            },
            "newlyAdded": false,
            "duration": null,
            "approxDuration": 1.7333333333333334,
            "status": "edited",
            "played": true,
            "internal": {
                "audioUrl": "https://elai-media.s3.eu-west-2.amazonaws.com/videos/628533740e4e642def3141ab/1634592244043/speech.mp3"
            }
        }
    ]
}
{
    "tags": ["welcome", "template"],
    "name": "Greetings for {{name}}",
    "slides": [
        {
            "id": 1634592244043,
            "speech": "Hello {{name}} with voice!",
            "bg": {
                "type": "color",
                "color": "#FFFFFF",
                "position": {
                    "x": 0,
                    "y": 0,
                    "zoom": 1
                },
                "trimStart": 0
            },
            "avatar": {
                "id": "zara.regular",
                "name": "Casual",
                "gif": "https://elai-media.s3.eu-west-2.amazonaws.com/avatars/zara.gif",
                "thumbnail": "https://elai-media.s3.eu-west-2.amazonaws.com/avatars/zara.png",
                "tilt": {
                    "top": -4,
                    "left": -13.5
                },
                "gender": "female"
            },
            "avatarProps": {
                "size": 66,
                "position": 55,
                "verticalPosition": 0,
                "type": "transparent",
                "color": "#f88074"
            },
            "language": "English",
            "voice": "en-US-JennyNeural",
            "voiceType": "text",
            "animation": null,
            "duration": 2.4,
            "approxDuration": 1.7333333333333334,
            "status": "inQueue",
            "canvas": {
                "version": "4.4.0",
                "objects": []
            },
            "played": true,
            "internal": {
                "audioUrl": "https://elai-media.s3.eu-west-2.amazonaws.com/videos/628533740e4e642def3141ab/1634592244043/speech.mp3"
            }
        }
    ]
}

๐Ÿ‘

Slide structure

More details about slide structure can be found here

Language
Authentication
Header
Click Try It! to start a request and see the response here!