Quickstart
Get started with VideoCascade API in minutes
Quickstart Guide
Get up and running with VideoCascade API in just a few minutes.
Prerequisites
Before you begin, you'll need:
- An API key (can be obtained at https://www.videocascade.com/dashboard/api-keys)
- A video file URL or local video file
- Basic knowledge of REST APIs
Step 1: Get Your API Key
Sign up at https://www.videocascade.com/signup to receive your API key. It will look like this:
vca_32randomcharactershere123456Keep your API key secure! Never commit it to version control or expose it in client-side code.
Step 2: Make Your First Request
Here's a simple example to process a video:
curl -X POST https://api.videocascade.com/v1/videos \
-H "Authorization: Bearer vca_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"fileUrl": "https://example.com/video.mp4",
"removeSilence": true,
"normalizeAudio": true,
"outputFormat": "mp4"
}'const response = await fetch('https://api.videocascade.com/v1/videos', {
method: 'POST',
headers: {
'Authorization': 'Bearer vca_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
fileUrl: 'https://example.com/video.mp4',
removeSilence: true,
normalizeAudio: true,
outputFormat: 'mp4',
}),
});
const data = await response.json();
console.log(data);import requests
response = requests.post(
'https://api.videocascade.com/v1/videos',
headers={
'Authorization': 'Bearer vca_your_api_key',
'Content-Type': 'application/json',
},
json={
'fileUrl': 'https://example.com/video.mp4',
'removeSilence': True,
'normalizeAudio': True,
'outputFormat': 'mp4',
}
)
data = response.json()
print(data)interface VideoResponse {
videoId: string;
jobId: string;
status: string;
message: string;
}
const response = await fetch('https://api.videocascade.com/v1/videos', {
method: 'POST',
headers: {
'Authorization': 'Bearer vca_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
fileUrl: 'https://example.com/video.mp4',
removeSilence: true,
normalizeAudio: true,
outputFormat: 'mp4',
}),
});
const data: VideoResponse = await response.json();
console.log(`Video ID: ${data.videoId}`);
console.log(`Job ID: ${data.jobId}`);Step 3: Check Processing Status
You'll receive a response with a videoId. Use it to check the processing status:
curl -X GET https://api.videocascade.com/v1/videos/v_abc12345 \
-H "Authorization: Bearer vca_your_api_key"Response when processing:
{
"videoId": "v_abc12345",
"status": "running",
"progressPercent": 45,
"videoName": "video.mp4"
}Response when complete:
{
"videoId": "v_abc12345",
"status": "succeeded",
"progressPercent": 100,
"finalVideoUrl": "https://storage.example.com/processed.mp4",
"videoMetadata": {
"width": 1920,
"height": 1080,
"duration": 120.5,
"fps": 30
}
}Step 4: Download Your Processed Video
Once the status is succeeded, download your video from the finalVideoUrl:
const statusResponse = await fetch(
'https://api.videocascade.com/v1/videos/v_abc12345',
{
headers: {
Authorization: 'Bearer vca_your_api_key',
},
}
);
const status = await statusResponse.json();
if (status.status === 'succeeded') {
// Download the video
const videoUrl = status.finalVideoUrl;
console.log('Download from:', videoUrl);
}Upload a File Directly
You can also upload a video file directly instead of using a URL:
const formData = new FormData();
formData.append('file', videoFile); // File object from input
formData.append('removeSilence', 'true');
formData.append('normalizeAudio', 'true');
formData.append('outputFormat', 'mp4');
const response = await fetch('https://api.videocascade.com/v1/videos/upload', {
method: 'POST',
headers: {
Authorization: 'Bearer vca_your_api_key',
},
body: formData,
});
const data = await response.json();
console.log(`Video ID: ${data.videoId}`);Processing Status Values
| Status | Description |
|---|---|
queued | Video is waiting in the queue |
running | Video is currently being processed |
succeeded | Processing completed successfully |
failed | Processing failed (check errorMessage) |
canceled | Processing was canceled |
What's Next?
Now that you've processed your first video, explore more features: