sonic

upload music

Upload local songs and get the clip id for subsequent operations.

Sync mode (default): Returns clip_id directly in the response.

Async mode: When callback_url is provided, returns a task_id immediately and sends the result to your callback URL when the upload completes.

post/api/v1/sonic/upload

Request

  • Base URL
    https://api.musicapi.ai
  • URL
    https://api.musicapi.ai/api/v1/sonic/upload
  • Auth
    HTTP bearer

Request body

urlstring required

The online music url you want to upload. It must be copyright-free music and be publicly accessible.

callback_urlstring

Optional. An HTTPS URL to receive the upload result asynchronously. When provided, the API returns a task_id immediately instead of waiting for the upload to complete. The callback will receive a POST request with the upload result (including clip_id) once processing is done.

callback_secretstring

Optional. A secret string used to sign the callback payload for verification. Only used when callback_url is provided.

Response

Upload successful. Returns clip_id in sync mode, or task_id in async mode.

OR

Example response

{
  "code": 200
}

Changes

No recorded changes to this operation across all 1 revision of this API.