Skip to main content

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

ValueResolutionDescription
bestMaximumDownload highest available quality (default)
21604K UHD3840x2160
14402K QHD2560x1440
1080Full HD1920x1080
720HD1280x720
480SD854x480
360Low640x360

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.

Timestamp Formats

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

ParameterTypeDescription
live_recordingbooleanEnable live stream mode
live_from_startbooleanRecord from stream beginning (VOD mode)
max_durationintegerMaximum recording duration in seconds
wait_for_videobooleanWait 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"
}