AI Music API
HomeGet API key
HomeGet API key
  1. sonic
  • Introduction
  • Credits Usage Guide
  • AI Music API FAQ & Troubleshooting
  • Special Scenarios
  • Error handling
  • Webhook Integration Guide
  • sonic
    • Sonic Instructions
    • download (mp3 / m4a / wav)
      POST
    • 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
    • create voice
      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 task / poll result
  • nuro
    • Nuro Instruction
    • Error handling
    • create vocal music
    • create instrument music
    • get music
  • lyrics generation
    • Make Lyrics
  • get-credits
    GET
  1. sonic

download (mp3 / m4a / wav)

POST
https://api.aimusicapi.ai/api/v1/sonic/download
Download a finished track as mp3, m4a, and/or wav.
This replaces POST /api/v1/sonic/wav, which remains available but is no longer the recommended way to fetch a WAV. A WAV requested here resolves to the same stored file, so if you have already downloaded one through /wav it is returned immediately.

Credits#

2 credits per call, regardless of how many formats you request. Asking for all three costs the same as asking for one, so request everything you need in a single call rather than one call per format.
You are charged only when every requested format is returned. A 202 response costs nothing.

Request#

FieldTypeRequiredNotes
clip_idstringyesThe clip to download. music_id is accepted as an alias.
formatsstring[]noAny of mp3, m4a, wav. Defaults to ["mp3"].
An unrecognised value in formats returns 400 — the request is rejected rather than partially fulfilled.

Responses#

200 — every requested format is ready. data.files contains one entry per format.
202 — the files are being prepared. Retry the same request in a few seconds. No credits are charged for a 202, so retrying is free.
404 — the clip could not be downloaded. Source audio is retained for a limited period after generation, so an older clip may no longer be downloadable; regenerate the track or use a more recent clip_id.
402 — insufficient credits.
429 — concurrency limit reached, or upstream is rate limiting. Retry shortly.

Notes#

Files are served from our own CDN. The URLs are stable and safe to store.
Requesting a format you have already downloaded returns instantly and does not re-prepare the file.

Request

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

Example
{
    "clip_id": "8ce9770b-ec3b-4029-a3e3-4b8db20da7d1",
    "formats": ["mp3", "wav"]
}

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 'https://api.aimusicapi.ai/api/v1/sonic/download' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "clip_id": "8ce9770b-ec3b-4029-a3e3-4b8db20da7d1",
    "formats": ["mp3", "wav"]
}'

Responses

🟢200success
application/json
Every requested format is ready.
Bodyapplication/json

Example
{
    "message": "string",
    "data": {
        "clip_id": "string",
        "files": [
            {
                "format": "string",
                "file_url": "string"
            }
        ]
    }
}
🟢202processing
Modified at 2026-09-02 10:10:41
Previous
Sonic Instructions
Next
create / extend / cover music
Built with