Setup Riffusion

February 17, 2025

Table of contents

  1. Create Riffusion account
  2. Locate Riffusion account cookie
  3. Configure Riffusion API account

Approximately 3 minutes to complete setup steps.


Riffusion is a San Francisco-based artificial intelligence startup that enables anyone to create original music using AI. The company’s groundbreaking AI, called Fuzz, generates music through spectrogram images of sound rather than simple audio samples.

Create Riffusion account

We strongly recommend creating a separate Riffusion account specifically for API interaction. Visit https://riffusion.com and use either your Gmail, Discord, or phone number to create an account.

Our initial testing shows that Gmail and phone options are the most stable, we recommend creating API Riffusion accounts using either Gmail or phone.

Open Chromium-compatible browser (e.g. Google Chrome, Microsoft Edge or Opera) and navigate to https://riffusion.com 1.

Log out of your account, then log in again. This is an IMPORTANT step. You MUST complete the logout and login process to retrieve a fresh cookie.

Once the page is fully loaded, ensure that you’re logged in with correct Gmail, Discord or phone account.

Open Developer Tools by right-clicking on the page and selecting “Inspect Element”.

Select Developer Tools » Application 2:

  • Locate Storage » Cookies and select https://www.riffusion.com 3.
  • Find cookie(s) named sb-api-auth-token (for phone account) or sb-api-auth-token.0 and sb-api-auth-token.1 (for Gmail and Discord accounts) 4.
  • Copy the value of sb-api-auth-token or if you have two cookies sb-api-auth-token.0 and sb-api-auth-token.1 concatenate their values 5.
    Note that the value of sb-api-auth-token or sb-api-auth-token.0 should start with base64-….

After the cookie is retrieved, DO NOT LOGOUT from the account. Simply close the browser tab if you no longer need it. Logging out will terminate your session and prevent the API from using your cookie.

Optional script to extract cookie value

If you have basic development knowledge, you can execute the following code snippet from the Developer Tools » Console command line to retrieve the cookie value:

document.cookie.split(';')
    .map(s => s.trim().split('='))
    .filter(([name]) => /^sb-api-auth-token(?:\.\d+)?$/.test(name))
    .map(([, value]) => value)
    .join('')

Use the handy script below to clear all session cookies. This will make your browser forget the current session—think of it as a soft logout.

document.cookie.split(';').forEach(cookie => {
  const name = cookie.split('=')[0].trim();
  document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`;
});

Configure Riffusion API account

Proceed to POST /accounts and configure the Riffusion API account using the cookie obtained above.