This endpoint gets a signed URL for uploading the original raw file to cloud storage.
POST
https://platform.cryo-mix.com/api/signed-url/multi-upload
Header | Type | Required | Description |
---|---|---|---|
X-Api-Key |
string | Yes | Your client API key. |
Session-Id |
string | Yes | A unique file reference. |
Source |
string | Yes | Must be set to Mastering API . |
Parameter | Type | Required | Description |
---|---|---|---|
object_names |
array | Yes | An array of file names to upload. Max: 1 file. |
content_type |
string | Yes | The MIME type of the file (e.g., audio/wav , audio/mpeg ). |
expiration_seconds |
integer | No | The expiration time for the URL in seconds. Default: 600 , Min: 1 , Max: 604800 . |
{
"object_names": ["track1.wav"],
"content_type": "audio/wav",
"expiration_seconds": 900
}
Field | Type | Description |
---|---|---|
upload_folder_name |
string | A unique folder name for the upload session. |
upload_object_names |
object | An object mapping file names to their signed upload URLs. |
{
"data": {
"upload_folder_name": "c1948dc0-f79f-467c-acad-0712949855c8",
"upload_object_names": {
"track1.wav": "https://storage.googleapis.com/cryomix-platform-private-staging/uploads/c1948dc0-f79f-467c-acad-0712949855c8/demo_audio.wav/......"
}
},
"message": "Api success",
"status": "success",
"code": 200
}
{
"message": "invalid required parameters",
"status": "error",
"code": 400
}
Possible Causes:
• A required header (X-Api-Key
, Session-Id
, or Source
) is missing or invalid.
• Required parameters (object_names
, content_type
) are missing.
• The content_type
is invalid.
• Too many files are included (max: 1).
• The expiration_seconds
parameter is invalid (must be between 1
and 604800
).
{
"message": "unauthorized client",
"status": "error",
"code": 401
}
Possible Causes:
• The API key is incorrect.
• The Source
header is incorrect.
• The request is coming from a domain that is not on your list of allowed domains.
const response = await fetch('https://platform.cryo-mix.com/api/signed-url/multi-upload', {
method: 'POST',
headers: {
'X-Api-Key': 'your-api-key-here',
'Session-Id': 'unique-session-id',
'Source': 'Mastering API'
},
body: JSON.stringify({
object_names: ['track1.wav'],
content_type: 'audio/wav',
expiration_seconds: 600
})
});
const result = await response.json();
console.log(result.data.upload_object_names);
curl -X POST https://platform.cryo-mix.com/api/signed-url/multi-upload \
-H "X-Api-Key: your-api-key-here" \
-H "Session-Id: unique-session-id" \
-H "Source: Mastering API" \
-H "Origin: your-domain.com" \
-d '{
"object_names": ["track1.wav"],
"content_type": "audio/wav",
"expiration_seconds": 600
}'
• Remember to store the Session-Id
as a file reference in your database for future use.