Import Video
POST
/api/v1/media/videos/importImport a video from a URL to your dedicated PeerTube channel. Supports YouTube, Vimeo, direct video URLs, and other supported platforms.
Request
urlstringrequiredVideo URL to import (YouTube, Vimeo, direct link, etc.)
titlestringVideo title (defaults to extracted title from source)
descriptionstringVideo description
privacyintegerdefault: 2Privacy setting:
1= Public (visible to everyone)2= Unlisted (accessible via link only)3= Private (only you can view)
Response
successbooleanWhether the import was initiated
video_idintegerPeerTube video ID
titlestringVideo title
watch_urlstringURL to watch the video
embed_urlstringURL for embedding the video
channel_namestringYour PeerTube channel name
Example
- cURL
- Python
curl -X POST "https://spideriq.ai/api/v1/media/videos/import" \
-H "Authorization: Bearer cli_abc123:sk_xxx:secret_xxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://youtube.com/watch?v=dQw4w9WgXcQ",
"title": "Product Demo",
"description": "Our product demonstration video",
"privacy": 2
}'
import requests
url = "https://spideriq.ai/api/v1/media/videos/import"
headers = {
"Authorization": "Bearer cli_abc123:sk_xxx:secret_xxx",
"Content-Type": "application/json"
}
data = {
"url": "https://youtube.com/watch?v=dQw4w9WgXcQ",
"title": "Product Demo",
"description": "Our product demonstration video",
"privacy": 2
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Response Example
{
"success": true,
"video_id": 123,
"title": "Product Demo",
"description": "Our product demonstration video",
"watch_url": "https://videos.spideriq.ai/w/abc123xyz",
"embed_url": "https://videos.spideriq.ai/videos/embed/abc123xyz",
"channel_name": "client_cli_abc123",
"privacy": 2,
"state": "importing"
}
note
Video imports may take several minutes depending on the source video size. The video will be in "importing" state until processing completes.