Retrieve the status of the uploaded audio file
February 17, 2025 (February 25, 2025)
Table of contents
Use this endpoint to retrieve the status of the uploaded with POST music/upload-audio audio file.
At the time of writing this article, it is not clear how long it takes to process an uploaded audio file. Our internal testing shows that if a file is still being processed after 10 minutes, it is likely that the processing will never complete.
Value of returned field status
should be anything other than pending
before you can use audio_upload_id
in POST music/create-compose.
https://api.useapi.net/v1/riffusion/music/upload-audio/?…
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API token
is required, see Setup useapi.net for details.
Query Parameters
-
user_id
is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required. -
id
is required, useid
value returned by POST music/upload-audio.
Responses
-
{ "status": "complete", "lyrics": "…transcribed lyrics…", "id": "fa789d42-a1cf-482e-9dc9-3a64978370ed:a8b526c8-242b-4bfe-8a94-a5b1c5e396bb", "created_at": "2025-03-01T12:00:00.000000+00:00", "user_id": "2d5b1934-a2e7-49d1-9d1a-fb3b97a7b237", "name": "song_name.mp3", "type": "audio/mp4", "storage_name": "fa789d42-a1cf-482e-9dc9-3a64978370ed", "audible_magic_response": { "statusCode": 2005, "unknownAssetID": "fa789d42-a1cf-482e-9dc9-3a64978370ed", "statusDescription": "Status 2005 (2005) No match found", "unknownMediaFileDuration": 158.3 }, "is_flagged": false, "audio_upload_id": "fa789d42-a1cf-482e-9dc9-3a64978370ed", "transcription_job_id": "a8b526c8-242b-4bfe-8a94-a5b1c5e396bb" }
-
{ "error": "<Error message>", "code": 400 }
-
{ "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." }
Model
{ // TypeScript, all fields are optional
id: string
status: 'complete' | 'pending' | 'failed' | unknown
lyrics: string
audio_upload_id: string
transcription_job_id: string
created_at: string
user_id: string
name: string
type: string
storage_name: string
audible_magic_response: {
matches: {
amItemID: string
metadata: {
ISRC: string
Label: string
Title: string
Artist: string
Vendor: string
AlbumUPC: string
ContentCategory: string
AlbumReleaseDate: string
SongLengthInSeconds: string
}
ruleCode: string
matchType: string
matchTimeInUnknown: number
matchTimeInReference: number
matchDurationInUnknown: number
}[]
statusCode: number
unknownAssetID: string
statusDescription: string
unknownMediaFileDuration: number
}
is_flagged: boolean
}
Examples
-
curl "https://api.useapi.net/v1/riffusion/music/upload-audio/?id=<id>&user_id=<user_id>" \ -H "Accept: application/json" \ -H "Authorization: Bearer …"
-
const token = "API token"; const id = "job_id of uploaded audio file"; const user_id = "Previously configured account"; const apiUrl = `https://api.useapi.net/v1/riffusion/music/upload-audio/?id=${id}&user_id=${user_id}`; 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 = "job_id of uploaded audio file" user_id = "Previously configured account" apiUrl = f"https://api.useapi.net/v1/riffusion/music/upload-audio/?id={id}&user_id={user_id}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json())