cURL
curl --request POST \
--url https://api.deapi.ai/api/v1/client/vid2txt/price-calculation \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"include_ts": true,
"model": "WhisperLargeV3"
}
'import requests
url = "https://api.deapi.ai/api/v1/client/vid2txt/price-calculation"
payload = {
"video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"include_ts": True,
"model": "WhisperLargeV3"
}
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Accept: '<accept>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
video_url: 'https://www.youtube.com/watch?v=jNQXAC9IVRw',
include_ts: true,
model: 'WhisperLargeV3'
})
};
fetch('https://api.deapi.ai/api/v1/client/vid2txt/price-calculation', 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.deapi.ai/api/v1/client/vid2txt/price-calculation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'video_url' => 'https://www.youtube.com/watch?v=jNQXAC9IVRw',
'include_ts' => true,
'model' => 'WhisperLargeV3'
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.deapi.ai/api/v1/client/vid2txt/price-calculation"
payload := strings.NewReader("{\n \"video_url\": \"https://www.youtube.com/watch?v=jNQXAC9IVRw\",\n \"include_ts\": true,\n \"model\": \"WhisperLargeV3\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.deapi.ai/api/v1/client/vid2txt/price-calculation")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://www.youtube.com/watch?v=jNQXAC9IVRw\",\n \"include_ts\": true,\n \"model\": \"WhisperLargeV3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v1/client/vid2txt/price-calculation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"https://www.youtube.com/watch?v=jNQXAC9IVRw\",\n \"include_ts\": true,\n \"model\": \"WhisperLargeV3\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"price": 0.25
}
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "The selected model does not support Text To Image.",
"errors": {
"model": [
"The selected model does not support Text To Image."
]
}
}{
"message": "Too Many Attempts."
}Analysis
Video-to-Text Price Calculation
Endpoint for calculating price for video to text inference
POST
/
api
/
v1
/
client
/
vid2txt
/
price-calculation
cURL
curl --request POST \
--url https://api.deapi.ai/api/v1/client/vid2txt/price-calculation \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"include_ts": true,
"model": "WhisperLargeV3"
}
'import requests
url = "https://api.deapi.ai/api/v1/client/vid2txt/price-calculation"
payload = {
"video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"include_ts": True,
"model": "WhisperLargeV3"
}
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Accept: '<accept>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
video_url: 'https://www.youtube.com/watch?v=jNQXAC9IVRw',
include_ts: true,
model: 'WhisperLargeV3'
})
};
fetch('https://api.deapi.ai/api/v1/client/vid2txt/price-calculation', 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.deapi.ai/api/v1/client/vid2txt/price-calculation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'video_url' => 'https://www.youtube.com/watch?v=jNQXAC9IVRw',
'include_ts' => true,
'model' => 'WhisperLargeV3'
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.deapi.ai/api/v1/client/vid2txt/price-calculation"
payload := strings.NewReader("{\n \"video_url\": \"https://www.youtube.com/watch?v=jNQXAC9IVRw\",\n \"include_ts\": true,\n \"model\": \"WhisperLargeV3\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.deapi.ai/api/v1/client/vid2txt/price-calculation")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://www.youtube.com/watch?v=jNQXAC9IVRw\",\n \"include_ts\": true,\n \"model\": \"WhisperLargeV3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v1/client/vid2txt/price-calculation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"https://www.youtube.com/watch?v=jNQXAC9IVRw\",\n \"include_ts\": true,\n \"model\": \"WhisperLargeV3\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"price": 0.25
}
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "The selected model does not support Text To Image.",
"errors": {
"model": [
"The selected model does not support Text To Image."
]
}
}{
"message": "Too Many Attempts."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Available options:
application/json Body
application/json
Video transcription parameters
URL of video to transcribe
Example:
"https://www.youtube.com/watch?v=jNQXAC9IVRw"
Should transcription include timestamps
The model to use for transcription. Available models can be retrieved via the GET /api/v1/client/models endpoint.
Example:
"WhisperLargeV3"
Response
Calculated price for video to text inference.
Show child attributes
Show child attributes
Was this page helpful?
⌘I