Documentation Index Fetch the complete documentation index at: https://docs.audiopod.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
AudioPod AI’s Media Extraction API provides powerful tools for downloading and extracting audio/video content from various online platforms. Extract high-quality audio from videos, download content in multiple formats, and get detailed metadata for content analysis.
Key Features
Multi-Platform Support : YouTube, TikTok, Instagram, Vimeo, Spotify, and more
Multiple Formats : MP4, MP3, WAV, WebM, AAC, and other audio/video formats
Quality Options : From 144p to 4K video, various audio bitrates
Metadata Extraction : Title, description, duration, uploader info, view counts
Thumbnail Download : Automatic thumbnail extraction and download
Batch Processing : Download multiple videos efficiently
Public Access : Limited public access without authentication
No Duration Limits : Full-length content extraction for authenticated users
Authentication
Public Access : Limited features, 10-minute duration limit, basic formats only
Authenticated Access : Full features with API key or JWT token
API Key (Recommended) : X-API-Key: your_api_key header
JWT Token : Authorization: Bearer your_jwt_token (for session-based auth)
Rate Limits
All endpoints are rate limited to prevent abuse:
Public Video Info : 60 requests/minute
Public Download : 10 requests/minute
Authenticated Video Info : 30 requests/minute
Authenticated Download : 10 requests/minute
Bulk Download : 3 requests/minute
Job Status : 60 requests/minute
Job Management : 30 requests/minute
Get Video Info (Public)
Extract basic video metadata without authentication.
POST /api/v1/video/public/info
Content-Type : application/json
{
"url" : "https://youtube.com/watch?v=example123" ,
"include_formats" : false
}
import requests
# Get basic video info (no auth required)
video_info_request = {
"url" : "https://youtube.com/watch?v=example123" ,
"include_formats" : False # Limited format info for public access
}
response = requests.post(
"https://api.audiopod.ai/api/v1/video/public/info" ,
json = video_info_request
)
if response.status_code == 200 :
video_info = response.json()
print ( f "Title: { video_info[ 'title' ] } " )
print ( f "Duration: { video_info[ 'duration' ] } seconds" )
print ( f "Uploader: { video_info[ 'uploader' ] } " )
print ( f "View count: { video_info[ 'view_count' ] } " )
curl -X POST "https://api.audiopod.ai/api/v1/video/public/info" \
-H "Content-Type: application/json" \
-d '{
"url": "https://youtube.com/watch?v=example123",
"include_formats": false
}'
Get Video Info (Authenticated)
Extract comprehensive video metadata with full format information.
POST /api/v1/video/info
X-API-Key : {api_key}
Content-Type : application/json
{
"url" : "https://youtube.com/watch?v=example123" ,
"include_formats" : true
}
# Get comprehensive video info (authentication required)
video_info_request = {
"url" : "https://youtube.com/watch?v=example123" ,
"include_formats" : True # Get all available formats and qualities
}
response = requests.post(
"https://api.audiopod.ai/api/v1/video/info" ,
headers = { "X-API-Key" : api_key},
json = video_info_request
)
if response.status_code == 200 :
video_info = response.json()
print ( f "Title: { video_info[ 'title' ] } " )
print ( f "Duration: { video_info[ 'duration' ] } seconds" )
print ( f "Estimated credits: { video_info[ 'estimated_credits' ] } " )
# Available formats
for format_info in video_info.get( "formats" , []):
print ( f "Format: { format_info[ 'format' ] } - { format_info[ 'quality' ] } " )
Response:
{
"title" : "Amazing Video Content" ,
"description" : "This is an example video with great content..." ,
"uploader" : "Content Creator" ,
"upload_date" : "2024-01-15" ,
"duration" : 185.4 ,
"view_count" : 1250000 ,
"like_count" : 45000 ,
"thumbnail_url" : "https://img.youtube.com/vi/example123/maxresdefault.jpg" ,
"platform" : "youtube" ,
"video_id" : "example123" ,
"estimated_credits" : 25 ,
"formats" : [
{
"format_id" : "22" ,
"format" : "mp4" ,
"quality" : "720p" ,
"resolution" : "1280x720" ,
"fps" : 30 ,
"file_size" : 85600000 ,
"audio_codec" : "aac" ,
"video_codec" : "h264"
},
{
"format_id" : "140" ,
"format" : "mp3" ,
"quality" : "128kbps" ,
"audio_codec" : "aac" ,
"file_size" : 3000000
}
]
}
Download videos with public access limitations.
POST /api/v1/video/public/download
Content-Type : application/json
{
"url" : "https://youtube.com/watch?v=example123" ,
"format" : "mp3" ,
"quality" : "128kbps"
}
# Public download (10-minute limit, basic formats only)
download_request = {
"url" : "https://youtube.com/watch?v=example123" ,
"format" : "mp3" , # mp4, mp3, wav only for public
"quality" : "128kbps" , # Limited quality options
"audio_only" : True # For audio-only download
}
response = requests.post(
"https://api.audiopod.ai/api/v1/video/public/download" ,
json = download_request
)
if response.status_code == 200 :
download_job = response.json()
job_id = download_job[ "job" ][ "id" ]
print ( f "Public download job created: { job_id } " )
print ( f "Status: { download_job[ 'job' ][ 'status' ] } " )
Download videos with full features and no restrictions.
POST /api/v1/video/download
X-API-Key : {api_key}
Content-Type : application/json
{
"url" : "https://youtube.com/watch?v=example123" ,
"format" : "mp4" ,
"quality" : "1080p" ,
"audio_only" : false ,
"include_thumbnail" : true
}
# Authenticated download (full features)
download_request = {
"url" : "https://youtube.com/watch?v=example123" ,
"format" : "mp4" , # Any supported format
"quality" : "1080p" , # Any available quality
"audio_only" : False , # Keep video, set True for audio-only
"include_thumbnail" : True , # Download thumbnail
"format_selector" : "best" , # "best", "worst", or specific format_id
"output_filename" : "my_video.mp4" # Custom filename
}
response = requests.post(
"https://api.audiopod.ai/api/v1/video/download" ,
headers = { "X-API-Key" : api_key},
json = download_request
)
if response.status_code == 200 :
download_job = response.json()
job_id = download_job[ "job" ][ "id" ]
print ( f "Download job created: { job_id } " )
print ( f "Estimated credits: { download_job[ 'estimated_credits' ] } " )
Request Parameters:
url (required): URL of the video to download
format (optional): Output format (mp4, mp3, wav, webm, mkv, etc.)
quality (optional): Quality setting (144p, 720p, 1080p, 4K for video; 128kbps, 320kbps for audio)
audio_only (optional): Extract audio only (default: false)
include_thumbnail (optional): Download thumbnail image (default: false)
format_selector (optional): Format selection strategy (“best”, “worst”, or specific format_id)
output_filename (optional): Custom output filename
Response:
{
"job" : {
"id" : 123 ,
"status" : "PROCESSING" ,
"progress" : 0 ,
"url" : "https://youtube.com/watch?v=example123" ,
"format" : "mp4" ,
"quality" : "1080p" ,
"audio_only" : false ,
"include_thumbnail" : true ,
"estimated_duration" : 185.4 ,
"created_at" : "2024-01-15T10:30:00Z" ,
"task_id" : "celery_task_uuid_here"
},
"estimated_credits" : 25 ,
"message" : "Download job created successfully"
}
Batch Downloads
Bulk Download Multiple Videos
Download multiple videos in a single request.
POST /api/v1/video/bulk-download
X-API-Key : {api_key}
Content-Type : application/json
{
"downloads" : [
{
"url" : "https://youtube.com/watch?v=video1" ,
"format" : "mp3" ,
"quality" : "320kbps"
},
{
"url" : "https://youtube.com/watch?v=video2" ,
"format" : "mp4" ,
"quality" : "720p"
}
],
"audio_only" : true ,
"include_thumbnails" : false
}
# Bulk download multiple videos
bulk_request = {
"downloads" : [
{
"url" : "https://youtube.com/watch?v=video1" ,
"format" : "mp3" ,
"quality" : "320kbps"
},
{
"url" : "https://youtube.com/watch?v=video2" ,
"format" : "mp4" ,
"quality" : "720p"
},
{
"url" : "https://youtube.com/watch?v=video3" ,
"format" : "wav" # High quality audio
}
],
"audio_only" : True , # Apply to all downloads
"include_thumbnail" : False # Apply to all downloads
}
response = requests.post(
"https://api.audiopod.ai/api/v1/video/bulk-download" ,
headers = { "X-API-Key" : api_key},
json = bulk_request
)
if response.status_code == 200 :
bulk_job = response.json()
print ( f "Bulk download created with { len (bulk_job[ 'jobs' ]) } jobs" )
for job in bulk_job[ "jobs" ]:
print ( f " Job { job[ 'id' ] } : { job[ 'url' ] } " )
Job Management
Get Download Status
Monitor the progress of download jobs.
GET /api/v1/video/jobs/{job_id}
X-API-Key : {api_key}
job_id = 123
response = requests.get(
f "https://api.audiopod.ai/api/v1/video/jobs/ { job_id } " ,
headers = { "X-API-Key" : api_key}
)
if response.status_code == 200 :
job_status = response.json()
print ( f "Status: { job_status[ 'status' ] } " )
print ( f "Progress: { job_status[ 'progress' ] } %" )
if job_status[ "status" ] == "COMPLETED" :
print ( "Download complete!" )
print ( f "Video URL: { job_status[ 'download_url' ] } " )
if job_status.get( "thumbnail_url" ):
print ( f "Thumbnail URL: { job_status[ 'thumbnail_url' ] } " )
# File information
print ( f "File size: { job_status[ 'file_size' ] } bytes" )
print ( f "Duration: { job_status[ 'duration' ] } seconds" )
Response (Completed Job):
{
"id" : 123 ,
"status" : "COMPLETED" ,
"progress" : 100 ,
"url" : "https://youtube.com/watch?v=example123" ,
"format" : "mp4" ,
"quality" : "1080p" ,
"audio_only" : false ,
"include_thumbnail" : true ,
"created_at" : "2024-01-15T10:30:00Z" ,
"completed_at" : "2024-01-15T10:33:15Z" ,
"download_url" : "https://api.audiopod.ai/download/video_123.mp4" ,
"thumbnail_url" : "https://api.audiopod.ai/download/thumbnail_123.jpg" ,
"original_title" : "Amazing Video Content" ,
"file_size" : 85600000 ,
"duration" : 185.4 ,
"resolution" : "1920x1080" ,
"fps" : 30 ,
"audio_codec" : "aac" ,
"video_codec" : "h264" ,
"credits_used" : 25 ,
"processing_time" : 195.2
}
List Download Jobs
Get all download jobs for the authenticated user.
GET /api/v1/video/jobs?status=COMPLETED&platform=youtube&limit=50
X-API-Key : {api_key}
response = requests.get(
"https://api.audiopod.ai/api/v1/video/jobs" ,
headers = { "X-API-Key" : api_key "},
params={
"status" : "COMPLETED" , # Filter by status
"platform" : "youtube" , # Filter by platform
"format" : "mp3" , # Filter by format
"limit" : 50 ,
"skip" : 0
}
)
if response.status_code == 200 :
jobs_data = response.json()
for job in jobs_data[ "items" ]:
print ( f "Job { job[ 'id' ] } : { job[ 'status' ] } - { job[ 'original_title' ] } " )
print ( f " Platform: { job[ 'platform' ] } , Format: { job[ 'format' ] } " )
print ( f " Duration: { job[ 'duration' ] } s, Size: { job[ 'file_size' ] } bytes" )
Download Files
Download the extracted media files.
def download_extracted_media ( job_id , api_key , download_thumbnail = True ):
"""Download extracted media and thumbnail from completed job"""
# Get job details
response = requests.get(
f "https://api.audiopod.ai/api/v1/video/jobs/ { job_id } " ,
headers = { "X-API-Key" : api_key}
)
if response.status_code != 200 :
return { "error" : "Job not found" }
job = response.json()
if job[ "status" ] != "COMPLETED" :
return { "error" : f "Job not completed. Status: { job[ 'status' ] } " }
downloaded_files = []
# Download main media file
if job.get( "download_url" ):
media_response = requests.get(job[ "download_url" ])
if media_response.status_code == 200 :
# Use original title for filename, cleaned up
title = job[ "original_title" ].replace( "/" , "_" ).replace( " \\ " , "_" )
extension = job[ "format" ]
filename = f " { title } _ { job_id } . { extension } "
with open (filename, "wb" ) as f:
f.write(media_response.content)
downloaded_files.append({
"type" : "media" ,
"filename" : filename,
"size" : len (media_response.content)
})
# Download thumbnail if available and requested
if download_thumbnail and job.get( "thumbnail_url" ):
thumb_response = requests.get(job[ "thumbnail_url" ])
if thumb_response.status_code == 200 :
thumb_filename = f " { title } _thumbnail_ { job_id } .jpg"
with open (thumb_filename, "wb" ) as f:
f.write(thumb_response.content)
downloaded_files.append({
"type" : "thumbnail" ,
"filename" : thumb_filename,
"size" : len (thumb_response.content)
})
return {
"success" : True ,
"job_id" : job_id,
"title" : job[ "original_title" ],
"duration" : job[ "duration" ],
"format" : job[ "format" ],
"quality" : job[ "quality" ],
"files" : downloaded_files,
"credits_used" : job[ "credits_used" ]
}
# Usage
result = download_extracted_media( 123 , "your_api_key" , download_thumbnail = True )
if result.get( "success" ):
print ( f "Downloaded: { result[ 'title' ] } " )
for file_info in result[ "files" ]:
print ( f " { file_info[ 'type' ] } : { file_info[ 'filename' ] } ( { file_info[ 'size' ] } bytes)" )
Job Management
Update Download Job
Update job metadata such as custom title.
PUT /api/v1/video/jobs/{job_id}
X-API-Key : {api_key}
Content-Type : application/json
{
"title" : "My Custom Video Title"
}
job_id = 123
update_data = {
"title" : "My Custom Video Title"
}
response = requests.put(
f "https://api.audiopod.ai/api/v1/video/jobs/ { job_id } " ,
headers = { "X-API-Key" : api_key},
json = update_data
)
if response.status_code == 200 :
updated_job = response.json()
print ( f "Updated job title: { updated_job[ 'title' ] } " )
Delete Download Job
Remove a download job and its associated files.
DELETE /api/v1/video/jobs/{job_id}
X-API-Key : {api_key}
job_id = 123
response = requests.delete(
f "https://api.audiopod.ai/api/v1/video/jobs/ { job_id } " ,
headers = { "X-API-Key" : api_key}
)
if response.status_code == 200 :
result = response.json()
print (result[ "message" ]) # "Job deleted successfully"
Get User Statistics
Get comprehensive download statistics for the authenticated user.
GET /api/v1/video/stats
X-API-Key : {api_key}
response = requests.get(
"https://api.audiopod.ai/api/v1/video/stats" ,
headers = { "X-API-Key" : api_key}
)
if response.status_code == 200 :
stats = response.json()
print ( f "Total downloads: { stats[ 'total_downloads' ] } " )
print ( f "Total duration: { stats[ 'total_duration' ] } seconds" )
print ( f "Credits used: { stats[ 'total_credits_used' ] } " )
print ( f "By platform: { stats[ 'downloads_by_platform' ] } " )
print ( f "By format: { stats[ 'downloads_by_format' ] } " )
Response:
{
"total_downloads" : 45 ,
"total_duration" : 12450.5 ,
"total_credits_used" : 1245 ,
"downloads_by_platform" : {
"youtube" : 25 ,
"tiktok" : 15 ,
"instagram" : 5
},
"downloads_by_format" : {
"mp3" : 30 ,
"mp4" : 15
},
"recent_downloads" : [
{
"id" : 123 ,
"title" : "Recent Video" ,
"platform" : "youtube" ,
"status" : "COMPLETED" ,
"created_at" : "2024-01-15T10:30:00Z"
}
]
}
Platform Audio Video Playlists Live Streams YouTube ✅ ✅ ✅ ✅ TikTok ✅ ✅ ❌ ❌ Instagram ✅ ✅ ❌ ❌ Vimeo ✅ ✅ ✅ ❌ Twitter/X ✅ ✅ ❌ ❌ Facebook ✅ ✅ ❌ ❌ Spotify ✅ ❌ ✅ ❌ SoundCloud ✅ ❌ ✅ ❌
Video Formats:
MP4 (H.264, H.265)
WebM (VP8, VP9)
MKV
AVI
MOV
Audio Formats:
MP3 (various bitrates)
WAV (uncompressed)
AAC
OGG
FLAC (lossless)
Quality Options:
Video : 144p, 240p, 360p, 480p, 720p, 1080p, 1440p, 2160p (4K)
Audio : 64kbps, 128kbps, 192kbps, 256kbps, 320kbps
Use Cases & Examples
Podcast Content Creation
def extract_podcast_audio_from_videos ( video_urls , api_key ):
"""Extract high-quality audio from video content for podcast creation"""
podcast_audios = []
for url in video_urls:
print ( f "Extracting audio from: { url } " )
# Request high-quality audio extraction
download_request = {
"url" : url,
"audio_only" : True ,
"format" : "wav" , # High quality for editing
"quality" : "best" , # Best available audio quality
"include_thumbnail" : True # For podcast artwork
}
response = requests.post(
"https://api.audiopod.ai/api/v1/video/download" ,
headers = { "X-API-Key" : api_key},
json = download_request
)
if response.status_code == 200 :
job_data = response.json()
podcast_audios.append({
"url" : url,
"job_id" : job_data[ "job" ][ "id" ],
"status" : "processing"
})
# Monitor all extractions
completed_audios = []
while len (completed_audios) < len (podcast_audios):
for audio_job in podcast_audios:
if any (c[ "job_id" ] == audio_job[ "job_id" ] for c in completed_audios):
continue
status_response = requests.get(
f "https://api.audiopod.ai/api/v1/video/jobs/ { audio_job[ 'job_id' ] } " ,
headers = { "X-API-Key" : api_key}
)
job_status = status_response.json()
if job_status[ "status" ] == "COMPLETED" :
# Download the audio file
audio_response = requests.get(job_status[ "download_url" ])
filename = f "podcast_audio_ { audio_job[ 'job_id' ] } .wav"
with open (filename, "wb" ) as f:
f.write(audio_response.content)
completed_audios.append({
"original_url" : audio_job[ "url" ],
"job_id" : audio_job[ "job_id" ],
"filename" : filename,
"title" : job_status[ "original_title" ],
"duration" : job_status[ "duration" ],
"thumbnail_url" : job_status.get( "thumbnail_url" )
})
print ( f "Extracted: { filename } " )
time.sleep( 5 )
return completed_audios
# Usage
video_urls = [
"https://youtube.com/watch?v=interview1" ,
"https://youtube.com/watch?v=interview2" ,
"https://youtube.com/watch?v=interview3"
]
podcast_content = extract_podcast_audio_from_videos(video_urls, "your_api_key" )
print ( f "Extracted { len (podcast_content) } audio files for podcast:" )
for content in podcast_content:
print ( f " { content[ 'title' ] } - { content[ 'filename' ] } ( { content[ 'duration' ] :.1f} s)" )
Educational Content Archive
def archive_educational_content ( playlist_urls , api_key ):
"""Download educational videos for offline access"""
archived_content = {}
for playlist_name, url in playlist_urls.items():
print ( f "Archiving { playlist_name } ..." )
# Get video info first
info_response = requests.post(
"https://api.audiopod.ai/api/v1/video/info" ,
headers = { "X-API-Key" : api_key},
json = { "url" : url, "include_formats" : True }
)
if info_response.status_code == 200 :
video_info = info_response.json()
# Download in appropriate quality for education
download_request = {
"url" : url,
"format" : "mp4" ,
"quality" : "720p" , # Good balance of quality/size
"include_thumbnail" : True ,
"output_filename" : f " { playlist_name } _ { video_info[ 'video_id' ] } .mp4"
}
download_response = requests.post(
"https://api.audiopod.ai/api/v1/video/download" ,
headers = { "X-API-Key" : api_key},
json = download_request
)
if download_response.status_code == 200 :
job_data = download_response.json()
archived_content[playlist_name] = {
"job_id" : job_data[ "job" ][ "id" ],
"title" : video_info[ "title" ],
"duration" : video_info[ "duration" ],
"estimated_credits" : job_data[ "estimated_credits" ],
"status" : "downloading"
}
return archived_content
# Usage for educational content
educational_playlists = {
"math_basics" : "https://youtube.com/watch?v=math_lesson_1" ,
"science_intro" : "https://youtube.com/watch?v=science_intro" ,
"history_overview" : "https://youtube.com/watch?v=history_basics"
}
archive = archive_educational_content(educational_playlists, "your_api_key" )
print ( "Educational content archiving started:" )
for subject, info in archive.items():
print ( f " { subject } : { info[ 'title' ] } ( { info[ 'duration' ] } s)" )
Social Media Content Analysis
def extract_social_media_content ( social_urls , api_key ):
"""Extract content from various social media platforms for analysis"""
extracted_content = []
for url in social_urls:
# Detect platform
platform = "unknown"
if "tiktok.com" in url:
platform = "tiktok"
elif "instagram.com" in url:
platform = "instagram"
elif "youtube.com" in url or "youtu.be" in url:
platform = "youtube"
elif "vimeo.com" in url:
platform = "vimeo"
print ( f "Extracting from { platform } : { url } " )
# Platform-specific extraction settings
if platform == "tiktok" :
# TikTok: usually short videos, extract both video and audio
download_config = {
"format" : "mp4" ,
"quality" : "best" ,
"audio_only" : False , # Keep video for visual analysis
"include_thumbnail" : True
}
elif platform == "instagram" :
# Instagram: stories, reels, posts
download_config = {
"format" : "mp4" ,
"quality" : "720p" ,
"audio_only" : True , # Often interested in audio
"include_thumbnail" : True
}
else :
# YouTube, Vimeo: longer content
download_config = {
"format" : "mp3" , # Audio for analysis
"quality" : "320kbps" ,
"audio_only" : True ,
"include_thumbnail" : True
}
download_config[ "url" ] = url
response = requests.post(
"https://api.audiopod.ai/api/v1/video/download" ,
headers = { "X-API-Key" : api_key},
json = download_config
)
if response.status_code == 200 :
job_data = response.json()
extracted_content.append({
"platform" : platform,
"url" : url,
"job_id" : job_data[ "job" ][ "id" ],
"config" : download_config,
"status" : "processing"
})
return extracted_content
# Usage for social media analysis
social_urls = [
"https://tiktok.com/@user/video/123" ,
"https://instagram.com/p/ABC123/" ,
"https://youtube.com/watch?v=analysis_video" ,
"https://vimeo.com/123456789"
]
social_content = extract_social_media_content(social_urls, "your_api_key" )
print ( f "Extracting content from { len (social_content) } social media sources" )
Error Handling
400 Bad Request - Invalid URL
Causes: - URL format not supported - Private/restricted content - Invalid video ID
Solutions: - Verify URL is publicly accessible - Check platform support - Ensure URL format is correct
403 Forbidden - Access Denied
Causes: - Content is private or restricted - Geographic restrictions - Platform blocking
Solutions: - Use publicly accessible content - Check content availability in your region - Try different platform
404 Not Found - Content Not Available
Causes: - Video deleted or removed - Invalid video ID - Platform content policy violation
Solutions: - Verify content still exists - Check for updated URL - Use alternative source
413 Payload Too Large - File Size Limit
Causes: - Video file too large for processing - Very long duration content
Solutions: - Use lower quality settings - Extract audio only - Split long content
402 Payment Required - Insufficient Credits
Causes: - Not enough credits for download duration/quality
Solutions: - Purchase additional credits - Use lower quality settings - Check credit requirements
Get formats available for public downloads (no authentication required).
GET /api/v1/video/public/formats
response = requests.get(
"https://api.audiopod.ai/api/v1/video/public/formats"
)
if response.status_code == 200 :
formats = response.json()
print ( "Public formats available:" )
print ( f "Video: { formats[ 'video_formats' ] } " )
print ( f "Audio: { formats[ 'audio_formats' ] } " )
print ( f "Limitations: { formats[ 'limitations' ] } " )
Response:
{
"video_formats" : [ "mp4" ],
"audio_formats" : [ "mp3" , "wav" ],
"quality_options" : [ "144p" , "240p" , "360p" , "480p" , "720p" , "1080p" , "1440p" , "2160p" , "best" , "worst" ],
"supported_platforms" : [ "youtube" , "tiktok" , "instagram" , "vimeo" , "spotify" , "twitter" , "facebook" , "twitch" , "dailymotion" , "other" ],
"limitations" : {
"max_duration_minutes" : 10 ,
"requires_authentication" : false ,
"credit_cost" : 0
}
}
Get complete list of formats available for authenticated users.
GET /api/v1/video/formats
X-API-Key : {api_key}
response = requests.get(
"https://api.audiopod.ai/api/v1/video/formats" ,
headers = { "X-API-Key" : api_key}
)
if response.status_code == 200 :
formats = response.json()
print ( "All formats available:" )
print ( f "Video: { formats[ 'video_formats' ] } " )
print ( f "Audio: { formats[ 'audio_formats' ] } " )
print ( f "Quality: { formats[ 'quality_options' ] } " )
Response:
{
"video_formats" : [ "mp4" , "webm" , "mkv" , "flv" , "avi" , "mov" ],
"audio_formats" : [ "mp3" , "wav" , "aac" , "m4a" , "ogg" , "opus" ],
"quality_options" : [ "144p" , "240p" , "360p" , "480p" , "720p" , "1080p" , "1440p" , "2160p" , "best" , "worst" ],
"supported_platforms" : [ "youtube" , "tiktok" , "instagram" , "vimeo" , "spotify" , "twitter" , "facebook" , "twitch" , "dailymotion" , "other" ],
"limitations" : {
"max_duration_minutes" : null ,
"requires_authentication" : true ,
"credit_cost" : "Variable based on duration"
}
}
Best Practices
Quality vs. File Size Optimization
# Quality recommendations by use case
quality_recommendations = {
"podcast_audio" : {
"format" : "wav" ,
"quality" : "320kbps" ,
"audio_only" : True ,
"reason" : "High quality for editing and processing"
},
"social_media_analysis" : {
"format" : "mp3" ,
"quality" : "128kbps" ,
"audio_only" : True ,
"reason" : "Sufficient quality, smaller file size"
},
"educational_archive" : {
"format" : "mp4" ,
"quality" : "720p" ,
"audio_only" : False ,
"reason" : "Good balance of quality and storage"
},
"professional_video" : {
"format" : "mp4" ,
"quality" : "1080p" ,
"audio_only" : False ,
"reason" : "High quality for professional use"
}
}
Batch Processing Strategy
def optimize_batch_downloads ( urls , api_key , max_concurrent = 5 ):
"""Optimize batch downloads with concurrency control"""
import asyncio
from concurrent.futures import ThreadPoolExecutor
def process_single_download ( url ):
download_request = {
"url" : url,
"format" : "mp3" ,
"quality" : "192kbps" ,
"audio_only" : True
}
response = requests.post(
"https://api.audiopod.ai/api/v1/video/download" ,
headers = { "X-API-Key" : api_key},
json = download_request
)
return response.json() if response.status_code == 200 else None
# Process in batches to avoid overwhelming the API
batch_size = max_concurrent
all_jobs = []
for i in range ( 0 , len (urls), batch_size):
batch_urls = urls[i:i + batch_size]
with ThreadPoolExecutor( max_workers = max_concurrent) as executor:
batch_jobs = list (executor.map(process_single_download, batch_urls))
all_jobs.extend([job for job in batch_jobs if job])
# Brief pause between batches
time.sleep( 2 )
return all_jobs
Pricing
Media extraction pricing based on actual credit costs:
Service Cost Description Video Info Free Get metadata without downloading Video Download (All Formats) 6 credits/minute Download audio/video in any quality Thumbnail Extraction 1 credit Download video thumbnail
Cost Examples
Duration Service Quality Credits USD Cost 5 minutes Audio Only 320kbps 30 $0.004 10 minutes Video 720p 60 $0.008 30 minutes Video 1080p 180 $0.024 2 hours Audio Only 192kbps 720 $0.096
Cost Optimization Tips
Extract audio only when video is not needed
Use appropriate quality - don’t download 4K for analysis
Batch process similar content for efficiency
Get info first to estimate costs before downloading
Next Steps
Speech-to-Text Transcribe extracted audio content.
Speaker Separation Separate speakers in extracted audio.