Skip to main content
POST
/
api
/
audio
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"
}
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

Headers

X-API-Key
string
required
Your API authentication token
Content-Type
string
required
Must be multipart/form-data

Body Parameters

file
file
required
Audio file to upload (MP3, WAV, OGG, AAC)
name
string
required
Display name for the audio file
description
string
Optional description or notes about the audio
category
string
Category for organization (e.g., “announcement”, “promotion”, “emergency”)

Response

audioId
string
Unique identifier for the uploaded audio
name
string
Display name of the audio file
url
string
CDN URL for the audio file
duration
number
Audio duration in seconds
size
number
File size in bytes
format
string
Audio format (mp3, wav, ogg, aac)
createdAt
string
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"
}