Skip to content
POST
https://api.voice213.com/api/v1/stt
curl -X POST https://api.voice213.com/api/v1/stt \
  -H "Authorization: Bearer $VOICE213_API_KEY" \
  -F "file=@call.mp3" \
  -F "language=ar" \
  -F "dialect=algerian" \
  -F "speakers=true"
{
  "success": true,
  "text": "السلام عليكم خويا، راني نعيطلك على la commande اللي درتها نهار الخميس. وصلتني اليوم الصباح مع le livreur، بصح الصباط جا صغير شوية عليا. واش نقدر نبدلو؟ ونحب نعرف إذا لازم نخلص la livraison مرة أخرى ولا لا. ردلي خبر كي تشوف le message، يعطيك الصحة.",
  "model": "khasbha-stt",
  "language": "ar",
  "dialect": "algerian",
  "durationSeconds": 31.48,
  "billableSeconds": 32,
  "cost": 1.6,
  "currency": "DZD",
  "remainingCredit": 4998.4
}

Turns an audio or video file into text with KhasbhaSTT, in Algerian, Tunisian or Libyan darija, French or English. Upload the file as multipart/form-data, or send the address of a file that's already online as JSON:

{
  "url": "https://cdn.example.com/calls/2026-11-20-1432.mp3",
  "language": "ar",
  "dialect": "algerian",
  "speakers": true
}

The transcript comes back in the response, with the seconds billed and what they cost. There's no endpoint to fetch a transcript again later, so keep the text you receive. A long file can take a few minutes to upload and transcribe: the SDKs in the examples wait up to 10 minutes for the answer. With another HTTP client, set a timeout of 10 minutes too; in Node.js, the built-in fetch stops waiting after 5. See KhasbhaSTT for a guide with examples of every option.

This endpoint transcribes recordings. For live audio, use KhasbhaSTT LIVE: create a session with Create a Live Token. Sending "model": "khasbha-stt-live" here gets 400 WRONG_MODEL.

​Pricing

ModelmodelPer minutePer hourBilling
KhasbhaSTTkhasbha-stt3 DA180 DAPer second, at least 30 seconds per file
KhasbhaSTT LIVEkhasbha-stt-live5 DA300 DAPer second, at least 15 seconds per session
  • A file is billed for the length of its audio, silences included, per second, rounded up to the whole second, and at least 30 seconds: a 12-second voice note costs the same as a 30-second one.
  • While the file is transcribed, its price is set aside from your API credit. It's charged when the transcription succeeds, and released when it fails: a failed transcription costs nothing. See Several files at once.
  • A file with no speech is still billed, since its audio was processed, and its text is empty.
  • A file over 30 minutes, or one without audio, is refused before anything is set aside or charged.

To know the price before you send a file, send its length to Estimate Transcription Cost. It's free. See API Pricing & Limits for worked examples.

Authorizations

Authorizationstringrequired

Your API key as a Bearer token: Bearer sk_live_.... You can send it in an x-api-key header instead. See Authentication.

Body

multipart/form-data
filefilerequired

The recording: an audio or video file of up to 100 MB and 30 minutes of audio, such as MP3, WAV, M4A, AAC, OGG or Opus (WhatsApp voice notes), AMR, FLAC, WebM, MP4, MOV, MKV or AVI. A video's sound is transcribed. Keep the file name's extension, such as call.mp3: it helps Voice213 recognize the format. A larger file gets 413 FILE_TOO_LARGE, a longer one 400 AUDIO_TOO_LONG, and one without any audio Voice213 can read 400 INVALID_MEDIA. Send one file, in this field. Required, unless you send a url as JSON instead.

modelstringdefault: khasbha-stt

The model: khasbha-stt, KhasbhaSTT. Capitalization doesn't matter, and its name, KhasbhaSTT, works too. khasbha-stt-live streams over a socket instead and gets 400 WRONG_MODEL, and any other value 400 UNKNOWN_MODEL, which lists the models. See List STT Models.

languageenum<string>default: ar

The language of the recording: ar (Arabic, darija included), fr (French) or en (English), in any capitalization. Any other value gets 400 INVALID_LANGUAGE. See Languages and dialects.

dialectenum<string>default: algerian

The Arabic dialect the transcription is tuned for: algerian, tunisian or libyan, in any capitalization. It's used only with language ar: with fr or en it's ignored, and the response's dialect is null. Any other value, the numbers 1, 2 and 3 included, gets 400 INVALID_DIALECT.

speakersboolean

How the people speaking are told apart. Not set: each change of speaker starts a new line beginning with - . true: each line starts with the speaker's number, «المتحدث 1:» in Arabic, Speaker 1: in English and Intervenant 1: in French, the same number for the same person throughout. false: one continuous text, without line breaks. A recording with a single voice comes without dashes or labels.

punctuationbooleandefault: true

With true, the transcript has simple punctuation where the speech pauses: commas, full stops and question marks. false leaves punctuation out.

profanitybooleandefault: false

true replaces swear words and slurs with ***, and leaves the rest of the sentence as it was said.

In a multipart form, every value is text: send true or false for speakers, punctuation and profanity. In a JSON body, booleans work too. Any other value gets 400 INVALID_OPTION, with the field's name in field. A field left empty takes its default.

Body: a file at a URL

application/json
urlstringrequired

The address of an audio or video file, instead of uploading it: a public http:// or https:// URL of the file itself, not of a page that plays it. Voice213 downloads it, following redirects, and it must be 100 MB or smaller and arrive within 60 seconds. An address that isn't a public http(s) URL, such as one on a private network or whose host doesn't exist, gets 400 INVALID_URL; a file that can't be downloaded in time, or whose server answers with an error, 400 FETCH_FAILED; a file over 100 MB, 413 FILE_TOO_LARGE. Send the other fields in the same JSON body, with the same rules: model, language, dialect, speakers, punctuation and profanity.

Response

application/json
successbooleanrequired

true.

textstringrequired

The transcript, word for word: darija in Arabic script without tashkeel, French and English words in Latin letters, and speakers laid out as speakers asked, with lines separated by \n. An empty string when the recording has no speech.

modelstringrequired

khasbha-stt.

languagestringrequired

The language the recording was transcribed as: ar, fr or en.

dialectstring | nullrequired

The dialect, such as algerian, or null when language isn't ar.

durationSecondsnumberrequired

The length of the audio in seconds, to two decimals, as Voice213 measured it.

billableSecondsnumberrequired

The seconds billed: durationSeconds rounded up to the whole second (a remainder of 0.05 s or less isn't counted), or 30 when that's lower.

costnumberrequired

What the transcription cost, in dinars: billableSeconds × the price per minute ÷ 60, rounded to four decimals.

currencystringrequired

DZD.

remainingCreditnumberrequired

Your API credit after the transcription, in dinars.

​What the transcript looks like

  • Word for word. Hesitations and repeated words stay in. Nothing is rephrased, summarized, corrected or translated into Modern Standard Arabic.
  • In the speaker's own words and script. Darija is in Arabic script, spelled as it's pronounced, without tashkeel. French and English words inside Arabic speech are in Latin letters, and Arabic words inside French or English speech in Arabic script.
  • Only speech. Music, laughter and silence aren't described, so there are no notes such as [musique] in the text.

See What the transcript looks like for examples.

​Several files at once

Your account can have 20 requests running at the same time, transcriptions and voice-overs together, whichever of its keys sent them. A transcription runs from the moment Voice213 accepts it until its transcript is ready or it fails, even if your client stopped waiting. Once 20 are running, the next request gets 429 Rate limit exceeded: Concurrent request limit exceeded: retry when one of them has ended. See Rate Limits.

Each running transcription also sets its price aside from your API credit until it's charged (when it succeeds) or released (when it fails). A transcription that arrives while others run is refused with 402 INSUFFICIENT_CREDIT when what's left after them can't cover it. The balance in that 402 is your API credit less what the others have set aside. See Insufficient API credit.

Errors

StatusErrorWhen
400MISSING_FILEThe request has no file in the file field and no url, sent a file in another field or more than one file, or its form was cut short.
400INVALID_MEDIAVoice213 couldn't read any audio in the file: it has no audio track, it's damaged, or it isn't an audio or video file.
400AUDIO_TOO_LONGThe audio is over 30 minutes. The body has maxDurationSeconds and the recording's durationSeconds. Nothing is charged.
400UNKNOWN_MODELmodel isn't a speech-to-text model. The body lists the models.
400WRONG_MODELmodel is khasbha-stt-live, which streams over a socket: create a session with POST /stt/live/token.
400INVALID_LANGUAGElanguage isn't ar, fr or en. The body lists the languages.
400INVALID_DIALECTdialect isn't algerian, tunisian or libyan. The body lists the dialects.
400INVALID_OPTIONspeakers, punctuation or profanity isn't true or false, or the form has too many fields or one too long. The body names the field.
400INVALID_URLurl isn't a public http:// or https:// address: not a URL, a host that doesn't exist, or one on a private network.
400FETCH_FAILEDThe file at url couldn't be downloaded within 60 seconds, or its server answered with an error, whose HTTP status is in status.
401Missing API key. Pass it as 'Authorization: Bearer sk_live_...'The request has no key.
401Invalid or inactive API keyThe key is wrong, switched off or deleted.
402INSUFFICIENT_CREDITYour API credit, less what your other running requests have set aside, can't cover the transcription. A balance below the price of the shortest file, 1.50 DA, is refused before the file is read. The body has required and balance.
403Account deactivatedThe account that owns the key is deactivated or suspended.
403API_ACCESS_BLOCKED (in code)API access is switched off for the account.
413FILE_TOO_LARGEThe file is over 100 MB, uploaded or at url. The body has maxFileMB.
429Rate limit exceeded: RPM limit exceeded or Rate limit exceeded: Daily limit exceededYour account's requests per minute or per day, all its keys together.
429Rate limit exceeded: Concurrent request limit exceededYour account already has 20 requests running. Retry when one of them ends.
500INTERNAL_ERRORSomething went wrong on our side after the transcription was charged.
502TRANSCRIPTION_FAILEDThe transcription failed. Retry. Nothing was charged.
503TOOL_DISABLED (in code)Speech to text through the API is paused (tool is stt_api), or every paid request of the API is (public_api). Retry later.
503MAINTENANCE (in code)The API is down for maintenance. Retry later.

Errors from this endpoint carry a code in error and an English sentence in message, except the key errors (401, 403, 429) and the 503s, which keep the shapes every endpoint uses. See Errors for the full list.

Was this page helpful?