Skip to main content

Audio Retrival

Retrieve audio assets and generation status by queryid

POST
https://api.genrex.com/v1/text2music/retrieve

Request body

{
"queryId":"QRY_WRXzIXyidD8x9xIEZZ4GppXh"
}

queryId string Required

  • This queryId is obtained from the initial generation request and is used to track the status and retrieve the generated audio content.

Headers

{
"gx-key": "4nBmZkU2-VdTNrPqL7e9y", // Suppose your-api-secret = 7Xd9PfMlkanB5ZTuj0qQG
"gx-signature": "t=1717576160738,v=8142c06454544f0cfd77f015661d165087fabf6d2b8675c2046ca694166c3c89",
"Content-Type": "application/json"
}

gx-key string Required

  • your-api-key

gx-signature string Required

  • To generate the gx-signature, follow these steps:

    1. Convert the payload object to a JSON string.
    2. Concatenate the current timestamp and the JSON string with a dot (.) to form the string to be signed e.g. ${timestamp}.${payload}
    3. Use the sha256-HMAC algorithm and your-api-secret to sign the string, generating a hexadecimal string signature.
    4. The gx-signature field value should be formatted as t=timestamp,v=signature.

Content-Type string Required

  • Must be set to application/json.

Responses

  • response.data
{
"id": "QRY_WRXzIXyidD8x9xIEZZ4GppXh",
"processSystem": "GenrexV1",
"source": "API",
"status": "Completed",
"contentType": "Text",
"content": {
"text": "music",
"duration": 30
},
"metadata": null,
"userId": "a6f434b6-a475-40b1-81e3-3ce9868945ff",
"createdAt": "2024-06-02T11:04:19.986Z",
"updatedAt": "2024-06-02T11:05:21.826Z",
"response": [
{
"id": "RSP_Q4YGrD4wq0F8U40AbioCuiNN",
"metadata": [
{
"volume_visualize": [
67, 76, 77, 73, 84, 87, 83, 76, 72, 94, 89, 85,
109, 92, 77, 69, 91, 85, 81, 79, 98, 88, 88, 93,
107, 99, 97, 88, 95, 82, 68, 95, 104, 111, 86, 95,
97, 88, 85, 95, 97, 110, 101, 98, 93, 105, 125, 107,
96, 104, 106, 103, 103, 108, 127, 122, 89, 102, 101, 101,
103, 101, 122, 117, 96, 96, 100, 105, 94, 105, 103, 111,
97, 96, 91, 100, 86, 100, 101, 86, 104, 109, 112, 111,
93, 70, 91, 108, 110, 104, 99, 101, 104, 93, 86, 93,
94, 103, 98, 96,
// ... 900 more items
]
}
],
"contentType": "Audio",
"content": [
{
"url": "https://octaimusic.s3.amazonaws.com/text2music-test/1717326321.3117287_32k.wav"
}
],
"queryId": "QRY_WRXzIXyidD8x9xIEZZ4GppXh",
"createdAt": "2024-06-02T11:05:21.826Z",
"updatedAt": "2024-06-02T11:05:21.826Z"
}
]
}

id string

  • underlying queryId

processSystem string

source string

status string

  • The status of the generation, which can be either Processing, Failed, or Completed. Only when the status is Completed will the object return the audio assets.

content object

metadata array or null

userId string

createdAt string

updatedAt string

response array

  • The main array for audio assets retrieval.

id string

  • The responseId

metadata array

volume_visualize array

  • The normalized volume by timestep. The scale is from 0 to 127. There are 1000 discrete segments to represent the continuous audio object.

contentType string

content array

url string

  • The URL of the generated audio file.

queryId string

createdAt string

updatedAt string