Serverless Video Generation API: Batch Smart Video Creation
A powerful Docker-based API for intelligent video generation with professional effects and subtitles, leveraging GPU acceleration for efficient, on-demand video creation.

In the era of explosive digital content growth, efficient and professional video generation capabilities are more crucial than ever. Today, we proudly introduce the AWS Fargate Serverless Video Generation, a robust Docker-based API that utilizes GPU acceleration to provide intelligent video generation with professional effects and subtitle functionalities.
Core Features and Capabilities
This API aims to simplify the video creation process, enabling you to effortlessly generate high-quality videos with a rich set of features:
- Intelligent Video Generation: The API automatically detects and optimizes for various processing scenarios, ensuring efficient and tailored output. Supported modes include:
Baseline
: Combines an image with an audio track.Subtitles Only
: Focuses solely on subtitle processing.Effects Only
: Applies cinematic effects without subtitle generation.Full Featured
: A comprehensive mode that combines both effects and subtitles.
- Professional Subtitles: Supports Base64 encoded SRT subtitle input, offering advanced styling options such as background transparency, outline color, and customizable font size to match your brand or video style.
- Cinematic Effects: Enhance your videos with built-in cinematic effects like
"zoom_in"
,"pan_left"
, and"random"
to add dynamic flair and visual interest. - Multi-Language Support: Designed to easily handle content in multiple languages, specifically supporting both Chinese and English characters without issues.
- GPU Acceleration: Leverages the powerful computing capabilities of GPUs to ensure highly efficient and rapid video generation, reducing processing times significantly.
Getting Started: Installation and Deployment
The AWS Fargate Serverless Video Generation API offers flexible deployment options to suit various development and production environments.
PyPI Installation (Recommended for Python Users)
For Python developers, the easiest way to integrate the API client is via PyPI:
pip install video-generation-api
Docker Deployment (Recommended for Production)
For a robust production setup, Docker deployment provides isolated and consistent environments.
Pulling the Image
First, pull the latest Docker image from the registry:
docker pull betashow/video-generation-api:latest
Running the Container
Then, run the container, mapping port 5000
to expose the API:
docker run -d --name video-api -p 5000:5000 betashow/video-generation-api:latest
Production Deployment Recommendation
For serverless, auto-scaling, and zero-maintenance video generation in a production environment, it is highly recommended to integrate with AWS CloudBurst Fargate. This allows for a pay-per-second model, scaling resources automatically based on demand.
Quick Start Guide
Once deployed, interacting with the API is straightforward.
Python Client
Initialize the client with your API server's URL and then call the create_video
method:
from video_generation_api import VideoGenerationClient
client = VideoGenerationClient("http://localhost:5000")
# ... prepare your inputs (image, audio, subtitles)
response = client.create_video(image_base64="...", audio_base64="...", ...)
API Server
If you've deployed via Docker, the API is accessible at http://localhost:5000
.
API Endpoints Overview
The API provides several endpoints for video generation and management.
Primary Endpoint: /create_video_onestep
To generate a video, send a POST
request to http://your-server:5000/create_video_onestep
. The request body should be JSON data, including Base64 encoded image, audio, and subtitle inputs, along with your desired effects and output settings.
Other Essential Endpoints
/health
: Use this endpoint to check the current status and health of the API server./download/{file_id}
: After a video is generated, you can download it using this endpoint. Note that generated files automatically expire and are deleted after 1 hour./cleanup
: Manually trigger the cleanup process for any expired files, ensuring optimal storage utilization.
Security and Authentication
By default, the API runs without authentication for ease of initial setup. However, for secure deployments, you can enable a secure mode. Set the AUTHENTICATION_KEY
environment variable on your server, and then include this key in an X-Authentication-Key
header in all your API requests.
Key Considerations
When working with the AWS Fargate Serverless Video Generation API, keep the following important notes in mind:
- All file inputs, including images, audio, and subtitles, must be Base64 encoded before being sent to the API.
- Generated videos are temporary and will expire and be automatically deleted after 1 hour. Ensure you download them promptly.
- The API returns relative download paths for the generated videos.
- The API is designed for on-demand, disposable container usage, making it highly suitable for serverless architectures.
The AWS Fargate Serverless Video Generation API is an ideal choice for developers and businesses seeking efficient, scalable, and professional video creation solutions. Deploy it today and unleash your video creation potential!
For detailed usage examples, advanced configurations, and best practices, please refer to the project's official GitHub repository: https://github.com/preangelleo/video-generation-docker.