๐ฌCreate a Video Short
Learn how to generate AI-powered video shorts with talking avatars from text content, perfect for social media and educational content.
Step 1: Get Available Avatars
First, see what avatars are available for your video by calling /video/GetAvatars
:
curl -X GET "https://api.autocontentapi.com/video/GetAvatars" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Example Response
[
{
"id": "1",
"name": "Professional Woman",
"gender": "F"
},
{
"id": "2",
"name": "Business Man",
"gender": "M"
},
{
"id": "3",
"name": "Casual Speaker",
"gender": "F"
}
]
Important: Choose avatar IDs for your video - you'll need at least one!
Step 2: Create Video Short from Text
Use /video/CreateShortsFromContent
to generate a video short from text content:
curl -X POST "https://api.autocontentapi.com/video/CreateShortsFromContent" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "Welcome to our AI tutorial series! Today we will explore the fascinating world of machine learning and how it is transforming businesses across every industry. From predictive analytics to natural language processing, AI is creating unprecedented opportunities for innovation.",
"avatar1": "1",
"avatar2": "2",
"subtitles": true,
"prompt": "Create an engaging educational video about AI and machine learning for business professionals"
}'
Request Parameters
text
Content for the video
Yes
Any text content
avatar1
Primary avatar ID
Yes
Avatar ID from /video/GetAvatars
avatar2
Secondary avatar ID
No
Avatar ID for dialogue format
subtitles
Include subtitles
No
true
/false
(default: true
)
prompt
Instructions for video creation
No
Any guidance text
callbackData
Optional callback data
No
Any string
scheduledOn
Schedule for later
No
ISO datetime
Example Response
{
"requestId": "video-550e8400-e29b-41d4-a716-446655440000",
"status": 0
}
Step 3: Poll Video Status
Check the video generation progress using /content/Status/{id}
:
curl -X GET "https://api.autocontentapi.com/content/Status/video-550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_TOKEN"
While Processing
{
"id": "video-550e8400-e29b-41d4-a716-446655440000",
"status": 5,
"updated_on": "2024-01-15T10:32:00Z",
"error_code": 0,
"requested_on": "2024-01-15T10:30:00Z"
}
Status Codes:
0
= Pending (queued for processing)5
= Processing (video generation in progress)100
= Completed (video ready!)
Step 4: Get Your Video Short
When status
reaches 100
, your video is ready:
{
"id": "video-550e8400-e29b-41d4-a716-446655440000",
"audio_title": "AI Tutorial: Machine Learning for Business",
"status": 100,
"audio_url": "https://storage.autocontentapi.com/audio/video-550e8400-e29b-41d4-a716-446655440000.mp3",
"video_url": "https://storage.autocontentapi.com/video/video-550e8400-e29b-41d4-a716-446655440000.mp4",
"response_text": "Welcome to our AI tutorial series! Today we will explore...",
"requested_on": "2024-01-15T10:30:00Z",
"updated_on": "2024-01-15T10:35:00Z",
"request_type_id": 4,
"error_code": 0,
"file_size": 45234567,
"share_url": "https://autocontentapi.com/share/video-550e8400-e29b-41d4-a716-446655440000"
}
๐ Success! Your video short is ready at the video_url
!
Alternative Methods
Method 2: Create from Audio Content
If you already have audio content, use /video/CreateShorts
:
curl -X POST "https://api.autocontentapi.com/video/CreateShorts" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"audioUrl": "https://storage.autocontentapi.com/audio/existing-podcast.mp3",
"avatar1": "1",
"avatar2": "2",
"subtitles": true,
"prompt": "Create a professional business presentation style video"
}'
Method 3: Create from Custom Script
For precise control, use /video/CreateShortsFromScript
with dialogue format:
curl -X POST "https://api.autocontentapi.com/video/CreateShortsFromScript" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"script": [
{
"avatarId": 1,
"text": "Hello everyone, welcome to our AI series!"
},
{
"avatarId": 2,
"text": "Today we will explore machine learning fundamentals."
},
{
"avatarId": 1,
"text": "Let us start with the basics of neural networks."
}
],
"subtitles": true
}'
Method 4: Create from Deep Research
Convert research findings into video content using /video/CreateShortsFromDeepResearch
:
curl -X POST "https://api.autocontentapi.com/video/CreateShortsFromDeepResearch" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"deepResearchId": "550e8400-e29b-41d4-a716-446655440000",
"avatar1": "1",
"avatar2": "2",
"subtitles": true,
"prompt": "Create an educational video explaining the research findings in simple terms"
}'
View Your Video Shorts
Get all your created video shorts:
curl -X GET "https://api.autocontentapi.com/video/GetShorts" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response
[
{
"id": "video-550e8400-e29b-41d4-a716-446655440000",
"status": 100,
"requestedOn": "2024-01-15T10:30:00Z",
"processingOn": "2024-01-15T10:31:00Z",
"succeededOn": "2024-01-15T10:35:00Z",
"requestTypeId": 4,
"callbackData": "ai-tutorial-video",
"audioUrl": "https://storage.autocontentapi.com/audio/video-550e8400-e29b-41d4-a716-446655440000.mp3",
"audioTitle": "AI Tutorial: Machine Learning for Business",
"responseText": "Welcome to our AI tutorial series..."
}
]
Avatar Selection Tips
Single Avatar (Presentation Style)
Use only
avatar1
for lecture/presentation formatGreat for educational content, tutorials, announcements
More focused, single-speaker delivery
Dual Avatar (Conversation Style)
Use both
avatar1
andavatar2
for dialogue formatPerfect for interviews, debates, Q&A sessions
Creates more engaging, conversational content
Gender Considerations
Mix genders (
"M"
and"F"
) for diverse representationConsider your target audience preferences
Professional vs. casual avatar styles
Content Types That Work Well
Educational Content
{
"text": "In this video, we'll explain the key principles of blockchain technology and how it enables secure, decentralized transactions across networks.",
"prompt": "Create an educational explainer video with clear, simple language"
}
Product Announcements
{
"text": "We're excited to announce the launch of our new AI-powered customer service platform that reduces response times by 90%.",
"prompt": "Create an enthusiastic product announcement video"
}
Tutorial Content
{
"text": "Step 1: Open your dashboard. Step 2: Click on Analytics. Step 3: Select your date range. Step 4: Export your data.",
"prompt": "Create a step-by-step tutorial video with clear instructions"
}
Marketing Content
{
"text": "Transform your business with AI automation. Increase efficiency, reduce costs, and scale faster than ever before.",
"prompt": "Create a compelling marketing video with energetic delivery"
}
Best Practices
Content Length
Optimal: 30-90 seconds for social media
Maximum: 3-5 minutes for detailed explanations
Minimum: 15 seconds for quick announcements
Text Guidelines
Clear Structure: Use bullet points or numbered steps
Conversational Tone: Write as you would speak
Call to Action: End with clear next steps
Keyword Rich: Include relevant terms for SEO
Visual Considerations
Subtitles: Always enable (default
true
) for accessibilityAvatar Choice: Match avatar style to content tone
Prompt Instructions: Guide the delivery style and energy
Error Handling
Invalid Avatar ID
{
"error": "Invalid avatar ID provided",
"status": 400
}
Text Too Long
{
"error": "Text content exceeds maximum length",
"status": 400
}
Processing Failed
{
"id": "video-550e8400-e29b-41d4-a716-446655440000",
"status": 0,
"error_code": 500,
"error_message": "Video generation failed, please try again",
"updated_on": "2024-01-15T10:35:00Z"
}
Use Cases
Social Media Marketing: Create engaging shorts for Instagram, TikTok, YouTube Shorts
Employee Training: Generate training videos for onboarding and skill development
Product Demos: Show features and benefits with professional avatars
Educational Content: Create course materials and explainer videos
Customer Support: Build FAQ videos with common questions and answers
Internal Communications: Company updates and announcements
What's Next?
๐ง Learn about Creating Podcast Episodes for audio content
๐ฆ Explore Creating Content from X Feeds
๐ฌ Try Deep Research Podcasts for comprehensive content
๐ Check out more Code Samples in different languages
๐ฃ๏ธ Discover Custom Voices for audio content
โ Have questions? Visit our FAQ
Last updated