Request Body
TikTok video URL containing the sound you want to extract.How to get the URL:
- Open TikTok on your computer at https://www.tiktok.com/
- Find the video whose music you want to use
- Right-click and select “View video details”
- On the details page, copy the entire URL
Custom name for the sound (optional). If not provided, the sound name from TikTok will be used.
Response
Unique identifier for the uploaded sound.
Storage URL of the uploaded sound file.
Duration of the audio in seconds.
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
{
"error": {
"code": "invalid_url",
"message": "Invalid TikTok video URL. Please provide a valid TikTok video URL."
}
}
{
"error": {
"code": "extraction_failed",
"message": "Unable to extract sound from the TikTok video. The video may be unavailable or restricted."
}
}