cURL
curl --request POST \ --url https://api.example.com/v1/audio/trim \ --header 'Content-Type: application/json' \ --data ' { "fileId": "<string>", "options": { "threshold": 123, "minSilence": 123, "padStart": 123, "padEnd": 123, "keepOriginal": true } } '
{ "404": {}, "422": {}, "fileId": "<string>", "originalFileId": "<string>", "duration": { "original": 123, "trimmed": 123, "reduction": 123 }, "fileSize": { "original": 123, "trimmed": 123 } }
Trim silence from audio files to optimize processing
Show options properties
Show duration properties
Show fileSize properties
curl -X POST https://api.authentivoice.com/v1/audio/trim \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "fileId": "file_0987654321fedcba", "options": { "threshold": -35, "minSilence": 0.3 } }'
{ "fileId": "file_trimmed_abc123def456", "originalFileId": "file_0987654321fedcba", "duration": { "original": 300.5, "trimmed": 285.2, "reduction": 5.1 }, "fileSize": { "original": 4505600, "trimmed": 4278400 } }
{ "error": { "code": "FILE_NOT_FOUND", "message": "The specified audio file was not found" } }
{ "error": { "code": "INVALID_PARAMETERS", "message": "Threshold must be between -60 and 0 dB" } }