Introduction
Welcome to the AutomatrAPI documentation. Our API allows you to programmatically generate videos with captions and custom workout plans.
To get started, you'll need an API key. You can get one by signing up for an account and navigating to the API Keys section in your dashboard.
All API requests should include the following headers:
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Important
The Content-Type: application/json
header is required for all POST and PUT requests. Without this header, the server may not correctly parse your request data.
Rate Limits
To ensure the stability of our service, we implement rate limiting on our API endpoints.
- Standard users: 3 requests per minute
- Skool members: 5 requests per minute
If you exceed these limits, you'll receive a 429 Too Many Requests response. Rate limits are calculated based on the number of requests made within a 1-minute window.
Credits
Our API uses a credit-based system for generating content. Different operations consume different amounts of credits.
Operation | Credits |
---|---|
Generate Video | 5 |
Merge Videos | 10 |
Generate Workout Plan | 3 |
Generate Lofi Video | 7 |
API Limitations
Global API Limitations:
- File Size: Maximum file size is 100MB per file
- Rate Limits: 100 requests per minute per API key
- Processing Timeout: Jobs that exceed 30 minutes may be terminated
Video Merger Limits
- Maximum number of videos: 7 videos per request
- Maximum duration per clip: 11 seconds
- Maximum total duration: 80 seconds
- Supported video formats: MP4, MOV, AVI, WEBM
- Supported audio formats: MP3, WAV, AAC, M4A
Video Caption Limits
- Maximum video duration: 5 minutes
- Maximum caption count: 100 captions per video
- Supported video formats: MP4, MOV, WEBM
- Supported audio formats: MP3, WAV, AAC, M4A
Lofi Video Generation Limits
- Maximum duration: 60 minutes
- Supported video formats: MP4, MOV, AVI, MKV
- Supported audio formats: MP3, WAV, M4A, AAC
- Maximum file size: Same as global limit (100MB)
Need Higher Limits?
Contact our support team for custom enterprise plans with increased limits and dedicated resources.
Workout API
The Workout API allows you to generate customized workout plans with detailed exercise instructions, sets, reps, and rest periods.
You can also include YouTube video links for each exercise to provide visual demonstrations.
Key Features:
- Beautiful Templates: We generate professionally designed workout plans with a modern, visually appealing layout.
- Automatic YouTube Thumbnails: Simply provide YouTube video URLs, and we automatically extract and display thumbnails in the workout plan.
- Clickable Exercise Links: Each exercise includes clickable links to demonstration videos for easy reference.
- PDF Export: Workout plans are delivered as downloadable PDF files for easy sharing and printing.
Generate Workout Plan
Create a new customized workout plan
Endpoint
https://api.automatrapi.com/v1/workout-plans
Request
Send a POST request to the workout plans endpoint with your workout plan details.
Understanding the Workout Plan Structure
- document_settings: Controls the branding of your workout plan, including the logo text and subtitle that appear at the top.
- client_info: Basic information about who the workout is for.
- rest_day: Information shown on rest days, including tips and reminders.
- days: The actual workout schedule, organized by day number.
- is_rest_day: Set to
true
for rest days (no exercises needed) orfalse
for training days. - exercises: Each exercise includes name, sets, reps, and a YouTube video URL that will display as a thumbnail.
{
"document_settings": {
"title": "7-Day Personalized Fitness Plan",
"header": {
"logo": {
"text": "FIT ELITE"
},
"subtitle": {
"text": "PREMIUM FITNESS PROGRAM"
}
}
},
"client_info": {
"trainer_name": "Coach Alex",
"client_name": "John Doe",
"client_goal": "Weight Loss",
"client_weight": "95 kg",
"client_height": "175 cm"
},
"rest_day": {
"title": "ACTIVE RECOVERY",
"tips": [
"Allow your muscles to repair and grow",
"Stay hydrated (aim for 8-10 glasses of water)",
"Focus on proper nutrition",
"Practice light stretching or yoga",
"Get adequate sleep (7-9 hours)",
"Take a light walk if you feel like moving"
],
"reminder": "Remember: Rest days are essential for progress!"
},
"days": {
"1": {
"is_rest_day": false,
"day_title": "Upper Body Strength",
"exercises": [
{
"name": "Push-ups",
"sets": 3,
"reps": "10-12",
"video_url": "https://www.youtube.com/watch?v=IODxDxX7oi4",
"notes": "Keep core tight, elbows at 45-degree angle"
},
{
"name": "Dumbbell Rows",
"sets": 3,
"reps": "10-12",
"video_url": "https://www.youtube.com/watch?v=pYcpY20QaE8",
"notes": "Keep back straight, pull dumbbell to hip"
}
]
},
"2": {
"is_rest_day": false,
"day_title": "Lower Body Focus",
"exercises": [
{
"name": "Squats",
"sets": 3,
"reps": "12-15",
"video_url": "https://www.youtube.com/watch?v=YaXPRqUwItQ",
"notes": "Keep chest up, knees tracking over toes"
},
{
"name": "Lunges",
"sets": 3,
"reps": "10 each leg",
"video_url": "https://www.youtube.com/watch?v=QOVaHwm-Q6U",
"notes": "Keep front knee over ankle, maintain balance"
}
]
},
"3": {
"is_rest_day": true
},
"4": {
"is_rest_day": false,
"day_title": "Core & Mobility",
"exercises": [
{
"name": "Plank",
"sets": 3,
"reps": "30 seconds",
"video_url": "https://www.youtube.com/watch?v=B296mZDhrP4",
"notes": "Keep hips level, don't arch your back"
},
{
"name": "Bicycle Crunches",
"sets": 3,
"reps": "20 reps",
"video_url": "https://www.youtube.com/watch?v=9FGilxCbdz8",
"notes": "Controlled movement, engage your core"
}
]
}
}
}
This example shows a partial workout plan with one rest day and exercises targeting different muscle groups. Each day has a descriptive title and exercises include proper form instructions.
Response
{
"job_id": "wk_123456789",
"status": "processing",
"message": "Your workout plan is being generated"
}
Check Workout Status
Check the status of a workout plan generation job
Endpoint
https://api.automatrapi.com/v1/workout-plans/{job_id}
Request Example
curl -X GET \
'https://api.automatrapi.com/v1/workout-plans/wk_123456789' \
-H 'Authorization: Bearer YOUR_API_KEY'
Response
{
"job_id": "wk_123456789",
"status": "completed",
"output_url": "https://viral-motivation-videos.s3.amazonaws.com/workout-plans/wk_123456789.pdf",
"created_at": "2023-09-15T12:34:56Z",
"completed_at": "2023-09-15T12:35:30Z"
}
Video Caption API
The Video Caption API allows you to generate professional videos with synchronized captions, background music, and voiceovers.
Generate Video
Create a new video with captions
Generate a video with captions, background music, and voiceover.
Important Limitations
- Maximum video duration: 2 minutes
- Maximum file size: 200MB for videos, 50MB for audio
- Supported formats: .mp4, .mov, .avi, .mkv for videos; .mp3, .wav, .m4a, .aac for audio
Endpoint
https://api.automatrapi.com/v1/video-generations
Request Example
{
"background_music_url": "https://example.com/music.mp3",
"voiceover_url": "https://example.com/voice.mp3",
"background_video_url": "https://example.com/video.mp4",
"captions": [
{
"words": "Never give up",
"start": 0.5,
"end": 2.5
},
{
"words": "on your dreams",
"start": 3.0,
"end": 5.0
}
]
}
Response
{
"job_id": "vid_987654321",
"status": "processing",
"message": "Your video is being generated"
}
Check Video Status
Check the status of a video generation job
Endpoint
https://api.automatrapi.com/v1/video-generations/{job_id}
Request Example
curl -X GET \
'https://api.automatrapi.com/v1/video-generations/vid_987654321' \
-H 'Authorization: Bearer YOUR_API_KEY'
Response (Processing)
{
"job_id": "vid_987654321",
"status": "processing",
"message": "Your video is being generated",
"progress": 45
}
Response (Completed)
{
"job_id": "vid_987654321",
"status": "completed",
"message": "Video generation completed",
"video_url": "https://storage.automatrapi.com/videos/vid_987654321.mp4",
"thumbnail_url": "https://storage.automatrapi.com/thumbnails/vid_987654321.jpg"
}
Video Merger API
The Video Merger API allows you to combine multiple videos with smooth transitions and background music to create a single cohesive video.
This is ideal for creating compilation videos, highlight reels, or merging related content with professional transitions.
Merge Videos
Combine multiple videos with transitions
Merge multiple videos with transitions and optional background music.
Important Limitations
- Maximum of 7 video clips
- Each video clip: maximum 11 seconds
- Maximum total duration: 80 seconds
- Supported video formats: .mp4, .mov, .avi, .mkv
- Supported audio formats: .mp3, .wav, .m4a, .aac
Endpoint
https://api.automatrapi.com/v1/video-mergers
Request Example
{
"video_urls": [
"https://example.com/video1.mp4",
"https://example.com/video2.mp4",
"https://example.com/video3.mp4"
],
"background_music_url": "https://example.com/music.mp3",
"transition_type": "fade",
"transition_duration": 1.5,
"include_highlight_reel": false
}
Understanding Transition Types
- fade: Smooth fade transition between videos
- dissolve: Gradual dissolve effect between clips
- wipe: Wipe effect from one edge to another
- slide: Slide effect where one clip slides over another
Highlight Reel Feature
The video merger can automatically create a dynamic highlight reel at the end of your merged video.
- include_highlight_reel: Set to
true
to enable,false
to disable (default:false
) - When enabled, extracts the last second from each video and creates a fast-paced recap
- Uses dynamic transitions between highlight clips
- Adds a professional fade-to-black ending
Response
{
"job_id": "merger_123456789",
"status": "queued",
"message": "Your video merger job has been queued"
}
Check Merger Status
Check the status of a video merger job
Endpoint
https://api.automatrapi.com/v1/video-mergers/{job_id}
Request Example
curl -X GET \
'https://api.automatrapi.com/v1/video-mergers/merger_123456789' \
-H 'Authorization: Bearer YOUR_API_KEY'
Response (Processing)
{
"job_id": "merger_123456789",
"status": "processing",
"message": "Your video merger is being processed",
"progress": 60
}
Response (Completed)
{
"job_id": "merger_123456789",
"status": "completed",
"message": "Video merger completed",
"output_url": "https://storage.automatrapi.com/videos/merger_123456789.mp4",
"thumbnail_url": "https://storage.automatrapi.com/thumbnails/merger_123456789.jpg"
}
Lofi Video API
The Lofi Video API allows you to generate relaxing lofi style videos by looping video and audio for a specified duration.
This is perfect for creating aesthetic background videos for music, studying, or relaxation content.
Key Features:
- Video Looping: We intelligently loop your video to create a seamless extended version.
- Audio Looping: Your audio track is looped to match the duration of the video.
- Custom Duration: Specify any duration up to 60 minutes for your lofi video.
- High Quality: All videos maintain original quality throughout the process.
Generate Lofi Video
Create a new lofi video by looping video and audio
Endpoint
https://api.automatrapi.com/v1/lofi-generations
Request
Send a POST request to the lofi generations endpoint with your video and audio URLs and desired duration.
Requirements
- Video URL: Must be a publicly accessible URL to an MP4, MOV, AVI, or MKV file (max 200MB).
- Audio URL: Must be a publicly accessible URL to an MP3, WAV, M4A, or AAC file (max 50MB).
- Duration: Any value between 1-60 minutes.
{
"video_url": "https://example.com/your-video.mp4",
"audio_url": "https://example.com/your-audio.mp3",
"duration_minutes": 10
}
Response
A successful response will include a job ID which you can use to check the status of your generation.
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued"
}
Error Responses
Possible error responses include:
Invalid URL Format
{
"detail": "Invalid video URL: Unable to access video URL: 404"
}
Insufficient Credits
{
"detail": {
"error": "insufficient_credits",
"message": "Insufficient credits to generate lofi video. This operation requires 7 credits, but your balance is 5 credits.",
"required_credits": 7,
"current_balance": 5,
"service_name": "Lofi Video Generator"
}
}
Check Lofi Generation Status
Get the status of a lofi video generation job
Endpoint
https://api.automatrapi.com/v1/lofi-generations/status/{job_id}
Response
The response will include the current status of the job, and when completed, a URL to download the generated video.
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"output_url": "https://storage.automatrapi.com/video-caption/550e8400-e29b-41d4-a716-446655440000/final_video.mp4",
"error": null,
"created_at": "2025-03-26T07:31:13.684253",
"completed_at": "2025-03-26T07:33:21.616237"
}
Possible Status Values
- queued: The job is in queue waiting to be processed.
- processing: The job is currently being processed.
- completed: The job has completed successfully.
- failed: The job has failed. Check the error field for details.