Audio
Endpoints for converting and compressing audio files using FFmpeg.
Convert
$0.0003per MB
POST /audio/convert
Convert audio files between 15 formats with control over codec, bitrate, sample rate, channels, volume, normalization, trimming, and metadata.
Supported formats: AAC, AC3, AIFF, AMR, AU, CAF, FLAC, M4A, M4B, MP3, OGA, VOC, WAV, WEBA, WMA.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
inputFormat | aac | ac3 | aiff | amr | au | caf | dss | flac | m4a | m4b | mp3 | oga | voc | wav | weba | wma | — | Override MIME type detection for formats browsers may not recognize. |
targetFormat | aac | ac3 | aiff | amr | au | caf | flac | m4a | m4b | mp3 | oga | voc | wav | weba | wma | mp3 | Output format. |
codec | auto | aac | mp3 | opus | vorbis | flac | alac | pcm_s16le | pcm_s24le | pcm_s32le | pcm_s16be | ac3 | wmav2 | amr_nb | copy | auto | Audio codec. auto picks best for format, copy remuxes without re-encoding. |
bitrate | string | — | Target bitrate (e.g. 128k, 320k). |
vbrQuality | number | — | MP3 VBR quality 0-9 (0 = best). Requires mp3Mode=vbr. |
sampleRate | number | — | Sample rate in Hz (e.g. 44100, 48000). Omit to preserve source. |
channels | number | — | 1 (mono) or 2 (stereo). Omit to preserve source. |
bitDepth | 8 | 16 | 24 | 32 | — | PCM bit depth. Ignored for compressed codecs. |
startTime | string | — | Trim start (e.g. 00:01:30 or 90). |
endTime | string | — | Trim end position. |
duration | string | — | Max duration from startTime. |
volume | string | — | Volume adjustment (e.g. 1.5, -3dB). |
normalize | true | false | false | Apply EBU R128 loudness normalization. |
stripMetadata | true | false | false | Remove all metadata tags. |
title | string | — | Set title tag. |
artist | string | — | Set artist tag. |
album | string | — | Set album tag. |
genre | string | — | Set genre tag. |
year | string | — | Set year tag. |
trackNumber | string | — | Set track number tag. |
aacProfile | aac_low | aac_he | aac_he_v2 | — | AAC profile. Only applies to AAC output. |
flacCompression | number | — | FLAC compression level 0-12. |
mp3Mode | cbr | vbr | cbr | MP3 encoding mode. CBR uses bitrate, VBR uses vbrQuality. |
Example
curl -X POST https://api.fylor.com/audio/convert \
-H "Authorization: <mpp-credential>" \
-F "file=@input.wav" \
-F "targetFormat=mp3" \
-F "bitrate=320k" \
-o output.mp3Example: Convert to FLAC (lossless)
curl -X POST https://api.fylor.com/audio/convert \
-H "Authorization: <mpp-credential>" \
-F "file=@input.mp3" \
-F "targetFormat=flac" \
-F "flacCompression=8" \
-o output.flacLimits
- Max file size: 500 MB
- Minimum charge: $0.01 per request
Compress
$0.0003per MB
POST /audio/compress
Reduce audio file sizes while keeping the same format. Lossy formats (MP3, AAC, etc.) get lower bitrate encoding. Lossless formats (WAV, FLAC, AIFF, etc.) get reduced bit depth and/or sample rate. If compression doesn’t reduce the file size, the original is returned unchanged.
Supported formats: AAC, AC3, AIF, AIFC, AIFF, AMR, AU, CAF, FLAC, M4A, M4B, MP3, OGA, VOC, WAV, WEBA, WMA.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
quality | light | medium | heavy | extreme | medium | Compression preset. Light: 192kbps/16-bit. Medium: 128kbps/16-bit/44.1kHz cap. Heavy: 96kbps/16-bit/22kHz cap. Extreme: 64kbps/8-bit/22kHz cap. |
bitrate | string | — | Override bitrate for lossy formats (e.g. 128k, 256k). |
sampleRate | number | — | Override output sample rate in Hz. |
channels | 1 | 2 | — | Force mono or stereo. Omit to preserve source. |
bitDepth | 8 | 16 | 24 | 32 | — | Override bit depth for lossless/PCM formats. |
normalize | true | false | false | Apply EBU R128 loudness normalization before encoding. |
stripMetadata | true | false | true | Remove ID3, Vorbis comments, and other metadata tags. |
stripArtwork | true | false | true | Remove embedded cover art (can save 500KB+). |
Example
curl -X POST https://api.fylor.com/audio/compress \
-H "Authorization: <mpp-credential>" \
-F "file=@podcast.mp3" \
-F "quality=heavy" \
-o compressed.mp3Example: Compress WAV with normalization
curl -X POST https://api.fylor.com/audio/compress \
-H "Authorization: <mpp-credential>" \
-F "file=@recording.wav" \
-F "quality=medium" \
-F "normalize=true" \
-o compressed.wavLimits
- Max file size: 500 MB
- Minimum charge: $0.01 per request
Last updated on