Introduction

You can use the API to create video of custom_template and custom data.

Quickstart

Prerequisite

  • You need a creatify.ai account with API access.
  • You need to go through the Get your API key

Queue a generation task

Generate a video of custom_templates by calling the custom template endpoint .

visual_style is the custom template name.

import requests

url = "https://api.creatify.ai/api/custom_templates/"

payload = {
    "visual_style": "HouseSale",
    "data": {
        "address": "11 Anywhere Avenue",
        "city": "Vaughan",
        "state": "NS",
        "sqft": 1735,
        "bedrooms": 3,
        "bathrooms": 2,
        "price": 12000000,
        "estimated_monthly_payment": 2500,
        "openhouseDate_1": {
            "date": "2025-02-22",
            "time": "2:00pm"
        },
        "listing_images": {
            "image_1": "https://example.com/image1.jpg",
            "image_2": "https://example.com/image2.jpg",
            "image_3": "https://example.com/image3.jpg",
            "image_4": "https://example.com/image4.jpg",
            "image_5": "https://example.com/image6.jpg"
        },
        "name": "Mike Test",
        "email": "Mike.Test@test.net",
        "phone_number": "555-555-1234",
        "office_name": "Test Corp of Anytown",
        "head_shot": "https://example.com/image.jpeg"
    },
    "webhook_url": "https://webhook.site/4aa8b553-665d-4c3a-aa5b-11730161e138"
}

headers = {
    "X-API-ID": "<your-x-api-id>",
    "X-API-KEY": "<your-x-api-key>",
    "Content-Type": "application/json"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)

Check status

Now our service is generating the video. It will return a id of the custom_templates item. Then you can check the status of your video generation by sending a GET request to Get Custom Templates item by id.

import requests

url = "https://api.creatify.ai/api/custom_templates/{id}/"

headers = {
    "X-API-ID": "<your-x-api-id>",
    "X-API-KEY": "<your-x-api-key>"
}

response = requests.request("GET", url, headers=headers)

print(response.text)

Once the status is done, you can download the video, the link of the video is in the video_output field.