Load a video preview
curl --request GET \
--url https://www.ntanduy.com/api/v1/video/preview/{token}import requests
url = "https://www.ntanduy.com/api/v1/video/preview/{token}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.ntanduy.com/api/v1/video/preview/{token}', 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://www.ntanduy.com/api/v1/video/preview/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://www.ntanduy.com/api/v1/video/preview/{token}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.ntanduy.com/api/v1/video/preview/{token}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ntanduy.com/api/v1/video/preview/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"
Video tools
Load a video preview
Stream the short-lived preview image returned by video extraction.
GET
/
api
/
v1
/
video
/
preview
/
{token}
Load a video preview
curl --request GET \
--url https://www.ntanduy.com/api/v1/video/preview/{token}import requests
url = "https://www.ntanduy.com/api/v1/video/preview/{token}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.ntanduy.com/api/v1/video/preview/{token}', 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://www.ntanduy.com/api/v1/video/preview/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://www.ntanduy.com/api/v1/video/preview/{token}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.ntanduy.com/api/v1/video/preview/{token}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ntanduy.com/api/v1/video/preview/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"
Use the complete
previewUrl returned by the extraction response. Do not construct,
decode, modify, or store preview tokens long-term.
This endpoint returns image bytes rather than the standard JSON success envelope.
Errors still use the canonical Pirehub API error envelope.Path Parameters
Opaque encoded preview token from data.previewUrl. Use the returned URL directly instead of constructing this value.
Response
The preview image bytes.
The response is of type file.