Overview
Tornado supports advanced download options including resolution selection, video clipping, and live stream recording.
Resolution Selection
Limit the maximum video resolution to reduce file size and download time.
Available Resolutions
| Value | Resolution | Description |
|---|
best | Maximum | Download highest available quality (default) |
2160 | 4K UHD | 3840x2160 |
1440 | 2K QHD | 2560x1440 |
1080 | Full HD | 1920x1080 |
720 | HD | 1280x720 |
480 | SD | 854x480 |
360 | Low | 640x360 |
Example
curl -X POST "https://tornado.velys.software/jobs" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"max_resolution": "720"
}'
If the requested resolution is not available, Tornado downloads the next best available quality.
Video Clipping
Extract a specific segment from a video using start and end timestamps.
Both formats are supported:
HH:MM:SS - Hours, minutes, seconds (e.g., 01:30:45)
- Seconds - Raw seconds (e.g.,
5445)
Examples
# Extract 1:30 to 3:00
curl -X POST "https://tornado.velys.software/jobs" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"clip_start": "00:01:30",
"clip_end": "00:03:00"
}'
# Extract first 60 seconds
curl -X POST "https://tornado.velys.software/jobs" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"clip_start": "0",
"clip_end": "60"
}'
# Extract from 5 minutes to end
curl -X POST "https://tornado.velys.software/jobs" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"clip_start": "00:05:00"
}'
clip_end must be greater than clip_start. Invalid timestamps will return a 400 error.
Live Stream Recording
Record ongoing YouTube or Twitch live streams.
Parameters
| Parameter | Type | Description |
|---|
live_recording | boolean | Enable live stream mode |
live_from_start | boolean | Record from stream beginning (VOD mode) |
max_duration | integer | Maximum recording duration in seconds |
wait_for_video | boolean | Wait for scheduled streams to start |
Basic Live Recording
curl -X POST "https://tornado.velys.software/jobs" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/live/abc123",
"live_recording": true,
"max_duration": 3600
}'
Record from Start (VOD Mode)
curl -X POST "https://tornado.velys.software/jobs" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/live/abc123",
"live_recording": true,
"live_from_start": true,
"max_duration": 7200
}'
Wait for Scheduled Stream
curl -X POST "https://tornado.velys.software/jobs" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=scheduled_stream_id",
"live_recording": true,
"wait_for_video": true,
"max_duration": 3600
}'
Always set max_duration for live streams to prevent indefinite recordings. Recommended: 2-4 hours maximum.
Combining Options
You can combine multiple options in a single request:
curl -X POST "https://tornado.velys.software/jobs" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"max_resolution": "1080",
"clip_start": "00:00:30",
"clip_end": "00:02:00",
"format": "mp4",
"webhook_url": "https://myapp.com/webhook",
"enable_progress_webhook": true
}'
Error Handling
Invalid Resolution
{
"error": "Invalid resolution '4k'. Valid options: [\"best\", \"2160\", \"1440\", \"1080\", \"720\", \"480\", \"360\"]"
}
Invalid Timestamps
{
"error": "Invalid clip_start format 'abc'. Use HH:MM:SS or seconds"
}
{
"error": "clip_end must be greater than clip_start"
}