DEV Community

FlyNestor for Rollideo

Posted on


Create a video with auto-generated voice-overs with an API call

If you want to generate videos with voice-overs and to skip the repetitive tasks of video creation, follow this tutorial.

In this tutorial we are going to call an API with Python.

On the website Rollideo, you can launch the video generation directly from the home page, or use the APIs for more automation.

To use the Rollideo APIs:

  • Step 1: Create an account to get a free API key
  • Step 2: put your API key in the following code.
import requests, json, time

voice1 = "Joanna"

text1 = "A super easy tool to automatically create videos with auto-generated voice-overs and the exact subtitles. Example of a video sequence with " + voice1 +"'s voice."

picture1 = ''

data = {
    'text_segments': [
    'api_source_type': 'picture',
    'picture': picture1,
    'textforvideo': text1,  
    'voice_id': voice1  

headers = {'x-api-key': f"{APIKEY}"}
response ='', headers=headers, json=data)
data2 = response.json()
launched = data2.get("launched", "ko")

if launched == "ok":
    # Use the Polling API endpoint to find out the status the above request /create/video.
    for i in range(1000):
        response2 ='', headers=headers, json=data2)
        success = response2.json().get("success", "not yet")
        if success == "ok" or success == "ko":
    print("The launch of the task has failed")
Enter fullscreen mode Exit fullscreen mode

With a free account, you can create a video with one sequence.

You can upgrade your account to create longer videos with many sequences.

Top comments (0)

12 APIs That You Will Love

Free and easy to use APIs for your next project, learning a new technology, or building a new feature.