If you’ve ever tried to create a series of videos manually, you know how time-consuming it can be. But producing videos at scale is no longer reserved for large teams or big-budget companies. With the right tools, you can easily automate the process and create hundreds of videos in just a few clicks.
Bulk video creation offers major advantages: it boosts efficiency by automating repetitive tasks, enables scalability for multiple products or campaigns without extra work, and allows for personalized content across all videos, even in large volumes.
FastPix API simplifies this process by allowing you to create videos programmatically using data from a spreadsheet. No more manual video editing or juggling multiple video files. All you need is a bit of automation, and you’re good to go.
Before we get started, make sure you have the following:
The first step is to create a spreadsheet that holds all the necessary data for your videos. Depending on the type of videos you want to create, you’ll need to define which variables will change for each video.
Once you are done you can also add extra fields in the columns next. For example, intro outro URLs and time stamps or description to pass inside metadata.
To interact with the FastPix API, you’ll first need to authenticate using your API key. Here’s a basic example of how you can authenticate and set up the API call using Python.
1import pandas as pd
2import requests
3from requests.auth import HTTPBasicAuth
4
5# Load the Excel file into a DataFrame
6df = pd.read_excel('/Users/Downloads/spreadsheetTest.xlsx')
7
8# Define the Fastpix API endpoint
9api_url = 'https://v1.fastpix.io/on-demand'
10access_token_key = '96c9bb3f-b057-4089-9b5f-2ccb5e58eccf'
11access_token_secret = 'a4dd5560-475b-4151-b217-1156617ab779'
You can generate your API key by logging into FastPix dashboard and navigate to Settings > Access Tokens. For more information follow this guide FastPix Access Tokens.
Now comes the fun part automating video creation! You’ll need to loop through each row in your spreadsheet and send an API request to FastPix for every video. Each row will represent a different video, with its unique title, description, image, and other attributes.
Step 1: Read Data from Spreadsheet
You’ll use the panda’s library to read the data from your spreadsheet. Each row in the DataFrame corresponds to one video, and each column represents a different attribute for the video (like the title, URL, etc.).
Step 2: Prepare API payload
For each row in your spreadsheet, you’ll prepare an API request payload. This will include:
Here’s how you can write the script:
1# Function to send API request
2def send_api_request(payload):
3try:
4response = requests.post(api_url, json=payload, auth=HTTPBasicAuth(access_token_key, access_token_secret))
5if response.status_code == 201:
6print(f"Request successful for {payload['metadata']['title']}.")
7else:
8print(f"Error {response.status_code} for {payload['metadata']['title']}.")
9except Exception as e:
10print(f"Error occurred for {payload['metadata']['title']}: {e}")
11
12# Loop through each row in the DataFrame
13for index, row in df.iterrows():
14print(f"fetch successful: {row['Video Title']}")
15
16# Prepare the payload for each row in the required format
17payload = {
18"inputs": [
19{
20"type": "video",
21"url": row["Video urls"],
22"introUrl": row["Intro URL"],
23"outroUrl": row["Outro URL"]
24}
25],
26"moderation": {
27"type": row["Moderation Type"]
28},
29"namedEntities": row["Named Entities"],
30"chapters": row["Chapters"],
31"metadata": {
32"title": row["Video Title"],
33},
34"accessPolicy": "public",
35"maxResolution": "1080p"
36}
37# Send the API request with the prepared payload
38send_api_request(payload)
You can explore more payload options through our API reference here.
Explanation of the code:
Step 3: Handling the response
The response from the FastPix API will indicate whether the video creation request was successful. You can handle success or failure accordingly in your script. In the provided code, if the API request is successful, it prints a message confirming the success.
FastPix also provides a range of advanced media manipulation features. These features enable you to further customize your videos by modifying the audio, adding intros and outros, and even expunging unwanted segments. Here’s how to integrate these advanced media features into your bulk video workflow.
You can automate the addition of intros and outros to each of your videos, ensuring that your branding, and call-to-action messages are consistently included in every video. This is particularly useful for marketing campaigns or tutorials, where the intro/outro stays the same but the main content changes based on dynamic data.
How to use:
API Example for adding intro/outro:
You can specify the intro and outro videos as input files and combine them with the main video dynamically.
1{
2 "inputs": [
3 {
4 "type": "video",
5 "url": "https://static.fastpix.io/sample.mp4",
6 "introUrl": "https://static.fastpix.io/sample.mp4",
7 "outroUrl": "https://static.fastpix.io/sample.mp4"
8 }
9 ],
10 "accessPolicy": "public",
11 "maxResolution": "1080p"
12}
Automation workflow
You can replace the original audio track of a video with a custom audio file using your URL input in the swapTrackUrl parameter. This is useful for adding voiceovers, background music, or even translated audio versions of your videos.
How to use:
API example for audio replacement:
1{
2 "inputs": [
3 {
4 "type": "video",
5 "url": "https://static.fastpix.io/sample-video.mp4"
6 },
7 {
8 "type": "audio",
9 "swapTrackUrl":"https://static.fastpix.io/sample-audio.mp4"
10 }
11 ],
12"accessPolicy": "public",
13"maxResolution": "1080p"
14}
Automation workflow
Upload the desired audio track (e.g.,voiceover or background music) to replace the existing one in your video.
FastPix allows you to expunge or remove unwanted segments from a video. This is particularly useful when you need to clean up a video by removing mistakes, irrelevant sections, or sensitive content. You can define start and end timestamps for the segments you want to remove.
How to use:
API example for expunging segments:
1{
2 "inputs": [
3 {
4 "type": "video",
5 "url": "https://static.fastpix.io/sample.mp4",
6 "expungeSegments": [
7 "2-5",
8 "7-9"
9 ]
10 }
11 ],
12 "accessPolicy": "public",
13 "maxResolution": "1080p"
14}
Automation workflow:
Audio overlay allows you to add an additional audio track to the video, such as background music, sound effects, or voiceovers, while keeping the original audio. This is useful for videos where you want to keep the natural sound of the video (e.g., a speaker's voice) but enhance it with additional sound elements.
How to use:
API example for audio overlay
1{
2 "inputs": [
3 {
4 "type": "video",
5 "url": " https://static.fastpix.io/sample-video.mp4"
6 },
7 {
8 "type": "audio",
9 "imposeTracks": [
10 {
11 "url": " https://static.fastpix.io/sample-audio.mp3",
12 "startTime": 0,
13 "endTime": 14,
14 "fadeInLevel": 2,
15 "fadeOutLevel": 3
16 }
17 ]
18 }
19 ],
20 "accessPolicy": "public",
21 "maxResolution": "1080p"
22}
Automation workflow:
Note: you can find in-depth information about video transformation in Fastpix Guides.
With FastPix, you can use AI to make your bulk video creation smarter, more efficient, and personalized. The following AI-driven features are specifically available in the platform:
Named Entity Recognition automatically detect and highlight specific entities in your video content, such as product names, brand names, locations, people, and other key items. This feature is useful for dynamic video content creation where these entities can be customized based on the data in your spreadsheet, giving each video a personalized touch.
Example use cases:
Learn more about named entities here
FastPix's AI can generate concise summaries of your video content based on the key points, which can then be integrated directly into your video. Whether you're working with long-form videos or content with complex themes, AI-driven summaries can help create condensed versions of videos for quicker consumption.
Example use cases:
See how you can generate summary from video with FastPix.
With the chaptering feature, you can automatically divide your video into key segments based on the content. This is particularly useful for tutorial or educational content, where you may want to break the video into sections that are easy to navigate. FastPix uses AI to identify logical break points in your video and creates chapters accordingly.
Example use cases:
Learn more about video chapters here.
FastPix also includes moderation tools powered by AI, which can automatically detect inappropriate content in your videos. This feature ensures that your videos meet community guidelines or company standards by automatically flagging sensitive content such as offensive language, explicit imagery, or controversial topics.
Example use cases:
Learn more about moderation here.
When you choose FastPix, you empower your team to innovate without the headaches of managing complex video workflows.
FastPix gives you:
Get started today or explore our Docs and Guide on building scalable video workflows
You can automate video creation by leveraging the FastPix API and reading data from a spreadsheet (like Google Sheets or Excel). By using the pandas library in Python, you can loop through each row of your spreadsheet, which holds video-specific data like titles, URLs, and other metadata. For each row, the script will generate an API request, sending the data to FastPix, which will create the videos accordingly.
FastPix provides several advanced media manipulation features for bulk video creation, such as adding intros and outros, replacing audio tracks, expunging video segments, and overlaying additional audio. These features can be automated through the FastPix API, allowing you to customize videos dynamically based on spreadsheet data, such as including a consistent brand intro or swapping audio tracks for multilingual content.
After sending API requests to FastPix, the system will return a response indicating whether the video creation was successful or if any errors occurred. You can handle the response in your script by checking the status code (e.g., a 201 status code means success). If there’s an error, the script will print the relevant error message to help troubleshoot the issue.
Bulk video creation with FastPix saves time by automating repetitive tasks, allowing you to generate hundreds of videos with just a few clicks. It also enhances scalability by enabling you to create videos for multiple products or campaigns simultaneously. Additionally, you can personalize each video, maintaining unique content while still managing large volumes efficiently.
To use FastPix for bulk video creation, you’ll need a basic understanding of spreadsheets (e.g., Google Sheets or Excel), access to the FastPix API (including an API key), and a general understanding of how to make API calls and handle responses. These prerequisites will ensure that you can effectively automate and customize video creation processes.