Skip to main content
GET
/
v1
/
byId
Get Conversion by ID
curl --request GET \
  --url https://api.musicgpt.com/api/public/v1/byId \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.musicgpt.com/api/public/v1/byId"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.musicgpt.com/api/public/v1/byId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.musicgpt.com/api/public/v1/byId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.musicgpt.com/api/public/v1/byId"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.musicgpt.com/api/public/v1/byId")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.musicgpt.com/api/public/v1/byId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "conversion": {
    "task_id": "12345678-abcd-1234-efgh-567890abcdef",
    "conversion_id": "87654321-dcba-4321-hgfe-098765fedcba",
    "status": "COMPLETED",
    "status_msg": "Conversion successful",
    "audio_url": "https://musicgpt.s3.amazonaws.com/audiofile.mp3",
    "conversion_cost": 1.25,
    "title": "Generated Song",
    "lyrics": "[Verse 1]...",
    "music_style": "Pop",
    "createdAt": "2025-01-01T12:00:00Z",
    "updatedAt": "2025-01-01T12:05:00Z"
  }
}
{
"success": false,
"message": "Invalid request parameters"
}

Authorizations

Authorization
string
header
required

Query Parameters

conversionType
enum<string>
required

The type of Conversion you want to get your details from.

Available options:
MUSIC_AI,
TEXT_TO_SPEECH,
VOICE_CONVERSION,
EXTRACTION,
COVER,
STEMS_SEPARATION,
VOCAL_EXTRACTION,
DENOISING,
DEECHO,
DEREVERB,
SOUND_GENERATOR,
AUDIO_TRANSCRIPTION,
AUDIO_SPEED_CHANGER,
AUDIO_MASTERING,
AUDIO_CUTTER,
REMIX,
FILE_CONVERT,
KEY_BPM_EXTRACTION,
AUDIO_TO_MIDI,
EXTEND,
INPAINT,
SING_OVER_INSTRUMENTAL,
LYRICS_GENERATOR
task_id
string

Task ID associated with the conversion. Note: You must provide either task_id or conversion_id, but not both.

conversion_id
string

Conversion ID to fetch details. Note: You must provide either task_id or conversion_id, but not both.

Response

Successful response

success
boolean
conversion
object