Skip to main content
POST
/
api
/
v2
/
audio
/
transcriptions
cURL
curl --request POST \
  --url https://api.deapi.ai/api/v2/audio/transcriptions \
  --header 'Accept: <accept>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form include_ts=true \
  --form model=WhisperLargeV3 \
  --form 'source_url=https://www.youtube.com/watch?v=jNQXAC9IVRw' \
  --form source_file='@example-file' \
  --form return_result_in_response=false \
  --form webhook_url=https://your-server.com/webhooks/deapi \
  --form webhook_secret=a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5
import requests

url = "https://api.deapi.ai/api/v2/audio/transcriptions"

files = { "source_file": ("example-file", open("example-file", "rb")) }
payload = {
"include_ts": "true",
"model": "WhisperLargeV3",
"source_url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"return_result_in_response": "false",
"webhook_url": "https://your-server.com/webhooks/deapi",
"webhook_secret": "a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5"
}
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('include_ts', 'true');
form.append('model', 'WhisperLargeV3');
form.append('source_url', 'https://www.youtube.com/watch?v=jNQXAC9IVRw');
form.append('source_file', '<string>');
form.append('return_result_in_response', 'false');
form.append('webhook_url', 'https://your-server.com/webhooks/deapi');
form.append('webhook_secret', 'a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5');

const options = {method: 'POST', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};

options.body = form;

fetch('https://api.deapi.ai/api/v2/audio/transcriptions', 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",
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=\"include_ts\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----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=\"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=\"return_result_in_response\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\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"

payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----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=\"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=\"return_result_in_response\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\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")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_ts\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----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=\"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=\"return_result_in_response\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001--")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.deapi.ai/api/v2/audio/transcriptions")

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=\"include_ts\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model\"\r\n\r\nWhisperLargeV3\r\n-----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=\"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=\"return_result_in_response\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://your-server.com/webhooks/deapi\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_secret\"\r\n\r\na1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
{
  "data": {
    "request_id": "c08a339c-73e5-4d67-a4d5-231302fbff9a"
  }
}
{
"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."
}
Unified transcription endpoint that replaces the five v1 endpoints (vid2txt, aud2txt, videofile2txt, audiofile2txt, transcribe). Accepts URLs or multipart file uploads. Returns a request_id for status polling.
Source detection is automatic: pass a public video_url / audio_url, or upload a file via multipart form-data.
Prerequisite: Consult the Model Selection endpoint to identify a valid model slug and check supported languages.
OpenAI SDK users: This endpoint is also available via the OpenAI-compatible surface as POST /v1/audio/transcriptions at https://oai.deapi.ai/v1. Maximum file size per upload is 20 MB for audio and 50 MB for video, subject to a global 75 MB request body cap. See OpenAI Compatibility and Limits & Quotas.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Accept
enum<string>
default:application/json
required
Available options:
application/json

Body

multipart/form-data

Transcription parameters. Provide exactly one of source_url or source_file.

include_ts
boolean
required

Should transcription include timestamps

model
string
required

The model to use for transcription. Available models can be retrieved via the GET /api/v1/client/models endpoint.

Example:

"WhisperLargeV3"

source_url
string

URL of video/audio to transcribe (YouTube, Twitter/X, Twitch, Kick, TikTok, Twitter Spaces). Mutually exclusive with source_file.

Example:

"https://www.youtube.com/watch?v=jNQXAC9IVRw"

source_file
file

Audio or video file to transcribe. Supported audio: aac, mpeg, ogg, wav, webm, flac. Supported video: mp4, mpeg, quicktime, avi, wmv, ogg. Mutually exclusive with source_url.

return_result_in_response
boolean | null
default:false

If true, the result will be returned directly in the response instead of only download url.

webhook_url
string<uri> | null

Optional HTTPS URL to receive webhook notifications for job status changes.

Maximum string length: 2048
Example:

"https://your-server.com/webhooks/deapi"

webhook_secret
string | null

Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. When present, overrides the account-default webhook secret. Requires webhook_url to also be set.

Required string length: 32 - 255
Example:

"a1b2c3d4e5f60708091a2b3c4d5e6f7081920a1b2c3d4e5f60708091a2b3c4d5"

Response

ID of the inference request.

data
object

Information from success endpoint