Skip to main content

Endpoint

POST https://api.ugc.inc/media/social-audio/upload

Overview

Import audio from TikTok by providing either a video URL or a music URL. The API will extract the audio file and cover image, upload them to storage, and create a social audio record. Supported URL formats:
  • Video URL: https://www.tiktok.com/@username/video/1234567890
  • Music URL: https://www.tiktok.com/music/Song-Name-1234567890

Request Body

url
string
required
TikTok video or music URL to import audio from
tag
string
Optional tag for categorization

Response

data
SocialAudio
The created social audio object
curl -X POST https://api.ugc.inc/media/social-audio/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.tiktok.com/@username/video/1234567890",
    "tag": "trending"
  }'
{
  "ok": true,
  "code": 200,
  "data": {
    "id": "audio_abc123",
    "org_id": "org_xyz789",
    "name": "Trending Sound - Artist Name",
    "tag": "trending",
    "social_post_link": "https://www.tiktok.com/@username/video/1234567890",
    "social_audio_link": "https://www.tiktok.com/music/Trending-Sound-1234567890",
    "platform_type": "tiktok",
    "preview_url": "https://api.ugc.inc/media/file/audio_abc123/preview",
    "audio_url": "https://api.ugc.inc/media/file/audio_abc123/audio",
    "created_at": "2024-01-15T10:30:00.000Z"
  }
}