audio-convert
Re-encodes an uploaded audio file into the chosen format, bitrate and sample rate with the converter the site's /convert runs on our server. Formats with fixed requirements override the request: Opus is always 48 kHz; AMR and RealAudio are 8 kHz mono; AC-3, E-AC-3 and DTS take 32, 44.1 or 48 kHz (otherwise 48); CD audio is 44.1 kHz stereo; AMR takes 4.75–12.2 kbit/s and DTS 768–1536 kbit/s, falling back to their default for any other value; lossless and PCM formats ignore the bitrate. raw, pcm and s16le are headerless 16-bit PCM, f32le headerless 32-bit float. Stage the input with POST /v1/uploads first. ASYNCHRONOUS: the call returns 202 with a run id — poll GET /v1/runs/{id}, or register a webhook.
v1 beta server · 10 tokens
Price (server): 2 tokens per MB of input, at least 10 per call; paid plans: −5%, rounded up. The exact figure for your file: POST /v1/tools/audio-convert/estimate.
Call it
POST https://tembrica.com/v1/tools/audio-convert/runs
Authorization: Bearer $TIMBRICA_KEY
Idempotency-Key: <your retry-safe key>
Content-Type: application/json
Input
| Field | Type | Required | Notes |
|---|---|---|---|
audio | object | yes | Staged audio file, up to 30 MB. The converter recognises the input by the file name's extension: mp3, wav, ogg, oga, flac, aac, m4a, m4r, alac, wma, webm, mka, aiff, opus, ape, wv, tta, tak, shn, amr, awb, gsm, spx, ac3, eac3, dts, mp2, ra, au, snd, voc, caf. Upload it with POST /v1/uploads (multipart `file`, or JSON {"url":"…"}). |
format | string | no |
Output format.
one of: mp3, aac, ogg, m4a, wma, opus, mp2, ac3, eac3, oga, flac, wav, aiff, alac, tta, wv, amr, m4r, dts, caf, au, snd, voc, ra, webm, mka, cdda, raw, pcm, f32le, s16le default: mp3 |
bitrate | string | no |
Bitrate in kbit/s, as digits with an optional "k": "192", "320k", "12.2k" for AMR.
default: 128 |
sample_rate | integer | no |
Output sample rate, Hz (formats with a fixed rate keep theirs).
one of: 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000 default: 44100 |
Input file
Stage it with POST /v1/uploads (multipart `file`, or JSON {"url": "…"}), then pass {"file_id": "<id>"} in each listed input field.
file fields: audio
Errors it can return
validation_failed
input_too_large
insufficient_tokens
concurrency_limited
internal_error
upstream_unavailable
History
- v1 — 2026-11-19 — Initial release (server lane, async, per-MB pricing).
This contract cannot change without a new version and a line above: a test compares the published schema, pricing and limits against a committed lockfile and fails the build otherwise. Subscribe to /v1/changelog to be told when something moves.