Download a song

November 14, 2026 (December 1, 2026)

Table of contents

  1. Request Headers
  2. Query Parameters
  3. Responses
  4. Model
  5. Examples
  6. Try It

Get a finished song as MP3, WAV, MIDI or MusicXML.

format picks the file. Some formats need a paid ACE Music plan.

format wav, midi or musicxml needs Creator or a higher plan.

mp3 is the default. You get JSON with the song’s public mp3 link, the same as its audioUrl. For a file you uploaded with POST /files, the link is your own audio in the format you uploaded. That link is signed and works for 24 hours.

The same answer has playUrl, a direct link to the same MP3 for players. It works until playUrlExpires, about 1 hour. Some browsers, such as Brave, block the redirect behind audioUrl. So store audioUrl and play playUrl.

With wav you get JSON with a signed link to lossless audio. It works for 24 hours. ACE Music may serve it as FLAC, and then the link and fileName end in .flac. WAV is not offered for ace-step-1.5-xl songs, because ACE Music makes those as MP3 only.

With midi you get the .mid file itself. With musicxml you get the MusicXML score itself.

ACE Music makes WAV, MIDI and MusicXML on the first request for a song. We wait up to a minute for it. After that you get 202, so call again a minute later. For the score in ABC notation, use GET /music/score.

https://api.useapi.net/v1/acemusic/music/download?songId=songId&format=format

Request Headers
Authorization: Bearer {API token}
Query Parameters
  • songId is required. A finished song’s songId, URL-encoded.
  • format is optional. mp3 works on every plan and answers JSON with the public link and playUrl. wav, midi and musicxml need a Creator or Artist plan. wav is lossless audio, for songs not made by ACE-Step v1.5 XL. It answers JSON with a link that works for 24 hours. ACE Music may serve it as FLAC, and then the link and fileName end in .flac. midi and musicxml answer the file itself. ACE Music sometimes serves a MIDI file as a link, and then you get JSON with a signed link.
    Supported values: mp3 (default), wav, midi, musicxml.
Responses
  • 200 OK

    A link to the file

    For mp3 and wav the answer is JSON with the link to the file and its file name. A signed link also says when it expires. A MIDI file comes back the same way when ACE Music serves it by a signed link.

    The file

    For midi and musicxml you get the file itself, not JSON. It comes as an attachment (Content-Disposition). The file name is the song’s title, or its ACE Music id, with .mid or .musicxml. The Content-Type is the one ACE Music sends. When it sends none, we use audio/midi or application/vnd.recordare.musicxml+xml.

    mp3: the file’s link as JSON

    {
      "songId": "user:[email protected]:so_3f9c2a7d81e64b05a9d2c4e7",
      "format": "mp3",
      "url": "https://acemusic.ai/data/so_3f9c2a7d81e64b05a9d2c4e7.mp3",
      "playUrl": "https://….r2.cloudflarestorage.com/acemusic-data-prod/users/…/audio/202611/….mp3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20261114T204512Z&X-Amz-Expires=3599&…",
      "playUrlExpires": "2026-11-14T21:45:11.000Z",
      "fileName": "Farmers Market Sunshine.mp3"
    }
    

    wav: a signed link with expires

    {
      "songId": "user:[email protected]:so_4e7b2c9d0a5f4183b6d8e2c7",
      "format": "wav",
      "url": "https://….r2.cloudflarestorage.com/acemusic-data-prod/users/…/audio/202611/….wav?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=86400&…",
      "fileName": "Orchestral Morning.wav",
      "expires": "2026-11-15T20:07:29.242Z"
    }
    

    mp3 of an uploaded file: a signed link with expires

    {
      "songId": "user:[email protected]:so_000000000000000000000002",
      "format": "mp3",
      "url": "https://9d3f6b2e8a1c4f7e0b5a2d9c6e3f1a8b.r2.cloudflarestorage.com/acemusic-data-prod/users/0000000001/audio/202611/00000000000000000000000000000004.mp3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=7c4e1a9f3b2d48e6a0f5c8d1e3b7a9f2%2F20261115%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261115T201357Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=4b9e2d7a1c6f3e8b0a5d9c2f7e1b4a6d8c3f0e9b2a7d5c1e6f4b8a3d0c9e7f2b",
      "fileName": "full-test-upload.mp3",
      "expires": "2026-11-16T20:13:58.359Z"
    }
    
  • 202 Accepted

    ACE Music is still making the file. Call again in a minute.

    {
      "songId": "user:[email protected]:so_4e7b2c9d0a5f4183b6d8e2c7",
      "format": "midi",
      "status": "processing",
      "message": "ACE Music is still making the midi: call again in a minute"
    }
    
  • 400 Bad Request

    ACE Music refused the request. The text gives its reason.

    The request itself is wrong. Fix what the text names, then send it again.

    The body could not be read. It is not valid JSON, or a multipart upload was sent without its boundary.

    {
      "error": "ace-step-1.5-xl songs are made lossy: no WAV (use mp3)",
      "code": 400
    }
    
    {
      "error": "Invalid JSON: Unexpected token 'o', \"not json\" is not valid JSON",
      "code": 400
    }
    
    The error text of each parameter check
    • Parameter songId is required
    • Parameter songId is not a valid songId (user:<id>-<email>-song:so_…)
    • Parameter format (x) valid values: mp3,wav,midi,musicxml
  • 401 Unauthorized

    The useapi.net API token is missing or wrong.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 402 Payment Required

    The useapi.net subscription is not active.

    {
      "error": "useapi.net ⁝ Your account has no subscription, please subscribe to our services before submitting requests",
      "code": 402
    }
    
  • 403 Forbidden

    The song belongs to another useapi.net user.

    This needs a paid ACE Music plan (Creator or Artist). The account is on Free. The end of the error text is ACE Music’s own message.

    {
      "error": "Song user:[email protected]:so_8b1d5e0a47c92f63d1a8b5c0 is not yours",
      "code": 403
    }
    
    {
      "error": "Downloading the wav needs a paid ACE Music plan (the account is on free): Downloads come with a paid plan",
      "code": 403
    }
    
  • 404 Not Found

    The account is not connected (never added, or removed).

    The song was deleted at ACE Music.

    ACE Music no longer lists the song. It was deleted.

    The upload has no audio file at ACE Music, so there is nothing to download.

    {
      "error": "Account [email protected] is not configured",
      "code": 404
    }
    
    {
      "error": "Song user:[email protected]:so_3f9c2a7d81e64b05a9d2c4e7 not found (deleted on acemusic.ai?)",
      "code": 404
    }
    
    {
      "error": "Upload user:[email protected]:so_3f9c2a7d81e64b05a9d2c4e7 has no audio file at ACE Music",
      "code": 404
    }
    
  • 409 Conflict

    The song is not finished, or it failed, so there is nothing to download.

    {
      "error": "Song user:[email protected]:so_3f9c2a7d81e64b05a9d2c4e7 is running: nothing to download yet",
      "code": 409
    }
    
  • 412 Precondition Failed

    The account that holds the song has too few ACE Music credits for this request. cost is the number of credits the request needs. It is missing when ACE Music does not say. Add credits to the account.

    {
      "error": "Downloading the midi: Not enough credits",
      "code": 412
    }
    
  • 429 Too Many Requests

    ACE Music is limiting requests right now. The text gives its reason.

    Wait the seconds in the Retry-After header, or 30 seconds if there isn’t one, then send the request again.

    {
      "error": "Downloading the wav: HTTP 429",
      "code": 429
    }
    
  • 500 Internal Server Error

    Something failed on our side.

    {
      "error": "Something went wrong on our side, please retry",
      "code": 500
    }
    
    {
      "error": "Reading the songs: ACE Music refused the call (HTTP 403). This is unexpected, please report it to support",
      "code": 500
    }
    
  • 503 Service Unavailable

    ACE Music couldn’t take the request right now, or the account’s session is being renewed. This happens before any step that charges, so nothing was charged.

    Wait the seconds in the Retry-After header, or 10 seconds if there isn’t one, then send the request again.

    {
      "error": "ACE Music sign-in for [email protected] failed moments ago, please retry shortly",
      "code": 503
    }
    
    {
      "error": "ACE Music sign-in for [email protected] failed (ACE Music did not answer within 30 s), please retry shortly",
      "code": 503
    }
    
    {
      "error": "ACE Music session renewal for [email protected] failed (HTTP 503), please retry shortly",
      "code": 503
    }
    
    {
      "error": "ACE Music session renewal for [email protected] is in progress, please retry shortly",
      "code": 503
    }
    
    {
      "error": "ACE Music sign-in for [email protected] is in progress, please retry shortly",
      "code": 503
    }
    
    {
      "error": "ACE Music refused the session for [email protected] right after a fresh sign-in, please retry shortly",
      "code": 503
    }
    
    {
      "error": "Reading the songs: ACE Music answered a song without its id, please retry shortly",
      "code": 503
    }
    
  • 596 Account Error

    ACE Music refused the account’s stored email and password. Add the account again with the current password (POST /accounts).

    {
      "error": "Account [email protected]: ACE Music refused the stored email and password. Update the password with POST /accounts to resume using this account",
      "code": 596
    }
    
Model

A link to the song in the format you asked for, or a 202 answer while ACE Music is still making the file.

The download link
{ // TypeScript, fields marked ? may be absent
  songId: string  // the song you asked for
  format: "mp3" | "wav" | "midi" | "musicxml"  // the format you asked for
  url?: string  // the link to the file. For a made song's mp3 it is the public link, the same as audioUrl. For a file uploaded with POST /files it is that file, in its own format. An upload, a wav, or a midi that ACE Music sends as a link gets a signed link that expires. Not in a 202 answer
  playUrl?: string | null  // mp3 of a made song: the same mp3 as a direct link for players, valid until playUrlExpires (about an hour). null when the link could not be read
  playUrlExpires?: string | null  // ISO 8601, when playUrl stops working
  fileName?: string  // the song's title with the file's extension. Not in a 202 answer
  expires?: string  // ISO 8601, when a signed link stops working (24 hours)
  status?: "processing"  // only on 202: ACE Music is still making the file
  message?: string  // only on 202: the file still being made. Call again in a minute
}
Examples
  • curl "https://api.useapi.net/v1/acemusic/music/download?songId=user:[email protected]:so_3f9c2a7d81e64b05a9d2c4e7" \
         -H "Authorization: Bearer YOUR_API_TOKEN"
    
  • const response = await fetch('https://api.useapi.net/v1/acemusic/music/download?songId=user:[email protected]:so_3f9c2a7d81e64b05a9d2c4e7', {
      headers: {
        'Authorization': 'Bearer YOUR_API_TOKEN'
      }
    })
    console.log(response.status, await response.json())
    
  • import requests
    
    response = requests.get(
        'https://api.useapi.net/v1/acemusic/music/download',
        params={
            'songId': 'user:[email protected]:so_3f9c2a7d81e64b05a9d2c4e7'
        },
        headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
    )
    print(response.status_code, response.json())
    
Try It