AI Music API
Home
Home
  1. sonic
  • Introduction
  • Credits Usage Guide
  • AI Music API FAQ & Troubleshooting
  • Special Scenarios
  • Error handling
  • Webhook Integration Guide
  • sonic
    • Sonic Instructions
    • create / extend / cover music
      POST
    • upload and extend music
      POST
    • upload and cover music
      POST
    • create persona
      POST
    • sample
      POST
    • mashup
      POST
    • get BPM
      POST
    • get VOX
      POST
    • get wav
      POST
    • get midi
      POST
    • get lyrics timeline
      POST
    • upsample tags
      POST
    • concat music
      POST
    • stems basic
      POST
    • stems full
      POST
    • remaster
      POST
    • replace section
      POST
    • add vocal
      POST
    • add instrumental
      POST
    • upload music
      POST
    • get music
      GET
  • riffusion(Deprecated)
    • Riffusion instructions
    • create music (with lyrics)
    • create music (with description)
    • cover music
    • extend music
    • replace music section
    • swap music sound
    • swap music vocals
    • upload
    • get music
  • producer
    • Producer Instructions
    • Complete Request Example
    • create music
    • upload
    • download
    • get music
  • nuro
    • Nuro Instruction
    • Error handling
    • create vocal music
    • create instrument music
    • get music
  • lyrics generation
    • Make Lyrics
  • get-credits
    GET
  • Schemas
    • 记录不存在
    • 参数不正确
Home
Home
  1. sonic

upload music

POST
https://api.aimusicapi.ai/api/v1/sonic/upload
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.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/json

Example
{
    "url": "https://audio.jukehost.co.uk/Ij5SXdAJKLg4tggS8T1xIH1Z0DuOWq5e.mp3"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.aimusicapi.ai/api/v1/sonic/upload' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://audio.jukehost.co.uk/Ij5SXdAJKLg4tggS8T1xIH1Z0DuOWq5e.mp3"
}'

Responses

🟢200OK
application/json
Upload successful. Returns clip_id in sync mode, or task_id in async mode.
Body

Examples
{
    "code": 200,
    "clip_id": "cfbc3d3c-2add-4265-bcdf-924092096e3d",
    "message": "success"
}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🔴500Internal Server Error
Modified at 2026-02-23 07:24:02
Previous
add instrumental
Next
get music
Built with