Upload a new audio file to your Musique library.
Supported formats: MP3, WAV, OGG, AAC
Max file size: 10MB per file
Recommended: MP3 at 128kbps or higher for best quality
Request
Your API authentication token
Must be multipart/form-data
Body Parameters
Audio file to upload (MP3, WAV, OGG, AAC)
Display name for the audio file
Optional description or notes about the audio
Category for organization (e.g., “announcement”, “promotion”, “emergency”)
Response
Unique identifier for the uploaded audio
Display name of the audio file
CDN URL for the audio file
Audio duration in seconds
Audio format (mp3, wav, ogg, aac)
ISO 8601 timestamp of upload
curl -X POST https://api.musique.app/api/audio \
-H "X-API-Key: msk_live_1234567890abcdef" \
-F "file=@/path/to/audio.mp3" \
-F "name=Store Announcement" \
-F "description=New product launch announcement" \
-F "category=announcement"
{
"audioId": "aud_9x8y7z6w5v4u3t",
"name": "Store Announcement",
"url": "https://cdn.musique.app/audio/aud_9x8y7z6w5v4u3t.mp3",
"duration": 45.2,
"size": 1024000,
"format": "mp3",
"createdAt": "2024-01-15T10:30:00Z"
}