# RoEx Tonn API The RoEx Tonn API provides endpoints for creating and retrieving audio mastering tasks. It allows you to submit a track for mastering and then retrieve either a preview or the final mastered track via download URLs. The API supports different musical styles, loudness presets, and sample rates, and it communicates updates via webhooks. Base URL: https://tonn.roexaudio.com Authentication: API key passed as "key" query parameter ## Endpoints POST /mixpreview Creates a multitrack mix task preview. Doesn't consume any credits. - trackData: array (required) — An array containing parameters for each track to be mixed. Maximum of 32 tracks allowed; each track must be no longer than 8 mins. - musicalStyle: string (required) — The musical style for the mix. - returnStems: boolean — Whether to return URLs for the processed stems. - returnUnmixedTrack: boolean — Whether to return an unmixed version of the track. - createMaster: boolean — Whether to also master the final mix. - desiredLoudness: string — Preferred loudness of the final mix. - sampleRate: string — Desired sample rate. Use "44100" for 44.1kHz (16-bit) or "48000" for 48kHz (24-bit). - webhookURL: string (required) — A webhook URL where the API sends updates for the mix task. POST /retrievepreviewmix Retrieves the URL for the preview mix. Retrieving mix FX settings consumes credits. - multitrackTaskId: string (required) — The ID of the multitrack mix task. - retrieveFXSettings: boolean (required) — Flag indicating whether to retrieve FX settings (charges may apply). POST /retrievefinalmix Retrieves the URL for the final mix. - multitrackTaskId: string (required) — The ID of the multitrack mix task. - trackData: array (required) — An array with gain settings for each track. Maximum of 32 tracks allowed; each track must be no longer than 8 mins. - returnStems: boolean (required) — Whether to return URLs for processed stems. - createMaster: boolean — Whether to also master the final mix. - desiredLoudness: string — Preferred loudness of the final mix. Not applicable when creating stems. - sampleRate: string — Desired sample rate. Use "44100" for 44.1kHz (16-bit) or "48000" for 48kHz (24-bit). - webhookURL: string — A webhook URL where the API sends updates for the task. POST /masteringpreview Creates a mastering task preview. - trackData: array (required) — An array containing parameters for the track to be mastered. Only a single item is allowed. - musicalStyle: string (required) — The musical style for mastering. - desiredLoudness: string (required) — Desired loudness preset. Options are: LOW (≈-14 LUFS with -1.0 dBFS), MEDIUM (≈-10 LUFS with -1.0 dBFS), and HIGH (≈-8 LUFS). - sampleRate: string — Desired sample rate and bit depth. Options are 44100 (44.1 kHz, 16-bit) or 48000 (48 kHz, 24-bit). Default is 44100. - webhookURL: string — A webhook URL where updates about the mastering task will be sent. - forcedLoudness: boolean — Whether to force a specific loudness target in LUFS instead of using a preset. - forcedLoudnessInLUFS: integer — Forced loudness level in LUFS. Only used when forcedLoudness is true. POST /retrievepreviewmaster Retrieves the preview mastered track URL. - masteringTaskId: string (required) — The mastering task ID provided from the /masteringpreview endpoint. POST /retrievefinalmaster Retrieves the final mastered track URL. - masteringTaskId: string (required) — The mastering task ID provided from the /masteringpreview endpoint. POST /mixanalysis Analyses a mixed or mastered track for any problems. - audioFileLocation: string (required) — The URL location of the audio file to diagnose. - musicalStyle: string (required) — The musical style of the track. - isMaster: boolean (required) — Indicates whether the track is a mastered track. POST /mixenhancepreview Generate a preview of an enhanced track with optional stem processing - audioFileLocation: string (required) — The URL location of the audio file. - musicalStyle: string (required) — The musical style for processing the track. - isMaster: boolean (required) — Indicates if the provided audio is already mastered. - fixClippingIssues: boolean (required) — Whether to automatically fix clipping issues. - fixStereoWidthIssues: boolean (required) — Whether to adjust stereo width problems. - fixTonalProfileIssues: boolean (required) — Whether to adjust tonal balance issues. - fixLoudnessIssues: boolean (required) — Whether to correct loudness discrepancies. - applyMastering: boolean (required) — Whether to apply mastering after enhancements. - webhookURL: string — Optional URL to receive webhook notifications. - loudnessPreference: string — Loudness target for mastering. - stemProcessing: boolean (required) — Whether to perform stem-based enhancement. - getProcessedStems: boolean — Whether to retrieve processed stems. POST /mixenhance Generate a full length enhanced track with optional stem processing - audioFileLocation: string (required) — The URL location of the audio file. - musicalStyle: string (required) — The musical style for processing the track. - isMaster: boolean (required) — Indicates if the provided audio is already mastered. - fixClippingIssues: boolean (required) — Whether to automatically fix clipping issues. - fixStereoWidthIssues: boolean (required) — Whether to adjust stereo width problems. - fixTonalProfileIssues: boolean (required) — Whether to adjust tonal balance issues. - fixLoudnessIssues: boolean (required) — Whether to correct loudness discrepancies. - applyMastering: boolean (required) — Whether to apply mastering after enhancements. - webhookURL: string — Optional URL to receive webhook notifications. - loudnessPreference: string — Loudness target for mastering. - stemProcessing: boolean (required) — Whether to perform stem-based enhancement. - getProcessedStems: boolean — Whether to retrieve processed stems. POST /retrieveenhancedtrack Retrieves the download URL for the final enhanced track. - mixReviveTaskId: string (required) — The unique task ID for retrieving the revived track. POST /audio-cleanup Cleans up an audio signal for a specified instrument track. - audioFileLocation: string (required) — The URL of the audio file to clean up. - soundSource: string (required) — The instrument sound source to clean up. GET /health Health check for the API. POST /upload Get URLs for uploading and accessing an audio file ## Full OpenAPI Specification https://tonn-portal.roexaudio.com/openapi.json ## Documentation https://tonn-portal.roexaudio.com/docs/ ## Python Client pip install roex-python https://pypi.org/project/roex-python/