Skip to main content
POST
/
v1
/
media
/
sounds
curl -X POST https://api.infinipost.co/v1/media/sounds \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "soundUrl": "https://www.tiktok.com/@username/video/7123456789012345678",
    "name": "Viral Beat 2024"
  }'
{
  "soundId": "sound_abc123",
  "name": "Viral Beat 2024",
  "url": "https://storage.googleapis.com/.../audio.mp3",
  "duration": 45.2,
  "createdAt": "2024-04-21T20:30:00Z"
}

Request Body

soundUrl
string
required
TikTok video URL containing the sound you want to extract.How to get the URL:
  1. Open TikTok on your computer at https://www.tiktok.com/
  2. Find the video whose music you want to use
  3. Right-click and select “View video details”
  4. On the details page, copy the entire URL
name
string
Custom name for the sound (optional). If not provided, the sound name from TikTok will be used.

Response

soundId
string
Unique identifier for the uploaded sound.
name
string
Name of the sound.
url
string
Storage URL of the uploaded sound file.
duration
number
Duration of the audio in seconds.
createdAt
string
ISO 8601 timestamp of when the sound was uploaded.
curl -X POST https://api.infinipost.co/v1/media/sounds \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "soundUrl": "https://www.tiktok.com/@username/video/7123456789012345678",
    "name": "Viral Beat 2024"
  }'
{
  "soundId": "sound_abc123",
  "name": "Viral Beat 2024",
  "url": "https://storage.googleapis.com/.../audio.mp3",
  "duration": 45.2,
  "createdAt": "2024-04-21T20:30:00Z"
}
Using Sounds in PostsAfter uploading, use the returned soundId in the soundUrl field when creating video or slideshow posts. The sound will be automatically applied to your TikTok posts.

Error Responses

Invalid TikTok URL
{
  "error": {
    "code": "invalid_url",
    "message": "Invalid TikTok video URL. Please provide a valid TikTok video URL."
  }
}
Sound Extraction Failed
{
  "error": {
    "code": "extraction_failed",
    "message": "Unable to extract sound from the TikTok video. The video may be unavailable or restricted."
  }
}