Generates a video based on the given template and scenes.
Overview
This API allows developers to programmatically create videos from templates. You can define scene structure, subtitles, audio, and styling—all via a flexible JSON request.
Base URL
https://api.pictory.ai/pictoryapis
Authentication
This API requires two headers for authentication:
Authorization
: Bearer token from the authentication endpointX-Pictory-User-Id
: A user-specific identifier provided by Pictory
Endpoint: Create Video from Template
POST /v1/video/from-template
Creates a new video based on a selected template and provided content, such as scenes, subtitles, visuals, and voiceovers.
Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | True | Access token token from the auth endpoint |
X-Pictory-User-Id | string | True | User ID provided by Pictory |
Content-Type | string | True | Must be set to application/json |
Request Body
The request body follows the schema VideoFromTemplateRequest. You must provide a templateId. All other fields are optional and allow extensive customization (scenes, audio, variables, etc.).
Response
200 OK
{
"success": true,
"data": {
"jobId": "d99c2922-b959-45cb-8df4-f1b18c91ebeb"
}
}
This response confirms that the storyboard creation job was created successfully. You can use the jobId to track progress or fetch results.
Sample cURL Commands
-
Minimal Request (Create storyboard from template only)
curl -X POST https://api.pictory.ai/pictoryapis/v1/video/from-template \ -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \ -H "X-Pictory-User-Id: <YOUR_USER_ID>" \ -H "Content-Type: application/json" \ -d '{ "templateId": "template-abc123" }'
-
Request with Scenes and Audio
curl -X POST https://api.pictory.ai/pictoryapis/v1/video/from-template \ -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \ -H "X-Pictory-User-Id: <YOUR_USER_ID>" \ -H "Content-Type: application/json" \ -d '{ "templateId": "template-xyz789", "videoName": "My API Video", "audio": { "aiVoice": { "speaker": "en-US-Wavenet-D", "speed": 1.0 } }, "scenes": [ { "text": "Welcome to the world of automation!", "createSceneOnNewLine": true } ] }'