Start Batch
curl --request POST \
--url https://api.tornadoapi.io/batch/{id}/start \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.tornadoapi.io/batch/{id}/start"
headers = {"x-api-key": "<x-api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.tornadoapi.io/batch/{id}/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tornadoapi.io/batch/{id}/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tornadoapi.io/batch/{id}/start"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tornadoapi.io/batch/{id}/start")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/batch/{id}/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"error": "Batch cannot be started (current status: completed)"
}
{
"error": "Batch does not belong to this API key"
}
{
"error": "Batch not found"
}
Batch Operations
Start Batch
Start a paused batch to begin downloading all episodes
POST
/
batch
/
{id}
/
start
Start Batch
curl --request POST \
--url https://api.tornadoapi.io/batch/{id}/start \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.tornadoapi.io/batch/{id}/start"
headers = {"x-api-key": "<x-api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.tornadoapi.io/batch/{id}/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tornadoapi.io/batch/{id}/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tornadoapi.io/batch/{id}/start"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tornadoapi.io/batch/{id}/start")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/batch/{id}/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"error": "Batch cannot be started (current status: completed)"
}
{
"error": "Batch does not belong to this API key"
}
{
"error": "Batch not found"
}
Overview
Starts eligible children of a paused batch. A batch already markedprocessing can be started again to recover children left paused by a partial attempt; children already started or terminal are not republished. Current account/quota checks still apply, and admission limits can park jobs until capacity is available.
Header Parameters
Path Parameters
Response
Example
curl -X POST "https://api.tornadoapi.io/batch/550e8400-e29b-41d4-a716-446655440001/start" \
-H "x-api-key: sk_your_api_key"
{
"batch_id": "550e8400-e29b-41d4-a716-446655440001",
"started_jobs": 142,
"status": "processing"
}
Error Responses
{
"error": "Batch cannot be started (current status: completed)"
}
{
"error": "Batch does not belong to this API key"
}
{
"error": "Batch not found"
}
503 can report started_jobs and failed_jobs when only part of the batch was started. Retry the same batch-start request. Missing stored job payloads can also return 503 with a reconciliation error. Marketplace batch access returns 403.
Workflow
The typical paused batch workflow is:POST /jobswithpaused: true- Create batch, get episode titlesPATCH /batch/{id}/jobs- Rename episodes as neededPOST /batch/{id}/start- Start downloadingGET /batch/{id}- Poll for progress
Was this page helpful?