JSON2Video provides you with SDKs for the most popular programming languages to make the implementation even easier. We currently support PHP and NodeJS, but other SDKs are in the short-term pipeline: Python, Go and other.

SDK basic concepts

All our SDKs have common concepts you should understand:

Steps for creating a video with the SDKs

1. Create and setup the Movie object

  1. Create the Movie object
  2. Set your API key
  3. Set your project name
  4. Define your desired resolution and quality (optional)
{
    "project": "tutorial",
    "resolution": "full-hd",
    "quality": "high"
}

2. Create one or more Scenes

  1. Create one or more Scene objects
  2. Add elements to them with the addElement method
  3. Add the scenes to the movie with the addScene method
{
    "project": "tutorial",
    "resolution": "full-hd",
    "quality": "high",
    "scenes": [
        {
            "background-color": "#4392F1",
            "elements": [
                {
                    "type": "text",
                    "items": [
                        {
                            "text": "Hello world"
                        }
                    ],
                    "y": 510,
                    "duration": 10
                }
            ]
        }
    ]
}

3. Send the render request

  1. Post the movie to be rendered with the render method
{
    "project": "tutorial",
    "resolution": "full-hd",
    "quality": "high",
    "scenes": [
        {
            "background-color": "#4392F1",
            "elements": [
                {
                    "type": "text",
                    "items": [
                        {
                            "text": "Hello world"
                        }
                    ],
                    "y": 510,
                    "duration": 10
                }
            ]
        }
    ]
}

4. Check the render status

  1. Check the status of your rendering job calling the getStatus method every few seconds
{
    "project": "tutorial",
    "resolution": "full-hd",
    "quality": "high",
    "scenes": [
        {
            "background-color": "#4392F1",
            "elements": [
                {
                    "type": "text",
                    "items": [
                        {
                            "text": "Hello world"
                        }
                    ],
                    "y": 510,
                    "duration": 10
                }
            ]
        }
    ]
}