Create Template
Video Templates
Create Template
Upload a Pictory project file to create a reusable video template
POST
Create Template
Documentation Index
Fetch the complete documentation index at: https://docs.pictory.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Upload a Pictory project file (.pictai) downloaded from the Pictory web app to create a reusable video template. Templates allow you to standardize video creation by defining a base structure with customizable variables that can be populated with different content for each video instance.
You need a valid API key to use this endpoint. Get your API key from the API Access page in your Pictory dashboard.
API Endpoint
Request Parameters
Headers
API key for authentication (starts with
pictai_)Must be set to
application/octet-stream for file uploadsBody Parameters
The Pictory project file to upload. Must be a
.pictai file exported from the Pictory web application.File Requirements:- Format:
.pictai(Pictory project file) - Source: Downloaded from Pictory web app
- Content: Complete project configuration including scenes, audio, and variables
Response
Unique identifier for the created template
Name of the template
Language code of the template (e.g.,
en for English)Whether the template is published and available for use
Whether the template has been marked as deprecated
Audio configuration for the template
Array of scene objects that make up the template
Template variables that can be customized when creating videos from this templateCommon variables:
customer_name- Customer or recipient namepayment_date- Payment or transaction dateloan_account_number- Account or reference numbercustomer_support_number- Support contact numbersupport_email_id- Support email address
Variable names depend on your template design. These are placeholders that will be replaced with actual values when generating videos from the template.
Response Examples
Code Examples
Usage Notes
File Source: The
.pictai file must be exported from the Pictory web application. You can download project files from your Pictory dashboard.How to Export a .pictai File
To create a template, you first need to export a project file from the Pictory web app:- Create or Open a Project in the Pictory web application
- Design Your Template with the desired scenes, text, visuals, and audio
- Add Variables using double curly braces (e.g.,
{{variable_name}}) in text fields - Export the Project as a
.pictaifile from the project menu - Upload via API using this endpoint
Template Variables
Variables are placeholders in your template that can be replaced with actual values when creating videos. Use the following format:Variable Syntax
Common Use Cases for Variables
- Personalization: Customer names, account numbers
- Dynamic Dates: Payment dates, deadlines, event dates
- Contact Information: Phone numbers, email addresses, support contacts
- Custom Content: Product names, prices, locations, offers
Example Template Text
Common Use Cases
1. Upload Template from File
Upload a template file and handle the response:2. Batch Upload Multiple Templates
Upload multiple template files at once:3. Upload and Extract Template Info
Upload a template and extract key information:4. Upload with Validation
Validate the file before uploading:5. Upload with Progress Tracking
Upload large templates with progress indication:Best Practices
File Management
- Organize Templates: Keep template files organized by category or purpose
- Version Control: Maintain version history of template files
- Naming Convention: Use descriptive names for template files
- Backup: Keep backups of all template files
- Documentation: Document the purpose and variables of each template
Template Design
- Use Meaningful Variables: Choose clear, descriptive variable names
- Consistent Naming: Use a consistent naming convention for variables (e.g.,
snake_case) - Default Values: Provide sensible default values in the template
- Test Thoroughly: Test templates with various variable values before uploading
- Optimize Assets: Keep file sizes reasonable by optimizing images and videos
Error Handling
- Validate Files: Check file format and size before uploading
- Handle Failures: Implement retry logic for network failures
- Log Uploads: Keep records of uploaded templates
- Monitor Limits: Track upload quotas and limits
- Verify Results: Confirm template creation by checking the response
