API automation
Creatomate is built around its REST API. Every render is an HTTP request, and so is creating or editing a template. This lets you add video and image generation to any application, in any programming language.
One request, one video
Most API users start from a template designed in the editor. A single request names the template and the content to fill in. That content is called a modification: for each element, its name and its new value.
curl -X POST https://api.creatomate.com/v2/renders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-d '{
"template_id": "YOUR_TEMPLATE_ID_HERE",
"modifications": {
"Title": "Welcome to Creatomate",
"Background-Image": "https://cdn.creatomate.com/demo/image1.jpg"
}
}'Creatomate makes a copy of the template, applies the modifications, and renders it. The request goes to https://api.creatomate.com/v2/renders, with your project's API key. The response contains the URL where the video will be once it's done.
A render takes anywhere from a few seconds to a few minutes. To find out when it's done, add a webhook URL to the request. Creatomate calls that URL when the render has finished, successfully or not. You can also check the status yourself, with a GET request for the render's ID.
Ready-made code
You don't have to write the first request yourself. Open your template, click Use Template, then Developer API. The editor shows the request for that template in cURL, Node.js, Python, PHP, and other languages, with its dynamic elements filled in.
Without a template
The same endpoint also accepts RenderScript, the JSON format every template is made of. With it, your code can describe a whole video from scratch. For example, your code can build a slideshow with as many photos as a user uploaded. Templates can also be created and edited through the API, so your own system can manage a library of designs.
A single request that renders a template, followed by examples for the most common tasks.
Authentication, every endpoint, request and response formats, and the limits that apply.
The format for the changes a request makes to a template, from a text value to adding whole scenes.
Show a live preview of a template inside your own application, before rendering it through the API.