Estimate the price of a synchronous transcription
curl --request POST \
--url https://api.deapi.ai/api/v2/audio/transcriptions/sync/price \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form model=FluidSpeechPro \
--form source_file=@example-file \
--form duration_seconds=11import requests
url = "https://api.deapi.ai/api/v2/audio/transcriptions/sync/price"
files = { "source_file": ("example-file", open("example-file", "rb")) }
payload = {
"model": "FluidSpeechPro",
"duration_seconds": "11"
}
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('model', 'FluidSpeechPro');
form.append('source_file', '<string>');
form.append('duration_seconds', '11');
const options = {method: 'POST', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.deapi.ai/api/v2/audio/transcriptions/sync/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/sync/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=\"model\"\r\n\r\nFluidSpeechPro\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"duration_seconds\"\r\n\r\n11\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/sync/price"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nFluidSpeechPro\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"duration_seconds\"\r\n\r\n11\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/sync/price")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nFluidSpeechPro\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"duration_seconds\"\r\n\r\n11\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v2/audio/transcriptions/sync/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=\"model\"\r\n\r\nFluidSpeechPro\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"duration_seconds\"\r\n\r\n11\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"price": 0.0044
}
}{
"message": "<string>",
"errors": {},
"code": "missing_key"
}{
"message": "The selected model does not support Text To Image.",
"code": "insufficient_balance",
"errors": {
"model": [
"This model is not available on your plan. Please upgrade to access it."
]
}
}{
"message": "Too Many Attempts."
}Audio
Synchronous Transcription Price Calculation
The price POST /api/v2/audio/transcriptions/sync would charge, from the audio file itself or from a declared duration_seconds. Same pricing as the call. Model: FluidSpeechPro.
POST
/
api
/
v2
/
audio
/
transcriptions
/
sync
/
price
Estimate the price of a synchronous transcription
curl --request POST \
--url https://api.deapi.ai/api/v2/audio/transcriptions/sync/price \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form model=FluidSpeechPro \
--form source_file=@example-file \
--form duration_seconds=11import requests
url = "https://api.deapi.ai/api/v2/audio/transcriptions/sync/price"
files = { "source_file": ("example-file", open("example-file", "rb")) }
payload = {
"model": "FluidSpeechPro",
"duration_seconds": "11"
}
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('model', 'FluidSpeechPro');
form.append('source_file', '<string>');
form.append('duration_seconds', '11');
const options = {method: 'POST', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.deapi.ai/api/v2/audio/transcriptions/sync/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/sync/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=\"model\"\r\n\r\nFluidSpeechPro\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"duration_seconds\"\r\n\r\n11\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/sync/price"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nFluidSpeechPro\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"duration_seconds\"\r\n\r\n11\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/sync/price")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nFluidSpeechPro\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"duration_seconds\"\r\n\r\n11\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deapi.ai/api/v2/audio/transcriptions/sync/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=\"model\"\r\n\r\nFluidSpeechPro\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"source_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"duration_seconds\"\r\n\r\n11\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"price": 0.0044
}
}{
"message": "<string>",
"errors": {},
"code": "missing_key"
}{
"message": "The selected model does not support Text To Image.",
"code": "insufficient_balance",
"errors": {
"model": [
"This model is not available on your plan. Please upgrade to access it."
]
}
}{
"message": "Too Many Attempts."
}Get the price Synchronous Transcription would charge for a clip, before sending it.
Quote from exactly one of two inputs:
Timestamps do not change the price, so the quote takes no
source_file— the audio file itself, measured the same way the transcription call measures it. The same limits apply: up to 60 seconds and 16 MiB.duration_seconds— the clip length (0.1–60), without uploading anything.
422. The model is FluidSpeechPro, the same as on the transcription call.
curl -X POST "https://api.deapi.ai/api/v2/audio/transcriptions/sync/price" \
-H "Authorization: Bearer $DEAPI_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"model": "FluidSpeechPro",
"duration_seconds": 11
}'
{
"data": {
"price": 0.0044
}
}
include_ts or ts_level.Authorizations
Body
multipart/form-data
The model and either the audio file or its length.
Exactly ONE of source_file or duration_seconds: sending both is a 422.
Was this page helpful?