cURL
curl --request POST \
--url https://api.transcribetube.com/api/transcribeVideo \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"language": "en",
"webhookUrl": "http://example.com/webhook",
"youtubeVideoId": "dQw4w9WgXcQ"
}
'import requests
url = "https://api.transcribetube.com/api/transcribeVideo"
payload = {
"language": "en",
"webhookUrl": "http://example.com/webhook",
"youtubeVideoId": "dQw4w9WgXcQ"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
language: 'en',
webhookUrl: 'http://example.com/webhook',
youtubeVideoId: 'dQw4w9WgXcQ'
})
};
fetch('https://api.transcribetube.com/api/transcribeVideo', 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.transcribetube.com/api/transcribeVideo",
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([
'language' => 'en',
'webhookUrl' => 'http://example.com/webhook',
'youtubeVideoId' => 'dQw4w9WgXcQ'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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.transcribetube.com/api/transcribeVideo"
payload := strings.NewReader("{\n \"language\": \"en\",\n \"webhookUrl\": \"http://example.com/webhook\",\n \"youtubeVideoId\": \"dQw4w9WgXcQ\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
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.transcribetube.com/api/transcribeVideo")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"language\": \"en\",\n \"webhookUrl\": \"http://example.com/webhook\",\n \"youtubeVideoId\": \"dQw4w9WgXcQ\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.transcribetube.com/api/transcribeVideo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"language\": \"en\",\n \"webhookUrl\": \"http://example.com/webhook\",\n \"youtubeVideoId\": \"dQw4w9WgXcQ\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"projectId": "f3c1e7a0-2b48-4a91-8a30-9b1c2d3e4f50"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Transcription
Transcribe YouTube Video
This API endpoint allows users to submit a YouTube video ID along with language preference and a webhook URL. Upon submission, the system processes the request and sends a POST request to the provided webhook URL with project details with transcription.
POST
/
api
/
transcribeVideo
cURL
curl --request POST \
--url https://api.transcribetube.com/api/transcribeVideo \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"language": "en",
"webhookUrl": "http://example.com/webhook",
"youtubeVideoId": "dQw4w9WgXcQ"
}
'import requests
url = "https://api.transcribetube.com/api/transcribeVideo"
payload = {
"language": "en",
"webhookUrl": "http://example.com/webhook",
"youtubeVideoId": "dQw4w9WgXcQ"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
language: 'en',
webhookUrl: 'http://example.com/webhook',
youtubeVideoId: 'dQw4w9WgXcQ'
})
};
fetch('https://api.transcribetube.com/api/transcribeVideo', 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.transcribetube.com/api/transcribeVideo",
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([
'language' => 'en',
'webhookUrl' => 'http://example.com/webhook',
'youtubeVideoId' => 'dQw4w9WgXcQ'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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.transcribetube.com/api/transcribeVideo"
payload := strings.NewReader("{\n \"language\": \"en\",\n \"webhookUrl\": \"http://example.com/webhook\",\n \"youtubeVideoId\": \"dQw4w9WgXcQ\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
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.transcribetube.com/api/transcribeVideo")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"language\": \"en\",\n \"webhookUrl\": \"http://example.com/webhook\",\n \"youtubeVideoId\": \"dQw4w9WgXcQ\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.transcribetube.com/api/transcribeVideo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"language\": \"en\",\n \"webhookUrl\": \"http://example.com/webhook\",\n \"youtubeVideoId\": \"dQw4w9WgXcQ\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"projectId": "f3c1e7a0-2b48-4a91-8a30-9b1c2d3e4f50"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Submit a YouTube video for transcription. The request returns immediately with a
projectId; the actual transcription runs in the background — see Lifecycle & Polling.
Request
| Field | Type | Required | Description |
|---|---|---|---|
youtubeVideoId | string | yes | The YouTube video ID (the v= parameter, e.g. dQw4w9WgXcQ). |
webhookUrl | string | yes | HTTP(S) URL we POST to when transcription completes. See Webhooks. |
language | string | no | BCP-47 language code (en, tr, de, …). Defaults to auto-detect. |
Credit is deducted at request time based on the video’s reported length: 1 credit per minute (rounded down, minimum 1). If the YouTube video is unavailable or private, the request fails before any credit is consumed.
Examples
curl -X POST https://api.transcribetube.com/api/transcribeVideo \
-H "api-key: $TRANSCRIBETUBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"youtubeVideoId": "dQw4w9WgXcQ",
"language": "en",
"webhookUrl": "https://yourapp.com/hooks/transcribetube"
}'
const res = await fetch("https://api.transcribetube.com/api/transcribeVideo", {
method: "POST",
headers: {
"api-key": process.env.TRANSCRIBETUBE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
youtubeVideoId: "dQw4w9WgXcQ",
language: "en",
webhookUrl: "https://yourapp.com/hooks/transcribetube",
}),
});
const { projectId } = await res.json();
import os, requests
res = requests.post(
"https://api.transcribetube.com/api/transcribeVideo",
headers={"api-key": os.environ["TRANSCRIBETUBE_API_KEY"]},
json={
"youtubeVideoId": "dQw4w9WgXcQ",
"language": "en",
"webhookUrl": "https://yourapp.com/hooks/transcribetube",
},
)
project_id = res.json()["projectId"]
Response
201 Created:
{
"success": true,
"projectId": "f3c1e7a0-2b48-4a91-8a30-9b1c2d3e4f50"
}
Errors
| Status | Body | When |
|---|---|---|
| 400 | Validation error | youtubeVideoId or webhookUrl missing/invalid. |
| 401 | Missing api-key | Header not provided or invalid. |
| 402 | NOT_ENOUGH_CREDIT | Subscription has fewer credits than the video length requires. |
| 404 | Video not found | YouTube returned no item for the supplied ID (private, deleted, or wrong ID). |
What happens next
- Project is created in
uploadstate. - We download the video, then transcribe its audio.
- State moves to
transcription, then todone. - If you supplied
webhookUrl, we POST the result to it. Either way,GET /api/detail/{id}will return the full transcription once state isdone.
Authorizations
Body
application/json

