curl --request POST \
--url https://api.deapi.ai/api/v2/videos/descriptions/price \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'video_url=https://www.youtube.com/watch?v=jNQXAC9IVRw' \
--form model=Marlin_2B \
--form preset=balanced \
--form include_metadata=false \
--form 1.video_file='@example-file'import requests
url = "https://api.deapi.ai/api/v2/videos/descriptions/price"
files = { "1.video_file": ("example-file", open("example-file", "rb")) }
payload = {
"video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"model": "Marlin_2B",
"preset": "balanced",
"include_metadata": "false"
}
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('video_url', 'https://www.youtube.com/watch?v=jNQXAC9IVRw');
form.append('model', 'Marlin_2B');
form.append('preset', 'balanced');
form.append('include_metadata', 'false');
form.append('1.video_file', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.deapi.ai/api/v2/videos/descriptions/price', 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/v2/videos/descriptions/price",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nMarlin_2B\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"preset\"\r\n\r\nbalanced\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.video_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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/v2/videos/descriptions/price"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nMarlin_2B\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"preset\"\r\n\r\nbalanced\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.video_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
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.post("https://api.deapi.ai/api/v2/videos/descriptions/price")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nMarlin_2B\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"preset\"\r\n\r\nbalanced\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.video_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v2/videos/descriptions/price")
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.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nMarlin_2B\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"preset\"\r\n\r\nbalanced\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.video_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"price": 0.25
}
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "The selected model does not support Text To Image.",
"errors": {
"model": [
"This model is not available on your plan. Please upgrade to access it."
]
}
}{
"message": "Too Many Attempts."
}Video Description Price Calculation
Quote a video description before submitting it. Priced on the machine time the description takes — which grows with the length of the video and with the preset — at the model’s hourly rate, except on TikTok, where the price is a fixed card by length (up to 1, 2, 3, 5 or 10 minutes; 10 minutes is the maximum) scaled ×0.75 / ×1 / ×1.5 by the preset. include_metadata adds the same flat surcharge as on transcription, on URL sources only. Provide the source as a URL, an upload, or a known duration_seconds.
curl --request POST \
--url https://api.deapi.ai/api/v2/videos/descriptions/price \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'video_url=https://www.youtube.com/watch?v=jNQXAC9IVRw' \
--form model=Marlin_2B \
--form preset=balanced \
--form include_metadata=false \
--form 1.video_file='@example-file'import requests
url = "https://api.deapi.ai/api/v2/videos/descriptions/price"
files = { "1.video_file": ("example-file", open("example-file", "rb")) }
payload = {
"video_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"model": "Marlin_2B",
"preset": "balanced",
"include_metadata": "false"
}
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('video_url', 'https://www.youtube.com/watch?v=jNQXAC9IVRw');
form.append('model', 'Marlin_2B');
form.append('preset', 'balanced');
form.append('include_metadata', 'false');
form.append('1.video_file', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.deapi.ai/api/v2/videos/descriptions/price', 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/v2/videos/descriptions/price",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nMarlin_2B\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"preset\"\r\n\r\nbalanced\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.video_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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/v2/videos/descriptions/price"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nMarlin_2B\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"preset\"\r\n\r\nbalanced\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.video_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "<accept>")
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.post("https://api.deapi.ai/api/v2/videos/descriptions/price")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nMarlin_2B\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"preset\"\r\n\r\nbalanced\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.video_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v2/videos/descriptions/price")
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.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nMarlin_2B\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"preset\"\r\n\r\nbalanced\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.video_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"price": 0.25
}
}{
"data": {},
"message": "<string>",
"errors": [
"<unknown>"
],
"statusCode": 123
}{
"message": "The selected model does not support Text To Image.",
"errors": {
"model": [
"This model is not available on your plan. Please upgrade to access it."
]
}
}{
"message": "Too Many Attempts."
}Authorizations
Sanctum personal access token, sent as Authorization: Bearer <token>. The token is opaque — it carries no claims and no embedded expiry, so do not attempt to decode it. Issue and revoke tokens from your account dashboard.
Headers
application/json Body
Provide exactly one of video_url, video_file or duration_seconds.
- From a video URL
- From an uploaded file
- From a known duration
Exactly ONE input source per request — video_url, video_file or duration_seconds — hence the three variants below. They are mutually exclusive, not a menu of optional fields: sending two of them is a 422. platform belongs to the duration_seconds variant alone. model and preset apply to all three, and are validated exactly as on POST /api/v2/videos/descriptions, so a quote is never returned for a request the job endpoint would reject.
URL of the video to quote. Mutually exclusive with video_file and duration_seconds; platform must NOT be sent with it, as it is derived from the URL. Quotes from a TikTok URL are refused (the lookup itself costs money) — quote TikTok by duration_seconds + platform: tiktok instead.
"https://www.youtube.com/watch?v=jNQXAC9IVRw"
The model to use.
"Marlin_2B"
The preset you will submit. It sets how much machine time the description takes (detail is roughly 7× fast per hour of material), which is what the price follows; on a TikTok, where the price is a fixed card, it multiplies the card ×0.75 / ×1 / ×1.5 for fast / balanced / detail. Omitted quotes at the model default (balanced). Ignored on a model without info.features.supports_presets.
fast, balanced, detail, null "balanced"
Whether the job will ask for source metadata. Carries a flat surcharge on URL sources (an upload always returns null metadata and is never charged), so pass it exactly as you will pass it to POST /api/v2/videos/descriptions.
false
Response
Calculated price for the video description.
Show child attributes
Show child attributes
Was this page helpful?