Download the mp3, wav or stems of your song

March 19, 2025

Table of contents

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

https://api.useapi.net/v1/riffusion/music/download/?…

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Query Parameters
Responses
  • 200 OK

    This will return either the mp3/wav file content or the stems in JSON format.

  • 400 Bad Request

    {
        "error": "<Error message>",
        "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
  • 596 Pending error

    API was unable to refresh your cookie. Please resolve this issue by using the POST accounts endpoint before making any new API calls.

    {
      "error": "Your Riffusion account has pending error. Please address this issue at https://useapi.net/docs/api-riffusion-v1/post-riffusion-accounts before making any new API calls."
    }
    
Examples
  • curl "https://api.useapi.net/v1/riffusion/music/download/?id=<id>&user_id=<user_id>&download_format=stems" \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const id = "id of your song"; 
    const user_id = "Previously configured account"; 
    const apiUrl = `https://api.useapi.net/v1/riffusion/music/download/?id=${id}&user_id=${user_id}&download_format=stems`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    id = "id of your song"
    user_id = "Previously configured account"
    apiUrl = f"https://api.useapi.net/v1/riffusion/music/download/?id={id}&user_id={user_id}&download_format=stems"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It