Remix
This endpoint processes an input audio file or audio path along with a textual prompt to generate a remix. The remix type is specified using the mode
parameter. The task is queued and responds with task ID, ETA, credit estimate, and status message.
Create a remix using an input audio file and a prompt.
π΅ Endpoint
This endpoint processes an input audio file along with a textual prompt to generate a remix. You can specify a webhook_url
to receive a callback when processing completes.
π’ Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
audio_file | UploadFile | Optional | Upload the audio file directly. Required if audio_path is not provided. |
audio_path | String | Optional | A URL to an audio file (S3 or YouTube). Required if audio_file is not provided. |
prompt | String | Required | The text prompt guiding the remix generation. Example: βGenerate a soothing ambient soundscape.β |
lyrics | String | Optional | If provided, lyrics will be used to generate the remix. |
mode | String | Required | Remix mode. Must be one of REMIX , INPAINT , OVER_INSTRUMENTAL . |
webhook_url | String | Optional | Callback URL for async response. Defaults to empty string if not provided. |
π‘ Note: You must provide either
audio_file
oraudio_path
β at least one is required.
βΆοΈ Sample Output
Listen to a real sample output:
Prompt: a song about greenery, nature and forest.
Download Audioπ§ͺ Try it Yourself
Visit the MusicAI Endpoint Explorer to play around β set your payload, hit send, and listen to the generated results live.
π€ Sample Request
π cURL
π Python
π Replace
{path_to_your_audio_file}
,api_key
, andwebhook_url
before executing.
π₯ Sample Response
β Success (200 OK)
β Common Errors
- 422 Unprocessable Entity: Missing required fields like
prompt
, or neitheraudio_file
noraudio_path
provided. - 500 Internal Server Error: An unexpected error occurred during processing.
π Webhook Response
When the remix process completes, the webhook receives:
π§ Note: You will receive two separate webhook responses, each with a unique
conversion_id
for the two generated versions.
The response provides a downloadable or streamable remix audio file.
Authorizations
Body
Response
Successfully initiated remix task
The response is of type object
.