Skip to Content
Audio

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

NameTypeDefaultDescription
inputFormataac | ac3 | aiff | amr | au | caf | dss | flac | m4a | m4b | mp3 | oga | voc | wav | weba | wmaOverride MIME type detection for formats browsers may not recognize.
targetFormataac | ac3 | aiff | amr | au | caf | flac | m4a | m4b | mp3 | oga | voc | wav | weba | wmamp3Output format.
codecauto | aac | mp3 | opus | vorbis | flac | alac | pcm_s16le | pcm_s24le | pcm_s32le | pcm_s16be | ac3 | wmav2 | amr_nb | copyautoAudio codec. auto picks best for format, copy remuxes without re-encoding.
bitratestringTarget bitrate (e.g. 128k, 320k).
vbrQualitynumberMP3 VBR quality 0-9 (0 = best). Requires mp3Mode=vbr.
sampleRatenumberSample rate in Hz (e.g. 44100, 48000). Omit to preserve source.
channelsnumber1 (mono) or 2 (stereo). Omit to preserve source.
bitDepth8 | 16 | 24 | 32PCM bit depth. Ignored for compressed codecs.
startTimestringTrim start (e.g. 00:01:30 or 90).
endTimestringTrim end position.
durationstringMax duration from startTime.
volumestringVolume adjustment (e.g. 1.5, -3dB).
normalizetrue | falsefalseApply EBU R128 loudness normalization.
stripMetadatatrue | falsefalseRemove all metadata tags.
titlestringSet title tag.
artiststringSet artist tag.
albumstringSet album tag.
genrestringSet genre tag.
yearstringSet year tag.
trackNumberstringSet track number tag.
aacProfileaac_low | aac_he | aac_he_v2AAC profile. Only applies to AAC output.
flacCompressionnumberFLAC compression level 0-12.
mp3Modecbr | vbrcbrMP3 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.mp3

Example: 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.flac

Limits

  • 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

NameTypeDefaultDescription
qualitylight | medium | heavy | extrememediumCompression preset. Light: 192kbps/16-bit. Medium: 128kbps/16-bit/44.1kHz cap. Heavy: 96kbps/16-bit/22kHz cap. Extreme: 64kbps/8-bit/22kHz cap.
bitratestringOverride bitrate for lossy formats (e.g. 128k, 256k).
sampleRatenumberOverride output sample rate in Hz.
channels1 | 2Force mono or stereo. Omit to preserve source.
bitDepth8 | 16 | 24 | 32Override bit depth for lossless/PCM formats.
normalizetrue | falsefalseApply EBU R128 loudness normalization before encoding.
stripMetadatatrue | falsetrueRemove ID3, Vorbis comments, and other metadata tags.
stripArtworktrue | falsetrueRemove 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.mp3

Example: 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.wav

Limits

  • Max file size: 500 MB
  • Minimum charge: $0.01 per request
Last updated on