Process Audio
beatra.audio.processProcess one audio file: trim, loop to a length, fade, normalize loudness, convert format, split into stems (vocals and accompaniment, or six stems), or isolate the voice from 4.6 seconds to 5 minutes of audio; optional fade, loudness, and format finishing steps run in the same call. Every operation is a paid task, and trim, loop, fade, loudness, and format are limited to 50 calls a day. A six-stem split costs more than a two-stem one: call beatra.models.list for each price. This billable call consumes Beatra credits and creates an asynchronous task. Submit exactly once, then poll with beatra.tasks.get. Reuse the same client_request_id only for an identical retry.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"operation": "<operation>",
"source": "<source>",
"client_request_id": "<client_request_id>"
},
"name": "beatra.audio.process"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | two_stem (vocals and accompaniment) or multi_stem (vocals, drums, bass, guitar, piano, other). | |
| end_ms | No | Where the kept audio ends; send this or target_duration_ms. | |
| format | No | mp3, wav, ogg, flac, m4a, or ulaw_8k_wav (8 kHz telephone audio). When omitted: isolate_voice gives wav; trim keeps an uncompressed (PCM) source as wav; otherwise a lossless source becomes flac, MP3 stays mp3, Ogg Vorbis or Opus (WebM included) becomes ogg, AAC becomes m4a, any other codec follows its container's format (WAV stays wav, MP4 becomes m4a), and anything unrecognized becomes mp3. | |
| source | Yes | The track to work on: an artifact from beatra.music.generate, an uploaded file, or a URL. | |
| channels | No | 1 for mono or 2 for stereo; keeps the input when omitted. | |
| start_ms | No | Where the kept audio starts, in milliseconds (default 0). | |
| operation | Yes | trim, loop, fade, normalize_loudness, convert_format, separate_stems, or isolate_voice. | |
| fade_curve | No | tri (linear), exp, log, or qsin. | |
| fade_in_ms | No | Fade length in milliseconds (0–30000). | |
| loop_count | No | How many times to repeat the loop window (2–100). | |
| fade_out_ms | No | Fade length in milliseconds (0–30000). | |
| loop_end_ms | No | The part of the source to repeat, at least 4 seconds; defaults to the whole file. | |
| sample_rate | No | Output sample rate in Hz. When omitted, the input rate is kept if it is one of these values, otherwise 48000. | |
| bitrate_kbps | No | Bitrate for mp3, ogg, and m4a, sent together with format (m4a up to 256; ogg varies around this target). Default when omitted: 192 when format is sent; otherwise the source's bitrate rounded up to one of these values (192 when unknown). | |
| crossfade_ms | No | Crossfade at each loop seam, 50–3000 milliseconds. | |
| true_peak_db | No | True-peak ceiling (−9 to 0 dB, default −1). Sending it also normalizes the loudness to loudness_lufs. | |
| end_with_fade | No | Fade out the end of the loop (default true). | |
| loop_start_ms | No | The part of the source to repeat, at least 4 seconds; defaults to the whole file. | |
| loudness_lufs | No | Integrated loudness target (−30 to −9 LUFS, default −14). Sending this or true_peak_db normalizes the loudness. | |
| client_request_id | Yes | Stable retry identity for this billable operation. Reuse only for the exact same generation arguments. | |
| target_duration_ms | No | Length of the result in milliseconds (trim or loop). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | ||
| error | No | ||
| usage | No | ||
| status | No | ||
| billing | No | ||
| task_id | No | ||
| terminal | No | ||
| artifacts | No | ||
| resolved_model | No |