Pictory
  1. Video Editing API Flow
Pictory
  • API Flows
    • Text to Video API Flow
      • Step 1: Authenticate
      • Step 2: Generate Video Preview from Text
      • Step 3: GET Video Preview & Default Settings
      • Step 4: Render Video
      • Step 4: Render PUT
      • Step 5: GET Video Download URL
    • Video Editing API Flow
      • Step 1: Authenticate
        POST
      • Step 2: Obtain Pictory Upload URL
        POST
      • Step 3: Upload video to Pictory
        PUT
      • Step 4: v2 Transcribe Uploaded Video
        POST
      • Step 5: GET Default Transcription & Highlights Settings
        GET
      • Step 6: Render Video
        POST
      • Step 7: GET Video Download URL
        GET
    • Bulk Video Generation APIs
      • Step 1: Authenticate
      • Step2: Upload Project
      • Step3: Update Variables
      • Step 4: Get Video Preview
      • Step 5: Render Video
      • Step 6: GET Video Download URL
  • API Reference
    • /v1/oauth2/token
      POST
    • /v1/video/storyboard
      POST
    • /v1/job/{job_id}
      GET
    • /v1/media/generateUrl
      POST
    • Upload video to Pictory
      PUT
    • /v2/transcription (Transcript & Highlights)
      POST
    • /v2 GET Default Transcription & Highlights Settings
      GET
    • /v1/transcription
      POST
    • /v1 GET Default Transcription Settings
      GET
    • /v1/transcription/highlights
      POST
    • /v2/transcription/highlights
      POST
    • /v1 GET Default Highlight Settings
      GET
    • /v1/video/storyboard/fonts
      GET
    • Create Template
      POST
    • Update Template
      PUT
    • Get Templates
      GET
    • Create Template Video
      POST
    • Get Template By Id
      GET
    • Delete Template By Id
      DELETE
    • /v1/video/render
      POST
    • v1/media/search
      GET
  1. Video Editing API Flow

Step 6: Render Video

Develop Env
https://dev.your-api-server.com
Develop Env
https://dev.your-api-server.com
POST
/v1/video/render
This call Renders the video for download.
The video download link can be obtained from the GET Video Download URL call response body once the job has successfully completed.
"videoURL": "https://d3uryq9bhgb5qr.cloudfront.net/EnterpriseSubscription/PictoryQAVidyard/702f8260-c56a-4fbc-9741-ddc44df24aa2/VIDEO/testvideo.mp4"
Transcription data comes from the prior transcription call and is auto-captured in the Postman environment.
To view the capture method see API call Tests.
To view the stored data in the Postman environment, see values: transcript_settings, mediaInfo_settings, original_transcription, original_srt, original_vtt, video_highlights_for_30_seconds_settings, video_highlights_for_1_minute_settings, video_highlights_for_2_minutes_settings, video_highlights_for_5_minutes_settings, video_highlights_for_10_minutes_settings
Refer to Pictory Web App Storyboard for all setting values.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://dev.your-api-server.com/v1/video/render' \
--header 'Authorization: {{access_token}}' \
--header 'X-Pictory-User-Id: {{X-Pictory-User-Id}}' \
--header 'Content-Type: application/json' \
--data-raw '//Transcription data comes from prior transcription calls
//Auto-captured in the Postman environment
//View capture method by visiting the "Tests" portion of the call
//Check stored transcription data in Postman environment

//See Pictory Web App Storyboard for all possible setting values
{
    "audio": {}, //Not needed because we have audio from the video file in this API flow. However, this would be used in the Text to Video API flow.
    "output": { //Settings for the video file output
        "name": "{{file_name}}", //Name of the output video file
        "description": "American and Canadian president discuss countries relationship",
        "format": "mp4", //Supports only mp4
        "title": "American and Canadian Relations",
        "width": 1280, // 1920x1080 is 1080p; 1280x720 is 720p
        "height": 720
    },
    "scenes": [
        {
            "background": {
                "src": [
                    {
                        "url": "https://pictory-api-dev.s3.us-east-2.amazonaws.com/556d6b41-04b8-4fe1-abbe-949d08b6c104/VideoEditDemoInput.mp4", //Background Video or Image URL. Demo video: https://pictory-api-dev.s3.us-east-2.amazonaws.com/556d6b41-04b8-4fe1-abbe-949d08b6c104/VideoEditDemoInput.mp4
                        "asset_id": "", //Only used in Text to Video autogenerated visuals
                        "type": "video", //Video or image
                        "library": "", //3rd party stock visual library
                        "mode": "", //Crop or fit
                        "start": 4.14, //For video, start of the video segment
                        "end": 17.26, //For video, end of the video segment
                        "mute": false //Mute video sound. Usually true for Text to Video API flows
                    }
                ],
                "bg_animation": {
                    "animation": "" //For 3rd party images. Animations: pan-up/down/right/left, zoom-in
                }
            },
            "time": 13.12, //Scene duration in seconds
            "keywords": [], //Keywords to highlight in video the text
            "sub_scenes": [ //Each scene contains a sub-scene
                {
                    "time": 3.7, //Sub-scene text duration in seconds
                    "location": {
                        "center_x": 640, //Text'\''s center x-coordinate in video
                        "end_y": 669.5999999999999 //Text'\''s end y-coordinate in video
                    },
                    "text_lines": [ //Settings for subtitle display
                        {
                            "text": "We just completed a very productive meeting,",
                            "text_animation": [ //Animations for the text
                                {
                                    "animation": "", //Animations: expand-out, slide-in-left, fade-in, slide-in-left, slide-in-right
                                    "speed": 1 //Text animation speed. Percentage range from 0-2
                                }
                            ],
                            "text_bg_animation": [ //Background text animations
                                {
                                    "animation": "", //Animations: expand-out, slide-in-left, fade-in, slide-in-left, slide-in-right
                                    "speed": 1 //Text animation speed. Percentage range from 0-2
                                }
                            ]
                        }
                    ],
                    "subtitle": "",
                    "font": { //Subtitle font. See {{PictoryApiBaseUrl}}/video/storyboard/fonts for options
                        "name": "Arial.ttf",
                        "size": 32,
                        "line_spacing": 1.2,
                        "color": "rgba(255,255,255,255)", //Accepts rgba or hex color
                        "backcolor": "rgba(17,17,17,153)", //Accepts rgba or hex color
                        "keycolor": "rgba(226,226,170,255)", //Accepts rgba or hex color
                        "textShadowColor": "rgba(255,255,255,1)", //Accepts rgba or hex color
                        "textShadowWidthFr": 0,
                        "line_height": 55.328,
                        "case": null,
                        "decoration": [],
                        "fullWidth": false
                    }
                },
                {
                    "time": 2.58,
                    "location": {
                        "center_x": 640,
                        "end_y": 669.5999999999999
                    },
                    "text_lines": [
                        {
                            "text_animation": [ //Animations for the text
                                {
                                    "animation": "", //Animations: expand-out, slide-in-left, fade-in, slide-in-left, slide-in-right
                                    "speed": 1 //Text animation speed. Percentage range from 0-2
                                }
                            ],
                            "text_bg_animation": [ //Background text animations
                                {
                                    "animation": "", //Animations: expand-out, slide-in-left, fade-in, slide-in-left, slide-in-right
                                    "speed": 1 //Text animation speed. Percentage range from 0-2
                                }
                            ],
                            "text": "although I regret to inform you that we still have not"
                        }
                    ],
                    "subtitle": "",
                    "font": { //Subtitle font. See {{PictoryApiBaseUrl}}/video/storyboard/fonts for options
                        "name": "Arial.ttf",
                        "size": 32,
                        "line_spacing": 1.2,
                        "color": "rgba(255,255,255,255)", //Accepts rgba or hex color
                        "backcolor": "rgba(17,17,17,153)", //Accepts rgba or hex color
                        "keycolor": "rgba(226,226,170,255)", //Accepts rgba or hex color
                        "textShadowColor": "rgba(255,255,255,1)", //Accepts rgba or hex color
                        "textShadowWidthFr": 0,
                        "line_height": 55.328,
                        "case": null,
                        "decoration": [],
                        "fullWidth": false
                    }
                },
                {
                    "time": 4.56,
                    "location": {
                        "center_x": 640,
                        "end_y": 669.5999999999999
                    },
                    "text_lines": [
                        {
                            "text_animation": [ //Animations for the text
                                {
                                    "animation": "", //Animations: expand-out, slide-in-left, fade-in, slide-in-left, slide-in-right
                                    "speed": 1 //Text animation speed. Percentage range from 0-2
                                }
                            ],
                            "text_bg_animation": [ //Background text animations
                                {
                                    "animation": "", //Animations: expand-out, slide-in-left, fade-in, slide-in-left, slide-in-right
                                    "speed": 1 //Text animation speed. Percentage range from 0-2
                                }
                            ],
                            "text": "reached agreement on hockey uh, but it is not"
                        }
                    ],
                    "subtitle": "",
                    "font": { //Subtitle font. See {{PictoryApiBaseUrl}}/video/storyboard/fonts for options
                        "name": "Arial.ttf",
                        "size": 32,
                        "line_spacing": 1.2,
                        "color": "rgba(255,255,255,255)", //Accepts rgba or hex color
                        "backcolor": "rgba(17,17,17,153)", //Accepts rgba or hex color
                        "keycolor": "rgba(226,226,170,255)", //Accepts rgba or hex color
                        "textShadowColor": "rgba(255,255,255,1)", //Accepts rgba or hex color
                        "textShadowWidthFr": 0,
                        "line_height": 55.328,
                        "case": null,
                        "decoration": [],
                        "fullWidth": false
                    }
                },
                {
                    "time": 2.28,
                    "location": {
                        "center_x": 640,
                        "end_y": 669.5999999999999
                    },
                    "text_lines": [
                        {
                            "text_animation": [ //Animations for the text
                                {
                                    "animation": "", //Animations: expand-out, slide-in-left, fade-in, slide-in-left, slide-in-right
                                    "speed": 1 //Text animation speed. Percentage range from 0-2
                                }
                            ],
                            "text_bg_animation": [ //Background text animations
                                {
                                    "animation": "", //Animations: expand-out, slide-in-left, fade-in, slide-in-left, slide-in-right
                                    "speed": 1 //Text animation speed. Percentage range from 0-2
                                }
                            ],
                            "text": "interfering with the rest of our bilateral relationship."
                        }
                    ],
                    "subtitle": "",
                    "font": { //Subtitle font. See {{PictoryApiBaseUrl}}/video/storyboard/fonts for options
                        "name": "Arial.ttf",
                        "size": 32,
                        "line_spacing": 1.2,
                        "color": "rgba(255,255,255,255)", //Accepts rgba or hex color
                        "backcolor": "rgba(17,17,17,153)", //Accepts rgba or hex color
                        "keycolor": "rgba(226,226,170,255)", //Accepts rgba or hex color
                        "textShadowColor": "rgba(255,255,255,1)", //Accepts rgba or hex color
                        "textShadowWidthFr": 0,
                        "line_height": 55.328,
                        "case": null,
                        "decoration": [],
                        "fullWidth": false
                    }
                }
            ],
            "sentences": [ //Scene sentences, with the time duration in seconds for creating subtitles files.
                {
                    "time": 3.7, //Duration in seconds
                    "text": "We just completed a very productive meeting,"
                },
                {
                    "time": 2.58, //Duration in seconds
                    "text": "although I regret to inform you that we still have not"
                },
                {
                    "time": 4.56, //Duration in seconds
                    "text": "reached agreement on hockey uh, but it is not"
                },
                {
                    "time": 2.28, //Duration in seconds
                    "text": "interfering with the rest of our bilateral relationship."
                }
            ],
            "music": true, //Enable background music
            "tts": true, //Enable AI Text to Speech
            "subtitle": true //Displays subtitles for scene
        }
    ]
}'
Response Response Example
{
    "data": {
        "job_id": "702f8260-c56a-4fbc-9741-ddc44df24aa2"
    },
    "success": true
}

Request

Header Params
Authorization
string 
required
Example:
{{access_token}}
X-Pictory-User-Id
string 
required
Used for logging purposes
Example:
{{X-Pictory-User-Id}}
Body Params application/json
audio
object 
required
output
object 
required
name
string 
required
description
string 
required
format
string 
required
title
string 
required
width
integer 
required
height
integer 
required
scenes
array [object {8}] 
required
background
object 
optional
time
number 
optional
keywords
array
optional
sub_scenes
array [object {5}] 
optional
sentences
array [object {2}] 
optional
music
boolean 
optional
tts
boolean 
optional
subtitle
boolean 
optional
Examples

Responses

🟢200Step 6: Render Video
application/json
Body
data
object 
required
job_id
string 
required
success
boolean 
required
Modified at 2024-07-10 08:41:40
Previous
Step 5: GET Default Transcription & Highlights Settings
Next
Step 7: GET Video Download URL
Built with