Learn the steps and key endpoints for creating videos with the Visla Open API.

sequenceDiagram
    participant User as User
    participant Visla as Visla

    User ->> Visla: register user<br/>[work email]
    Visla -->> User: return new user info
    Visla ->> User: Setup/Attach Open-API <Key/Secret>
    Note left of User: Use <Key/Secret> to generate<br/>an encrypted signature<br/>which will be used in HTTP headers.

    User ->> Visla: /script-to-video /create-video-by-url<br/>[valid script/URL] 
    Visla -->> User: return new video(project) info
    loop Loop until project is ready
        User ->> Visla: loop retrieving project status
        Visla -->> User: Creating Project -> Project Ready
    end
    User ->> Visla: /get-consumed-credit
    Visla -->> User: return number of consumed credit
    User ->> Visla: /export-video
    Visla -->> User: return exported video(clip) info
    loop Loop until clip is ready
        User ->> Visla: loop retrieving clip status
        Visla -->> User: Exporting Project to Video -> Video Ready
    end
    User ->> Visla: /get-download-link
    Visla -->> User: return clip download link

Register User

Input: The user provides a valid work email.
Action: The system registers the user in the Visla platform. The client calls Get User Info API to retrieve the user's information. Output: The system returns the user information.

Setup Open API Key/Secret

Action: The system generates and attaches an Open API Key and Secret to the user account.
Purpose: This enables authenticated interactions with the API.

Create Video from Script/Webpage

Input: A valid Script is provided to Create Video Project from Script API or a valid URL is provided to Create Video Project From URL API.
Action: The system creates a new video project based on the script/Webpage. Output: The system returns information about the new video project, including a unique project ID.

Check Project Status

Action: The client enters a loop, periodically calling Get Project Info API to retrieve the project’s status.
Purpose: To monitor the progress of the video project until it transitions from preparation to editing.

Retrieve Consumed Credits

Action: The client calls Get Project Consumed Credit API.
Output: The system returns the number of credits consumed by the video project.

Export Video

Input: The project ID is provided to Export Video to Clip API.
Action: The system exports the video project into a downloadable format. Output: The system returns information about the exported video clip, including a unique clip ID.

Check Clip Status

Action: The client enters another loop, periodically calling Get Clip Info API to retrieve the clip’s status.
Purpose: To monitor the progress of the video export until it transitions from publishing to completed.

Get Download Link

Input: The clip ID is provided to Get Clip Download Link API.
Action: The system generates a downloadable link for the video clip. Output: The system returns the clip download link.