Pictory
  1. Text to Video API Flow
Pictory
  • API Flows
    • Text to Video API Flow
      • Step 1: Authenticate
        POST
      • Step 2: Generate Video Preview from Text
        POST
      • Step 3: GET Video Preview & Default Settings
        GET
      • Step 4: Render Video
        POST
      • Step 4: Render PUT
        PUT
      • Step 5: GET Video Download URL
        GET
    • Video Editing API Flow
      • Step 1: Authenticate
      • Step 2: Obtain Pictory Upload URL
      • Step 3: Upload video to Pictory
      • Step 4: v2 Transcribe Uploaded Video
      • Step 5: GET Default Transcription & Highlights Settings
      • Step 6: Render Video
      • Step 7: GET Video Download URL
    • 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. Text to Video API Flow

Step 2: Generate Video Preview from Text

Develop Env
https://dev.your-api-server.com
Develop Env
https://dev.your-api-server.com
POST
/v1/video/storyboard
This endpoint processes text to set up default video configurations and produce a preview link. Post-call, access the settings and link via the GET Video Preview & Default Settings API call response.
"preview": "https://feature-share-preview.d1tv7y7t27ylrr.amplifyapp.com/preview/5ebf0ad3-6839-4e0c-a569-2e40a67598fb"
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://dev.your-api-server.com/v1/video/storyboard' \
--header 'Authorization: {{access_token}}' \
--header 'X-Pictory-User-Id: {{X-Pictory-User-Id}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "videoName": "Sino-Japanese-War", //Desired video file name
    "videoDescription": "Santa Claus is coming to town", //*optional*
    "language": "en", //Text language: English only
    "webhook": "https://webhook.site/4f88f3a7-a10c-4bb3-a2d8-00efd6d76754",
    "brandLogo": {
    "url":"https://pictory.ai/wp-content/uploads/2022/03/logo-new-fon-2t.png", 
    "verticalAlignment": "top" , 
    "horizontalAlignment": "right"
    },
    "audio": {
        "autoBackgroundMusic": true, 
        "backGroundMusicVolume": 0.5, 
        "aiVoiceOver": {
            "speaker": "Jackson", 
            "speed": 100, 
            "amplifyLevel": 0 
        }
    },
    "textStyles":{
    "fontFamily": "Roboto",
    "textColor": "#7000FD",
    "fontSize": 36,
    "textBackgroundColor": "#FFFFFF",
    "verticalAlignment": "bottom",
    "horizontalAlignment": "center"
    },
    "scenes": [
    /*  Video Editing usecase: Clip scene example
        {
            "backgroundUri": "{{pictory_upload_url}}",
            "backgroundType": "video",
            "text": "I am Mohit Joshi and I have 16 plus years of experience in software industry.",
            "backgroundVideoSegments": [{
            "start": 0,
          "end": 5
        }],*/ 
         
        /* URL to Video Usecase
        {
             "article_url": "https://pictory-product.notion.site/Summarising-Pictory-API-Understanding-c79017886b134c6295e7f9d0351f6bc0",
                "voiceOver": true, //AI voice reads the text
                "splitTextOnNewLine": false, //Split scenes on '\''\n'\'' in text
                "splitTextOnPeriod": true //Split scenes at periods
        }
        */
        {
            "backgroundUri": "https://dm0qx8t0i9gc9.cloudfront.net/watermarks/video/HVzxMQxkil73u47k1/videoblocks-retro-soldiers-troops53_hshdoehnt__6dfbfe0529e764e8f04bdf8e76ed41b3__P480.mp4?type=preview&origin=VIDEOBLOCKS&timestamp_ms=1712305921133&publicKey=NFKFzias7JkF35W3n9edUuQV1Rnn7udTDco3ZbvzlsXgiAzLXO0a15shkgbMNmXZ&organizationId=103776&apiVersion=2.0&stockItemId=348672814&resolution=480p&endUserId=718890439cf9899e412f4e3d6c8148c452fb5959&projectId=dev&searchId=9903f512-732f-4f3c-b474-bc0445fac778&searchPageId=55ea31e8-24a8-46d4-bf50-ee37a3926aae",
            "backgroundType": "video",
            "assetId": "1495121538",
            "library": "getty",
            "minSceneDuration":"6"
        }, 
        {
            "text": "The First Sino-Japanese War (25 July 1894 – 17 April 1895) or the First China–Japan War was a conflict between the Qing dynasty and Empire of Japan primarily over influence in Korea.",
            "voiceOver": true,
            "splitTextOnNewLine": false, 
            "splitTextOnPeriod": true 
        },
        {
            "text": "After more than six months of unbroken successes by Japanese land and naval forces and the loss of the port of Weihaiwei, the Qing government sued for peace in February 1895.",
            "voiceOver": true, 
            "textBackgroundColor": "#000000",
            "splitTextOnNewLine": false, 
            "splitTextOnPeriod": true,  
            "horizontalAlignment": "right"
        },
        {
            "text": "The war demonstrated the failure of the Qing dynasty'\''s attempts to modernize its military and fend off threats to its sovereignty, especially when compared with Japan'\''s successful Meiji Restoration.",
            "voiceOver": true, 
            "textColor": "#FFFFFF",
            "textBackgroundColor": "#000000",
            "splitTextOnNewLine": false, 
            "splitTextOnPeriod": true, 
            "fontStyle": "italic", //normal, italic"
            "horizontalAlignment": "right",
            "verticalAlignment": "top"
        },
        {
            "text": "For the first time, regional dominance in East Asia shifted from China to Japan;",
            "voiceOver": true, //AI voice reads the text
            "textDecoration": "underline",
            "splitTextOnNewLine": false, 
            "splitTextOnPeriod": true, 
            "horizontalAlignment": "center",
            "verticalAlignment": "bottom"
        },
                {
            "text": "the prestige of the Qing dynasty, along with the classical tradition in China, suffered a major blow.",
            "voiceOver": true, //AI voice reads the text
            "textDecoration": "underline",
            "splitTextOnNewLine": false, 
            "splitTextOnPeriod": true, 
            "horizontalAlignment": "center",
            "verticalAlignment": "bottom"
        },
        {
            "text": "The humiliating loss of Korea as a tributary state sparked an unprecedented public outcry.",
            "voiceOver": true, //AI voice reads the text
            "keywordColor": "#000000",
            "fontStyle": "italic",
            "splitTextOnNewLine": false, 
            "splitTextOnPeriod": true 
        },
                {
            "text": "Within China, the defeat was a catalyst for a series of political upheavals led by Sun Yat-sen and Kang Youwei, culminating in the 1911 Revolution and ultimate end of dynastic rule in China.",
            "voiceOver": true, //AI voice reads the text
            "keywordColor": "#000000",
            "textDecoration": "underline",
            "splitTextOnNewLine": false, 
            "splitTextOnPeriod": true 
        },
        {
            "text": "Thank You for watching. This video demonstrated the Pictory API'\''s capability to add the Brand Logo and apply Text Styles",
            "voiceOver": true,
            "fontSize": 32,
            "fontWeight": "bold",
            "splitTextOnNewLine": false, 
            "splitTextOnPeriod": true,
            "horizontalAlignment": "center",
            "verticalAlignment": "center"
        }

        /*{
            "backgroundUri": "https://api-dev-284231530171.s3.us-east-2.amazonaws.com/1f11e3d9-34d2-4901-9a1b-81c60199fcdc/testvideo.mp4",
            "backgroundType": "video"
            //"minSceneDuration":
        }*/
    ],
    "voiceOver": true, //AI voice reads the text
    "splitTextOnNewLine": false, //Split scenes on '\''\n'\'' in text
    "splitTextOnPeriod": true //Split scenes at periods
}'
Response Response Example
{
    "jobId": "5865feea-16c7-4f48-b7d4-a1fc97dc3943",
    "success": true,
    "data": {
        "job_id": "5865feea-16c7-4f48-b7d4-a1fc97dc3943"
    }
}

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
videoName
string 
required
videoDescription
string 
required
language
string 
required
webhook
string 
required
brandLogo
object 
required
url
string 
required
verticalAlignment
string 
required
horizontalAlignment
string 
required
audio
object 
required
autoBackgroundMusic
boolean 
required
backGroundMusicVolume
number 
required
aiVoiceOver
object 
required
textStyles
object 
required
fontFamily
string 
required
textColor
string 
required
fontSize
integer 
required
textBackgroundColor
string 
required
verticalAlignment
string 
required
horizontalAlignment
string 
required
scenes
array [object {18}] 
required
backgroundUri
string 
optional
backgroundType
string 
optional
assetId
string 
optional
library
string 
optional
minSceneDuration
string 
optional
text
string 
required
voiceOver
boolean 
required
splitTextOnNewLine
boolean 
required
splitTextOnPeriod
boolean 
required
textBackgroundColor
string 
required
horizontalAlignment
string 
required
textColor
string 
optional
fontStyle
string 
required
verticalAlignment
string 
required
textDecoration
string 
required
keywordColor
string 
required
fontSize
integer 
optional
fontWeight
string 
optional
voiceOver
boolean 
required
splitTextOnNewLine
boolean 
required
splitTextOnPeriod
boolean 
required
Examples

Responses

🟢200Step 2: Generate Video Preview from Text
application/json
Body
jobId
string 
required
success
boolean 
required
data
object 
required
job_id
string 
required
Modified at 2024-07-10 08:41:40
Previous
Step 1: Authenticate
Next
Step 3: GET Video Preview & Default Settings
Built with