Skip to main content

Endpoint

POST /api/v1/music/upload
Synchronous. Returns clip metadata immediately after upload completes. Upload an external audio file (MP3, WAV, etc.) by providing its URL. The returned clipId can be used in Add Instrumental or Sample operations.

Request body

FieldTypeRequiredDescription
audio_urlstringYesPublicly accessible URL of the audio file to upload.

Response

{
  "code": 0,
  "message": "ok",
  "request_id": "req-1710000000000",
  "data": {
    "clipId": "abc123def456",
    "audioUrl": "https://cdn.example.com/audio/abc123def456.mp3",
    "duration": 30,
    "status": 1
  }
}
FieldTypeDescription
clipIdstringClip ID to use in subsequent operations.
audioUrlstringProcessed audio URL.
durationintegerAudio duration in seconds.
statusintegerUpload status code. 1 = ready.

Example

curl -X POST https://api.example.com/api/v1/music/upload \
  -H "Authorization: Bearer sk-mm-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "audio_url": "https://example.com/vocals.mp3"
  }'