Skip to content

Audio Operations

Convert audio files between formats with customizable bitrate and quality settings.

POST /api/v1/jobs/audio/convert

Convert audio files to different formats with quality control.

{
"source_bucket": "my-bucket",
"source_key": "audio/song.mp3",
"dest_bucket": "my-bucket",
"dest_key": "audio/song.opus",
"format": "opus",
"bitrate": "128k"
}
ParameterTypeRequiredDescription
source_bucketstringSource S3 bucket
source_keystringSource S3 key (audio file)
dest_bucketstringDestination S3 bucket
dest_keystringDestination S3 key (audio file)
formatstringOutput format: mp3, aac, opus, ogg, flac, wav, m4a
bitratestringTarget bitrate (e.g., 128k, 192k, 320k)
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"message": "Job queued for processing"
}
Terminal window
curl -X POST http://localhost:8080/api/v1/jobs/audio/convert \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"source_bucket": "my-bucket",
"source_key": "song.mp3",
"dest_bucket": "my-bucket",
"dest_key": "song.aac",
"format": "aac",
"bitrate": "192k"
}'

MP3

Universal compatibility, good compression

Recommended bitrate: 128k-320k

AAC

Better quality than MP3 at same bitrate

Recommended bitrate: 128k-256k

Opus

Best compression, ideal for streaming

Recommended bitrate: 64k-128k

OGG Vorbis

Open format, good quality

Recommended bitrate: 128k-192k

FLAC

Lossless compression, archival quality

No bitrate needed (lossless)

WAV

Uncompressed, professional use

No bitrate needed (uncompressed)

Choose the right bitrate for your use case:

BitrateQualityUse Case
64kLowVoice, podcasts, minimal bandwidth
96kAcceptableStreaming, mobile apps
128kGoodStandard streaming, most use cases
192kHighHigh-quality streaming
256kVery HighPremium streaming services
320kMaximumArchival, audiophile quality

Podcast Distribution

Convert recordings to MP3 for universal compatibility

Music Streaming

Optimize audio files with Opus or AAC for bandwidth efficiency

Audio Archival

Convert to FLAC for lossless long-term storage

Mobile Apps

Reduce file sizes with lower bitrates for faster downloads

For lossless formats (FLAC, WAV), omit the bitrate parameter:

{
"source_bucket": "my-bucket",
"source_key": "audio.wav",
"dest_bucket": "my-bucket",
"dest_key": "audio.flac",
"format": "flac"
}

For maximum quality, use the highest bitrate:

{
"source_bucket": "my-bucket",
"source_key": "audio.flac",
"dest_bucket": "my-bucket",
"dest_key": "audio.mp3",
"format": "mp3",
"bitrate": "320k"
}

Convert multiple audio files at once using Batch Operations:

{
"jobs": [
{
"type": "audio_convert",
"source_bucket": "my-bucket",
"source_key": "track1.wav",
"dest_bucket": "my-bucket",
"dest_key": "track1.mp3",
"parameters": { "format": "mp3", "bitrate": "192k" }
},
{
"type": "audio_convert",
"source_bucket": "my-bucket",
"source_key": "track2.wav",
"dest_bucket": "my-bucket",
"dest_key": "track2.mp3",
"parameters": { "format": "mp3", "bitrate": "192k" }
}
]
}