API v1.0
VidSonic API Documentation
Authentication
All API requests require authentication using your API key. Include your API key in the request headers.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Upload Management
/api/v1/getUploadSrv?key=YOUR_API_KEY
1. Get Upload Server Endpoint
Returns the active upload server with the most available space for uploading videos.
Full URL Example
https://vidsonic.net/api/v1/getUploadSrv?key=YOUR_API_KEY
Query Parameters
key
required
Response (200 OK)
{
"success": true,
"server": "https://vidsonic.net/api/v1/upload"
}
Code Examples
curl -X GET "https://vidsonic.net/api/v1/getUploadSrv?key=YOUR_API_KEY"
import requests
api_key = "YOUR_API_KEY"
url = "https://vidsonic.net/api/v1/getUploadSrv"
response = requests.get(url, params={"key": api_key})
data = response.json()
upload_server = data["server"]
<?php
$apiKey = "YOUR_API_KEY";
$url = "https://vidsonic.net/api/v1/getUploadSrv?key=" . $apiKey;
$response = file_get_contents($url);
$data = json_decode($response, true);
$uploadServer = $data['server'];
?>
const axios = require('axios');
async function getUploadServer() {
const response = await axios.get('https://vidsonic.net/api/v1/getUploadSrv', {
params: { key: 'YOUR_API_KEY' }
});
return response.data.server;
}
Error Responses
400
API key is required
401
Invalid API key
404
No upload server available
{uploadServerUrl}
2. Upload File
Upload a video file to the server returned from step 1. Use multipart/form-data encoding.
Parameters (multipart/form-data)
apiKey
required
video
required
Response (200 OK)
{
"success": true,
"message": "Video uploaded successfully",
"data": {
"id": "88vclmwvz2of",
"filename": "wtimxuhvwvl9k5t.mp4",
"title": "sample-5s.mp4",
"size": 2848208,
"mimeType": "video",
"status": "pending",
"createdAt": "2026-02-03T15:08:03.886+00:00"
}
}
Code Examples
# First get the upload server
UPLOAD_SERVER=$(curl -s "https://vidsonic.net/api/v1/getUploadSrv?key=YOUR_API_KEY" | jq -r '.server')
# Then upload the video
curl -X POST "$UPLOAD_SERVER" \
-F "apiKey=YOUR_API_KEY" \
-F "video=@/path/to/video.mp4"
import requests
api_key = "YOUR_API_KEY"
video_path = "/path/to/video.mp4"
# Get upload server
srv_response = requests.get("https://vidsonic.net/api/v1/getUploadSrv", params={"key": api_key})
upload_server = srv_response.json()["server"]
# Upload video
with open(video_path, 'rb') as video_file:
files = {'video': video_file}
data = {'apiKey': api_key}
response = requests.post(upload_server, files=files, data=data)
print(response.json())
<?php
$apiKey = "YOUR_API_KEY";
$videoPath = "/path/to/video.mp4";
// Get upload server
$srvResponse = file_get_contents("https://vidsonic.net/api/v1/getUploadSrv?key=" . $apiKey);
$srvData = json_decode($srvResponse, true);
$uploadServer = $srvData['server'];
// Upload video
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $uploadServer);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'apiKey' => $apiKey,
'video' => new CURLFile($videoPath)
]);\br>
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
?>
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
async function uploadVideo() {
const apiKey = 'YOUR_API_KEY';
// Get upload server
const srvRes = await axios.get('https://vidsonic.net/api/v1/getUploadSrv', {
params: { key: apiKey }
});
// Upload video
const form = new FormData();
form.append('apiKey', apiKey);
form.append('video', fs.createReadStream('/path/to/video.mp4'));
const response = await axios.post(srvRes.data.server, form, {
headers: form.getHeaders()
});
return response.data;
}
Error Responses
400
API key or video file is required
401
Invalid API key
413
File too large
3. Result URLs
After successful upload, use these URL patterns to access your video.
| Type | Pattern |
|---|---|
| Embed URL | https://vidsonic.net/e/{id} |
| Direct Player | https://vidsonic.net/d/{id} |
Example
If your video ID is abc123xyz, the embed URL would be: https://vidsonic.net/e/abc123xyz
File Information
/api/v1/file-check?key=YOUR_API_KEY&code=VIDEO_ID
Check File Status
Check the encoding and processing status of a video file.
Full URL Example
https://vidsonic.net/api/v1/file-check?key=YOUR_API_KEY&code=VIDEO_ID
Query Parameters
key
required
code
required
Response (200 OK)
{
"success": true,
"data": {
"id": "abc123xyz",
"title": "My Video Title",
"filename": "video.mp4",
"status": "ready",
"video_status": "online",
"encoding_status": "completed",
"encoding_progress": 100,
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-15T10:35:00.000Z"
}
}
Status Values
status
encoding_status
Error Responses
400
API key or video code is required
401
Invalid API key
404
Video not found
List Videos
/api/v1/videos?key=YOUR_API_KEY
List Videos with Pagination
Retrieve a paginated list of all your videos with optional thumbnail URLs.
Full URL Example
https://vidsonic.net/api/v1/videos?key=YOUR_API_KEY&poster=001&perPage=50&page=1&sort=desc&showEncodedOnly=true
Query Parameters
key
required
poster
optional
perPage
optional
page
optional
sort
optional
showEncodedOnly
optional
Response (200 OK)
{
"success": true,
"data": [
{
"id": "abc123xyz",
"title": "My Video Title",
"filename": "video.mp4",
"status": "ready",
"video_status": "online",
"views": 1250,
"duration": "10:35",
"size_mb": "245.67",
"encoding_progress": 100,
"created_at": "2025-01-15T10:30:00.000Z",
"thumbnail": "https://server.vidsonic.net/123/abc123/posters/poster_001.jpg"
}
],
"pagination": {
"total": 250,
"per_page": 100,
"current_page": 1,
"total_pages": 3,
"has_next_page": true,
"has_prev_page": false
}
}
Code Examples
# List all videos (default 100 per page, newest first)
curl "https://vidsonic.net/api/v1/videos?key=YOUR_API_KEY"
# List with poster 001, 50 per page, oldest first
curl "https://vidsonic.net/api/v1/videos?key=YOUR_API_KEY&poster=001&perPage=50&sort=asc"
# Get second page, only encoded videos, with grid thumbnail
curl "https://vidsonic.net/api/v1/videos?key=YOUR_API_KEY&poster=grid&page=2&showEncodedOnly=true"
import requests
api_key = "YOUR_API_KEY"
# List videos with poster, pagination, sorted oldest first, only encoded
response = requests.get("https://vidsonic.net/api/v1/videos", params={
"key": api_key,
"poster": "001",
"perPage": 50,
"page": 1,
"sort": "asc",
"showEncodedOnly": "true"
})
data = response.json()
videos = data['data']
pagination = data['pagination']
for video in videos:
print(f"{video['title']} - {video.get('thumbnail', 'No thumbnail')}")
<?php
$apiKey = "YOUR_API_KEY";
// List videos with all options
$url = "https://vidsonic.net/api/v1/videos";
$params = [
'key' => $apiKey,
'poster' => '001',
'perPage' => 50,
'page' => 1,
'sort' => 'asc',
'showEncodedOnly' => 'true'
];
$response = file_get_contents($url . '?' . http_build_query($params));
$data = json_decode($response, true);
foreach ($data['data'] as $video) {
$thumb = isset($video['thumbnail']) ? $video['thumbnail'] : 'No thumbnail';
echo $video['title'] . ' - ' . $thumb . "<br>";
}
?>
const axios = require('axios');
async function listVideos() {
const response = await axios.get('https://vidsonic.net/api/v1/videos', {
params: {
key: 'YOUR_API_KEY',
poster: '001',
perPage: 50,
page: 1,
sort: 'asc',
showEncodedOnly: 'true'
}
});
const { data, pagination } = response.data;
data.forEach(video => {
const thumb = video.thumbnail || 'No thumbnail';
console.log(`${video.title} - ${thumb}`);
});
return response.data;
}
Error Responses
400
API key is required or invalid poster number
401
Invalid API key
Notes
- • Videos are ordered by creation date (default:
sort=descfor newest first) - • Only online videos are included in the list
- • Use
showEncodedOnly=trueto get only fully encoded videos - • Thumbnails are only included if the
posterparameter is provided AND video is encoded - • Maximum
perPagevalue is 500 - • For grid thumbnail use
poster=grid, for numbered posters useposter=001toposter=015
Encoding Status
Monitor the encoding progress of your videos using the /api/v1/file-check endpoint.
GET /api/v1/file-check?key=YOUR_API_KEY&code=VIDEO_ID
The response includes:
encoding_progress- Percentage complete (0-100)encoding_status- Current status (pending/started/completed/error)status- Overall video status
Deleted Check
/api/v1/check-status?key=YOUR_API_KEY&code=VIDEO_ID
Check Video Status (Fast)
Quickly check if a video is online, offline, or deleted. Minimal query for maximum speed.
Full URL Example
https://vidsonic.net/api/v1/check-status?key=YOUR_API_KEY&code=VIDEO_ID
Status Values
"status": "online"
(video available)
200 OK
"status": "offline"
(soft deleted, file on server)
200 OK
"status": "deleted"
(permanently removed)
200 OK
404 Not Found
Response Examples
Online Video
{
"success": true,
"status": "online"
}
Offline (Soft Deleted)
{
"success": true,
"status": "offline"
}
Deleted (Permanently)
{
"success": true,
"status": "deleted"
}
Code Examples
# Check video status
curl -s "https://vidsonic.net/api/v1/check-status?key=YOUR_API_KEY&code=VIDEO_ID" | jq .
# Response for online video:
{"success": true, "status": "online"}
# Response for deleted video:
{"success": true, "status": "offline"}
import requests
api_key = "YOUR_API_KEY"
video_id = "VIDEO_ID"
response = requests.get(
"https://vidsonic.net/api/v1/check-status",
params={"key": api_key, "code": video_id}
)
data = response.json()
if response.status_code == 200 and data.get('success'):
if data['status'] == 'online':
print("Video is online")
elif data['status'] == 'offline':
print("Video is deleted/offline")
else:
print("Video not found")
<?php
$apiKey = "YOUR_API_KEY";
$videoId = "VIDEO_ID";
$url = "https://vidsonic.net/api/v1/check-status";
$params = ['key' => $apiKey, 'code' => $videoId];
$response = file_get_contents($url . '?' . http_build_query($params));
$data = json_decode($response, true);
if ($data && $data['success']) {
if ($data['status'] === 'online') {
echo "Video is online";
} elseif ($data['status'] === 'offline') {
echo "Video is deleted/offline";
}
} else {
echo "Video not found";
}
?>
const axios = require('axios');
async function checkStatus(videoId) {
try {
const response = await axios.get(
'https://vidsonic.net/api/v1/check-status',
{ params: { key: 'YOUR_API_KEY', code: videoId } }
);
if (response.data.success) {
return response.data.status; // 'online' or 'offline'
}
} catch (error) {
if (error.response?.status === 404) {
return 'not_found';
}
throw error;
}
}
HTTP Status Codes
| Code | Description |
|---|---|
200 |
OK - Request succeeded |
400 |
Bad Request - Invalid or missing parameters |
401 |
Unauthorized - Invalid or missing API key |
403 |
Forbidden - Access denied (video belongs to another user) |
404 |
Not Found - Resource not found (video doesn't exist) |
422 |
Unprocessable Entity - Validation errors |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error - Server error |
503 |
Service Unavailable - Service temporarily unavailable |
Remote Upload
/api/v1/remote-upload
Add Remote Upload URL
Upload a video from a remote URL. The server will download the video automatically.
Full URL Example
https://vidsonic.net/api/v1/remote-upload
Parameters
key
required
urls
required
Response (200 OK)
{
"success": true,
"data": {
"uploads": [
{
"id": 14686,
"url": "https://example.com/video.mp4",
"status": "pending",
"progress": 0,
"created_at": "2026-02-03T15:45:48.316+00:00"
}
],
"count": 1
}
}
Code Examples
curl -X POST "https://vidsonic.net/api/v1/remote-upload?key=YOUR_API_KEY" \
-d "urls=https://example.com/video.mp4"
import requests
api_key = "YOUR_API_KEY"
video_url = "https://example.com/video.mp4"
response = requests.post(
"https://vidsonic.net/api/v1/remote-upload",
data={"key": api_key, "urls": video_url}
)
data = response.json()
if data['success']:
print(f"Upload ID: {data['data']['uploads'][0]['id']}")
<?php
$apiKey = "YOUR_API_KEY";
$videoUrl = "https://example.com/video.mp4";
$response = file_get_contents(
"https://vidsonic.net/api/v1/remote-upload?key=" . $apiKey .
"&urls=" . urlencode($videoUrl),
false,
stream_context_create([
'http' => [
'method' => 'POST'
]
])
);
$data = json_decode($response, true);
if ($data && $data['success']) {
echo "Upload ID: " . $data['data']['uploads'][0]['id'];
}
?>
const axios = require('axios');
async function addRemoteUpload(url) {
const response = await axios.post(
'https://vidsonic.net/api/v1/remote-upload',
{ key: 'YOUR_API_KEY', urls: url }
);
return response.data.data.uploads[0].id;
}
/api/v1/remote-uploads
Check Remote Uploads
Get the status of all your remote uploads.
Full URL Example
https://vidsonic.net/api/v1/remote-uploads?key=YOUR_API_KEY
Response (200 OK)
{
"success": true,
"data": {
"uploads": [
{
"id": 14686,
"url": "https://example.com/video.mp4",
"status": "completed",
"progress": 100,
"video_id": "abc123xyz",
"created_at": "2026-02-03T15:45:48.316+00:00",
"updated_at": "2026-02-03T15:46:01.781+00:00"
}
],
"count": 1
}
}
Upload Status Values
pending
downloading
completed
failed
deleted
/api/v1/remote-upload
Check Single Remote Upload
Get the status of a specific remote upload by ID.
Full URL Example
https://vidsonic.net/api/v1/remote-upload?key=YOUR_API_KEY&id=UPLOAD_ID
Parameters
key
required
id
required
Response (200 OK)
{
"success": true,
"data": {
"id": 14688,
"url": "https://example.com/video.mp4",
"status": "completed",
"progress": 100,
"video_id": "abc123xyz",
"created_at": "2026-02-03T15:45:48.316+00:00",
"updated_at": "2026-02-03T15:46:01.781+00:00"
}
}
Code Examples
curl -s "https://vidsonic.net/api/v1/remote-upload?key=YOUR_API_KEY&id=14688" | jq .
import requests
api_key = "YOUR_API_KEY"
upload_id = 14688
response = requests.get(
"https://vidsonic.net/api/v1/remote-upload",
params={"key": api_key, "id": upload_id}
)
data = response.json()
if data['success']:
print(f"Status: {data['data']['status']}")
<?php
$apiKey = "YOUR_API_KEY";
$uploadId = 14688;
$response = file_get_contents(
"https://vidsonic.net/api/v1/remote-upload?key=" . $apiKey .
"&id=" . $uploadId
);
$data = json_decode($response, true);
if ($data && $data['success']) {
echo "Status: " . $data['data']['status'];
}
?>
const axios = require('axios');
async function getRemoteUpload(uploadId) {
const response = await axios.get(
'https://vidsonic.net/api/v1/remote-upload',
{ params: { key: 'YOUR_API_KEY', id: uploadId } }
);
return response.data.data;
}
/api/v1/remote-upload
Cancel Remote Upload
Delete/Cancel a remote upload.
Full URL Example
https://vidsonic.net/api/v1/remote-upload?key=YOUR_API_KEY&id=UPLOAD_ID
Parameters
key
required
id
required
Response (200 OK)
{
"success": true,
"message": "Upload cancelled successfully"
}
Code Examples
curl -X DELETE "https://vidsonic.net/api/v1/remote-upload?key=YOUR_API_KEY&id=14686"
import requests
api_key = "YOUR_API_KEY"
upload_id = 14686
response = requests.delete(
"https://vidsonic.net/api/v1/remote-upload",
params={"key": api_key, "id": upload_id}
)
if response.json()['success']:
print("Upload deleted")
<?php
$apiKey = "YOUR_API_KEY";
$uploadId = 14686;
$response = file_get_contents(
"https://vidsonic.net/api/v1/remote-upload?key=" . $apiKey .
"&id=" . $uploadId,
false,
stream_context_create([
'http' => [
'method' => 'DELETE'
]
])
);
?>
const axios = require('axios');
async function deleteRemoteUpload(uploadId) {
await axios.delete(
'https://vidsonic.net/api/v1/remote-upload',
{ params: { key: 'YOUR_API_KEY', id: uploadId } }
);
}
Video Cloning
/api/v1/clone?key=YOUR_API_KEY&code=VIDEO_ID
Clone Video
Clone an existing online video (yours or someone else's) to your account. This copies metadata and subtitles.
Full URL Example
https://vidsonic.net/api/v1/clone?key=YOUR_API_KEY&code=VIDEO_ID
Parameters
key
required
code
required
Response (200 OK)
{
"success": true,
"message": "Video cloned successfully",
"data": {
"id": "new_video_id",
"title": "Video Title",
"url": "https://vidsonic.net/e/new_video_id"
}
}
Code Examples
curl "https://vidsonic.net/api/v1/clone?key=YOUR_API_KEY&code=VIDEO_ID"
import requests
api_key = "YOUR_API_KEY"
video_code = "VIDEO_ID"
response = requests.get(
"https://vidsonic.net/api/v1/clone",
params={"key": api_key, "code": video_code}
)
data = response.json()
if data['success']:
print(f"Cloned Video ID: {data['data']['id']}")
<?php
$apiKey = "YOUR_API_KEY";
$videoCode = "VIDEO_ID";
$url = "https://vidsonic.net/api/v1/clone?key=" . $apiKey . "&code=" . $videoCode;
$response = file_get_contents($url);
$data = json_decode($response, true);
if ($data && $data['success']) {
echo "Cloned Video ID: " . $data['data']['id'];
}
?>
const axios = require('axios');
async function cloneVideo(videoCode) {
const response = await axios.get(
'https://vidsonic.net/api/v1/clone',
{ params: { key: 'YOUR_API_KEY', code: videoCode } }
);
return response.data.data.id;
}
Account & API Keys
Getting Your API Key
- Log in to your VidSonic account
- Navigate to Settings
- Go to Account Settings section
- Copy your API key
Keep your API key secure!
Never share your API key publicly. Treat it like a password.
/api/v1/account?key=YOUR_API_KEY
Get Account Information
Retrieve your account details including email, encoding priority, and current earnings.
Full URL Example
https://vidsonic.net/api/v1/account?key=YOUR_API_KEY
Response (200 OK)
{
"success": true,
"data": {
"email": "[email protected]",
"priority": 5,
"profit": 125.50
}
}
Response Fields
email
priority
profit
Code Examples
curl -s "https://vidsonic.net/api/v1/account?key=YOUR_API_KEY" | jq .
import requests
api_key = "YOUR_API_KEY"
response = requests.get(
"https://vidsonic.net/api/v1/account",
params={"key": api_key}
)
data = response.json()
if data['success']:
print(f"Email: {data['data']['email']}")
print(f"Priority: {data['data']['priority']}")
print(f"Profit: ${data['data']['profit']:.2f}")
<?php
$apiKey = "YOUR_API_KEY";
$response = file_get_contents(
"https://vidsonic.net/api/v1/account?key=" . $apiKey
);
$data = json_decode($response, true);
if ($data && $data['success']) {
echo "Email: " . $data['data']['email'] . "<br>";
echo "Priority: " . $data['data']['priority'] . "<br>";
echo "Profit: $" " . number_format($data['data']['profit'], 2) . "<br>";
}
?>
const axios = require('axios');
async function getAccount() {
const response = await axios.get(
'https://vidsonic.net/api/v1/account',
{ params: { key: 'YOUR_API_KEY' } }
);
const { email, priority, profit } = response.data.data;
console.log(`Email: ${email}`);
console.log(`Priority: ${priority}`);
console.log(`Profit: $${profit.toFixed(2)}`);
}