Detect the spoken language
Point us at any recording and we tell you what language is being spoken, without transcribing a single word. It exists for the moment before your pipeline can decide anything else: which model to route to, which team to notify, which subtitle track to open.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
Why a dedicated endpoint
Most transcription and translation services assume you already know the input language, or they burn a full pass just to guess it. That assumption breaks the moment your app accepts audio from the public: voicemail boxes, support hotlines, uploaded voice notes, podcast back-catalogs bought from other markets. audio.detect_language answers one narrow question fast and cheaply, so you are not paying full transcription cost just to route a file.
What happens after you upload
Send audio to POST /audio/detect-language and you get back a task_id immediately; the actual listening happens off the request thread. We sample the recording, run language identification against it, and return the result to your webhook or a signed link valid for 24 hours. Multi-speaker files, code-switching, background noise and low-bitrate calls are all things the model has to contend with, so we return what it is confident about rather than forcing a single guess when a recording is genuinely mixed.
A quick note on how language ID works
Spoken-language identification is a distinct discipline from speech recognition: it looks at phoneme distributions, prosody and acoustic patterns rather than trying to map sound to words. That is why it can work on very short clips and noisy audio where a full transcript would be unreliable, and why it is dramatically cheaper per minute than transcription or translation.
Where it slots into automation
Chain it in front of any of our other audio endpoints: detect first, then branch your workflow to the correct transcription language, translation target, or human reviewer queue. Support platforms use it to tag inbound voice tickets by language before assigning agents; media pipelines use it to sort archives before deciding which ones need translation budget at all.
Built for volume, not guesswork
Because the task is narrow, it is fast and it is cheap, which matters when you are running it across thousands of files rather than one. Every call is billed only on success — a failed detection after three retries is never charged, and you get a clear error instead of a mystery.
What you can do with it
Voicemail triage
A call center routes anonymous voicemail drops to the right language desk before anyone listens, cutting misrouted tickets.
Podcast archive sorting
A media company inherits a back-catalog with no metadata and uses detection to tag thousands of episodes by spoken language in one batch.
Pre-translation gating
An app only sends audio to the translate endpoint when detection confirms it is not already in the target language, avoiding wasted calls.
Compliance logging
A financial services firm logs the detected language of recorded calls alongside the transcript for regional regulatory review.
FAQ
How do I detect the language of an audio file with the API?
Send the file to POST /audio/detect-language, store the returned task_id, and receive the detected language by webhook or a signed link valid for 24 hours.
Is there a free plan for the language detection API?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
What audio formats are accepted?
Common compressed and uncompressed formats used for voice and calls are accepted; check the endpoint reference for the current list before integrating.
How much does audio language detection cost?
It is priced at $0.002 per request plus $0.0055 per minute of audio, billed only when the task succeeds.
Can it detect more than one language in the same recording?
Yes, code-switched or multi-speaker audio is common, and the response can reflect more than one language when the recording genuinely contains more than one.
How is this different from transcription?
Detection identifies the spoken language without producing text, which makes it faster and far cheaper per minute than a full transcript.
Can I run it on very short clips?
Yes, language identification works on short samples because it relies on acoustic and prosodic patterns rather than full sentence context.
Is my audio used to train models?
No. Audio and results are deleted after the retention window and are never used for training.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/audio/detect-language \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"audio":"https://ejemplo.com/audio.mp3"}'const res = await fetch("https://api.kit.forhosting.com/audio/detect-language", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"audio": "https://ejemplo.com/audio.mp3"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/audio/detect-language",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"audio": "https://ejemplo.com/audio.mp3"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/audio/detect-language", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"audio":"https://ejemplo.com/audio.mp3"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"audio":"https://ejemplo.com/audio.mp3"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/audio/detect-language", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"audio": "https://ejemplo.com/audio.mp3"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "audio.detect_language",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 200 |
max_minutes | 180 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
422 | task_failed | The task failed after 3 retries. You are never charged for it. |