### Install JSON2Video SDK using npm Source: https://github.com/json2video/json2video-nodejs-sdk/blob/main/README.md Provides the command to install the JSON2Video Node.js SDK using the npm package manager. This is the first step to using the SDK in a project. ```Shell npm install json2video-sdk ``` -------------------------------- ### Create Hello World Video with JSON2Video SDK in Node.js Source: https://github.com/json2video/json2video-nodejs-sdk/blob/main/README.md This asynchronous function demonstrates the basic steps to create a video: initializing a Movie object, setting the API key and quality, creating a Scene, adding a text element to the scene, adding the scene to the movie, rendering the movie, and waiting for the rendering to complete. It requires the 'json2video-sdk' package. ```JavaScript const {Movie, Scene} = require("json2video-sdk"); async function main() { // Create a new movie let movie = new Movie; // Set your API key // Get your free API key at https://json2video.com movie.setAPIKey(YOUR_API_KEY); // Set movie quality: low, medium, high movie.set("quality", "high"); // Generate a video draft movie.set("draft", true); // Create a new scene let scene = new Scene; // Set the scene background color scene.set("background-color", "#4392F1"); // Add a text element printing "Hello world" in a fancy way (style 003) // The element is 10 seconds long and starts 2 seconds from the scene start scene.addElement({ type: "text", style: "003", text: "Hello world", duration: 10, start: 2 }); // Add the scene to the movie movie.addScene(scene); // Call the API and render the movie let render = await movie.render(); console.log(render); // Wait for the movie to finish rendering await movie .waitToFinish((status) => { console.log("Rendering: ", status.movie.status, " / ", status.movie.message); }) .then((status) => { console.log("Response: ", status); console.log("Movie is ready: ", status.movie.url); }) .catch((err) => { console.log("Error: ", err); }); } main(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.