Introduction

API that turns a script into an ultra-realistic voiceover.

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

Start a generation task. You can get the accent id by calling the Get voices interface.

import requests

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

payload = {
    "script": "Welcome to Creatify dot AI!",
    "accent": "7a258b67-e1d3-4025-8904-8429daa3a34d"
}
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 server is generating the audio from the text and accent you provided. It will return a id of the text_to_speech item. Then you can check the status of your audio generation by sending a GET request to Get text_to_speech item by id endpoint.

import requests

url = "https://api.creatify.ai/api/text_to_speech/{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 output field.