curl --request POST \
--url https://api.deapi.ai/api/v2/audio/transcriptions/price \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'source_url=https://www.youtube.com/watch?v=jNQXAC9IVRw' \
--form model=WhisperLargeV3 \
--form include_ts=false \
--form ts_level=word \
--form include_metadata=false \
--form diarize=false \
--form lang=en \
--form 1.source_file='@example-file'import requests
url = "https://api.deapi.ai/api/v2/audio/transcriptions/price"
files = { "1.source_file": ("example-file", open("example-file", "rb")) }
payload = {
"source_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"model": "WhisperLargeV3",
"include_ts": "false",
"ts_level": "word",
"include_metadata": "false",
"diarize": "false",
"lang": "en"
}
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('source_url', 'https://www.youtube.com/watch?v=jNQXAC9IVRw');
form.append('model', 'WhisperLargeV3');
form.append('include_ts', 'false');
form.append('ts_level', 'word');
form.append('include_metadata', 'false');
form.append('diarize', 'false');
form.append('lang', 'en');
form.append('1.source_file', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.deapi.ai/api/v2/audio/transcriptions/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/audio/transcriptions/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=\"source_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ts_level\"\r\n\r\nword\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"diarize\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.source_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/audio/transcriptions/price"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ts_level\"\r\n\r\nword\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"diarize\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.source_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/audio/transcriptions/price")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ts_level\"\r\n\r\nword\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"diarize\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.source_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/audio/transcriptions/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=\"source_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ts_level\"\r\n\r\nword\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"diarize\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.source_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."
}Transcription Price Calculation
Estimate the price of a transcription request. Provide one of: source_url, source_file, or duration_seconds.
curl --request POST \
--url https://api.deapi.ai/api/v2/audio/transcriptions/price \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'source_url=https://www.youtube.com/watch?v=jNQXAC9IVRw' \
--form model=WhisperLargeV3 \
--form include_ts=false \
--form ts_level=word \
--form include_metadata=false \
--form diarize=false \
--form lang=en \
--form 1.source_file='@example-file'import requests
url = "https://api.deapi.ai/api/v2/audio/transcriptions/price"
files = { "1.source_file": ("example-file", open("example-file", "rb")) }
payload = {
"source_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"model": "WhisperLargeV3",
"include_ts": "false",
"ts_level": "word",
"include_metadata": "false",
"diarize": "false",
"lang": "en"
}
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('source_url', 'https://www.youtube.com/watch?v=jNQXAC9IVRw');
form.append('model', 'WhisperLargeV3');
form.append('include_ts', 'false');
form.append('ts_level', 'word');
form.append('include_metadata', 'false');
form.append('diarize', 'false');
form.append('lang', 'en');
form.append('1.source_file', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.deapi.ai/api/v2/audio/transcriptions/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/audio/transcriptions/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=\"source_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ts_level\"\r\n\r\nword\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"diarize\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.source_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/audio/transcriptions/price"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ts_level\"\r\n\r\nword\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"diarize\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.source_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/audio/transcriptions/price")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ts_level\"\r\n\r\nword\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"diarize\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.source_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/audio/transcriptions/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=\"source_url\"\r\n\r\nhttps://www.youtube.com/watch?v=jNQXAC9IVRw\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ts_level\"\r\n\r\nword\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_metadata\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"diarize\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.source_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."
}source_url, source_file, or a bare duration_seconds.
ts_level: "word", diarize (which implies include_ts) and include_metadata can all raise the price. A quote that omits them comes in under what you are actually charged. include_ts on its own does not: segment-level timing is included in the base price.Quoting from duration_seconds
This mode never fetches the source, so it cannot see which platform the media comes from. On models that price per platform — and on TikTok, which is priced from a fixed length-band card rather than by the hour — pass platform alongside the duration:
curl -X POST "https://api.deapi.ai/api/v2/audio/transcriptions/price" \
-H "Authorization: Bearer $DEAPI_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"duration_seconds": 240,
"platform": "tiktok",
"model": "WhisperLargeV3Ct2",
"include_ts": true,
"ts_level": "word",
"include_metadata": true
}'
platform, the quote uses the model base rate with no duration-band rounding.
platform: "tiktok" is only valid with model: "WhisperLargeV3Ct2" — that is the only model that transcribes TikTok. Paired with any other model it is rejected with 422, the same way the job itself would be. See Audio/Video Transcription.What WhisperLargeV3Ct2 costs
The quote is built in three steps, in this order:
- Base amount — the TikTok length band for TikTok sources, otherwise the duration rate.
- Timestamps — segment-level timing is included in the base amount, so
include_ts: truewith the defaultts_level: "segment"does not change the quote. The base amount is multiplied by 1.5 only whents_levelisword, or whendiarizeis set — diarization carries the surcharge at any granularity,segmentincluded. - Metadata — if
include_metadatais set on a source that can return it, a flat0.005is added after the multiplication.
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
Transcription price calculation parameters
- From a source URL
- From an uploaded file
- From a known duration
Exactly ONE input source per request — source_url, source_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; with a URL or an upload the platform is derived from the source itself and passing it is rejected. Everything else (include_ts, ts_level, include_metadata, diarize, lang, model) applies to all three.
URL of video/audio to estimate price for. Mutually exclusive with source_file and duration_seconds; platform must NOT be sent with it, as it is derived from the URL.
"https://www.youtube.com/watch?v=jNQXAC9IVRw"
The model to use for transcription.
"WhisperLargeV3"
Should transcription include timestamps. Implied when diarize is true. Whether it raises the quote depends on ts_level — segment-level timing is included in the base price. Pass it exactly as you will pass it to POST /api/v2/audio/transcriptions.
false
Timestamp granularity. Validated against the model exactly as on POST /api/v2/audio/transcriptions, so a price quote is never returned for a combination the job request would reject. Granularity affects the price on models that price timestamps separately: segment is included in the base price, while word and char carry a surcharge.
segment, word, char, null "word"
Whether the job will be asked to attach source metadata. Carries a flat surcharge on models that price it, so pass it exactly as you will pass it to POST /api/v2/audio/transcriptions or the quote will come in under the amount charged. The surcharge applies only to sources that can actually return metadata: uploads always return null and are never charged for it. Every recognised platform, YouTube included, does return metadata and is charged the surcharge.
false
Label each timed unit with a detected speaker. Requires a model that supports diarization. Implies include_ts and carries the timestamp surcharge at ANY granularity, including segment.
false
Language hint for the transcription. Does not affect the price, but is validated against the model the same way as on the job request: a language outside a model's published info.limits.languages is rejected.
16"en"
Response
Calculated price for transcription.
Show child attributes
Show child attributes
Was this page helpful?