singleFile
Generates a single audio file with specified duration and parameters
Authorizations
MuzaicAPI-Secret-KeystringRequired
Body
durationinteger · min: 1 · max: 300OptionalExample:
Duration in seconds
30tagsinteger[]OptionalExample:
Array of tag IDs
[1,2,3]normalizebooleanOptionalExample:
Whether to normalize audio
trueResponses
200
Single file generated successfully
application/json
apiVersionstringOptionalExample:
1.0.0mp3stringOptionalExample:
Base64 encoded MP3 audio data
data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA/+M4wAAAAAAAAAAAAEluZm8AAAAPAAAAAwAAAb...audioDurationnumber · floatOptionalExample:
Audio duration in seconds
30hashstringOptionalExample:
Generated audio hash
abc123def456statusstringOptionalExample:
Generation status
completedtokensUsedintegerOptionalExample:
Number of tokens consumed
30executionTimenumber · floatOptionalExample:
Execution time in seconds
2.5400
Invalid input data
401
Unauthorized
429
Rate limit exceeded
post/singleFile
POST /singleFile HTTP/1.1
Host: m10.muzaic.ai
MuzaicAPI-Secret-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 115
{
"duration": 30,
"tags": [
1,
2,
3
],
"params": {
"intensity": 7,
"tempo": 8,
"tone": 5,
"variance": 5,
"rhythm": 5
},
"normalize": true
}{
"apiVersion": "1.0.0",
"mp3": "data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA/+M4wAAAAAAAAAAAAEluZm8AAAAPAAAAAwAAAb...",
"audioDuration": 30,
"hash": "abc123def456",
"status": "completed",
"tokensUsed": 30,
"executionTime": 2.5
}Last updated
Was this helpful?