Get processing status, embedding and metadata of video
curl --request GET \
--url https://api.trytldw.ai/v1/media/{media_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trytldw.ai/v1/media/{media_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trytldw.ai/v1/media/{media_id}', 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.trytldw.ai/v1/media/{media_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.trytldw.ai/v1/media/{media_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trytldw.ai/v1/media/{media_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trytldw.ai/v1/media/{media_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l",
"external_id": "video_12345",
"status": "PENDING",
"collection_id": "c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l",
"title": "My Video",
"segments": [
{
"start_ms": 0,
"end_ms": 1000,
"embedding": [
123
],
"description": "People walking in the park"
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Index or Embed Videos
Get processing status, embedding and metadata of video
Get embedding, metadata and processing status for a video
GET
/
media
/
{media_id}
Get processing status, embedding and metadata of video
curl --request GET \
--url https://api.trytldw.ai/v1/media/{media_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trytldw.ai/v1/media/{media_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trytldw.ai/v1/media/{media_id}', 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.trytldw.ai/v1/media/{media_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.trytldw.ai/v1/media/{media_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trytldw.ai/v1/media/{media_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trytldw.ai/v1/media/{media_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l",
"external_id": "video_12345",
"status": "PENDING",
"collection_id": "c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l",
"title": "My Video",
"segments": [
{
"start_ms": 0,
"end_ms": 1000,
"embedding": [
123
],
"description": "People walking in the park"
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
The ID of the video. Use this ID to retrieve task status, metadata and embedding of video
Example:
"c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l"
Example:
"video_12345"
The status of the video understanding (e.g. indexing, embedding) job
Available options:
PENDING, PROCESSING, COMPLETED, FAILED The ID of the collection the video belongs to. Only present if the video is indexed in a collection
Example:
"c1a2b3c4-1a2b-3c4d-5e6f-7g8h9i0j1k2l"
Example:
"My Video"
Segments of the video with embeddings and/or descriptions if available
Show child attributes
Show child attributes
Was this page helpful?