Overview
Creates a new download job. For single videos, returns a job_id. For Spotify shows, automatically creates a batch and returns a batch_id with all episode job IDs.
Your API key for authentication
Request
The video or show URL to download
Output container format. Video : mp4, mkv, webm, mov. Audio : m4a, mp3, ogg, opus. Default: mp4 (or m4a when audio_only is true)
Video codec: copy (no re-encode), h264, h265, vp9. Default: copy
Audio codec: copy (no re-encode), aac, opus, mp3. Default: copy with automatic fallback to aac if incompatible
Audio bitrate when transcoding: 64k, 128k, 192k, 256k, 320k. Default: 192k
Video quality CRF (0-51, lower = better quality). Only used when video_codec is not copy. Default: 23
Custom filename (without extension). Max 255 characters. Cannot contain .., /, \, or null bytes.
S3 folder prefix for organizing files. Max 200 characters. Cannot contain .., start with / or \, or be empty/whitespace-only.
URL to receive completion notification via POST request.
Extract audio track only. Outputs m4a (native AAC, no re-encoding) by default. Set format to mp3, ogg, or opus for other audio formats. Supports audio_codec and audio_bitrate for transcoding control.
Download subtitles if available. Returns subtitle URL in job response.
Download video thumbnail. Returns thumbnail URL in job response.
Quality preset that overrides video_quality. Options: highest, high, medium, low, lowest.
Maximum video resolution. Options: best (default), 2160 (4K), 1440, 1080, 720, 480, 360. Works correctly for both horizontal and vertical (Shorts) videos by checking the shorter dimension.
Start timestamp for video clipping. Format: HH:MM:SS, MM:SS, or seconds (e.g., 00:01:30 or 90).
End timestamp for video clipping. Format: HH:MM:SS, MM:SS, or seconds (e.g., 00:05:00 or 300). Must be greater than clip_start.
Enable live stream recording mode. Auto-detected for live URLs.
For live streams: record from the beginning (VOD mode) instead of the live point.
Maximum recording duration in seconds. Recommended for live streams as a safety cap. Example: 7200 for 2 hours.
Wait for scheduled/upcoming streams to start before downloading.
Enable progress webhooks during processing. Sends updates at each stage: downloading, muxing, uploading.
Inline storage credentials. Required for marketplace users (RapidAPI, Apify, Zyla). Optional for direct API users (overrides pre-configured storage). Supports 4 providers via the provider field. See Inline Storage examples below.
For Spotify show batches only. Creates the batch in paused mode: jobs are not enqueued for processing immediately. Use PATCH /batch/{id}/jobs to rename episodes, then POST /batch/{id}/start to launch.
Single Job Response
{
"job_id" : "550e8400-e29b-41d4-a716-446655440000"
}
Batch Response (Spotify Shows)
When the URL is a Spotify show, a batch is created automatically:
Number of episodes in the show
Whether the batch was created in paused mode
List of episode details with job IDs, URLs, titles, descriptions, and release dates
List of job IDs for each episode (legacy field)
{
"batch_id" : "550e8400-e29b-41d4-a716-446655440001" ,
"total_episodes" : 142 ,
"paused" : false ,
"episodes" : [
{
"job_id" : "uuid-1" ,
"url" : "https://open.spotify.com/episode/abc" ,
"title" : "Episode 1 - Introduction" ,
"description" : "In this episode we cover..." ,
"release_date" : "2024-01-15"
},
{
"job_id" : "uuid-2" ,
"url" : "https://open.spotify.com/episode/def" ,
"title" : "Episode 2 - Deep Dive" ,
"description" : "A deep dive into..." ,
"release_date" : "2024-01-22"
}
],
"episode_jobs" : [ "uuid-1" , "uuid-2" ]
}
{
"batch_id" : "550e8400-e29b-41d4-a716-446655440001" ,
"total_episodes" : 142 ,
"paused" : true ,
"episodes" : [
{
"job_id" : "uuid-1" ,
"url" : "https://open.spotify.com/episode/abc" ,
"title" : "Episode 1 - Introduction"
},
{
"job_id" : "uuid-2" ,
"url" : "https://open.spotify.com/episode/def" ,
"title" : "Episode 2 - Deep Dive"
}
],
"episode_jobs" : [ "uuid-1" , "uuid-2" ]
}
Examples
Single Video
With Webhook
Custom Encoding
Spotify Show (Batch)
Audio Only (m4a, default)
Audio Only (mp3)
With Subtitles & Thumbnail
Quality Preset
Resolution Selection (720p)
Video Clipping
Live Stream Recording
With Progress Webhook
Inline Storage (S3)
Inline Storage (Azure Blob)
Inline Storage (GCS)
Inline Storage (Alibaba OSS)
curl -X POST "https://api.tornadoapi.io/jobs" \
-H "x-api-key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"format": "mp4",
"filename": "my-video"
}'
Inline Storage
The storage field lets you provide cloud storage credentials directly in the request. This is required for marketplace users and optional for direct API users.
Inline storage credentials take priority over pre-configured storage, are validated before the job is accepted, and are never stored or logged.
Provider Fields
S3 / S3-Compatible
Azure Blob
Google Cloud Storage
Alibaba OSS
Field Type Required Description providerstringYes Must be "s3" endpointstringYes S3 endpoint URL (e.g., https://s3.us-east-1.amazonaws.com, https://ACCOUNT.r2.cloudflarestorage.com) bucketstringYes Bucket name regionstringYes AWS region (e.g., us-east-1) or auto for R2 access_keystringYes Access key ID secret_keystringYes Secret access key folder_prefixstringNo Folder prefix (e.g., downloads/2024/) base_folderstringNo Top-level folder (default: videos)
Field Type Required Description providerstringYes Must be "blob" account_namestringYes Azure Storage account name containerstringYes Container name account_keystringNo* Account key (Base64) sas_tokenstringNo* SAS token folder_prefixstringNo Folder prefix base_folderstringNo Top-level folder (default: videos)
*Provide either account_key or sas_token, not both. Field Type Required Description providerstringYes Must be "gcs" project_idstringYes GCP project ID bucketstringYes GCS bucket name service_account_jsonstringYes Full service account JSON as string folder_prefixstringNo Folder prefix base_folderstringNo Top-level folder (default: videos)
Field Type Required Description providerstringYes Must be "oss" endpointstringYes OSS endpoint (e.g., https://oss-cn-hangzhou.aliyuncs.com) bucketstringYes Bucket name access_key_idstringYes Access key ID access_key_secretstringYes Access key secret folder_prefixstringNo Folder prefix base_folderstringNo Top-level folder (default: videos)
Success Response
201 Created (Single Video)
201 Created (Spotify Show Batch)
201 Created (YouTube Playlist Batch)
{
"job_id" : "550e8400-e29b-41d4-a716-446655440000"
}
Batch Response (YouTube Playlists)
When the URL is a YouTube playlist, a batch is created automatically:
Number of videos in the playlist
List of job IDs for each video
Error Responses
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
429 Too Many Requests
503 Service Unavailable
504 Gateway Timeout
{
"error" : "Folder name too long (max 200 characters)"
}
Notes
The 429 Too Many Requests and 503 Service Unavailable responses include a Retry-After header indicating how many seconds to wait before retrying.
Codec auto-correction : Incompatible codec/format combinations are automatically corrected to ensure valid output:
webm + h264 → video codec changed to vp9
webm + aac → audio codec changed to opus
ogg/opus + aac → audio codec changed to opus
mp3 + aac → audio codec changed to mp3
Setting audio_bitrate without audio_codec → audio codec defaults to aac
Invalid format values are silently replaced with mp4.