Integration guides · 2026-10-17

Transcribing Arabic recordings through an API: Jais ASR

Transcribe Arabic and dialect speech with ifm/jais-asr: base64 audio in a JSON body, wav/mp3/flac/ogg, a 15-minute limit, free until 5 November 2026.

Simple diagram: an Arabic recording goes to ifm/jais-asr at https://llmtr.com/v1 and Arabic text with a dialect code comes back.

Short answer: send the audio base64-encoded in a JSON body

LLMTR is a gateway that gives access to language models from different providers through one OpenAI-compatible API. You call Jais ASR there with the model id ifm/jais-asr on the /v1/audio/transcriptions endpoint at https://llmtr.com/v1. The audio file travels base64-encoded in the request body, in the audio_base64 field; the OpenAI SDK's file upload call does not work on this endpoint.

In its model card, IFM describes Jais ASR as a speech recognition model built for Arabic as it is spoken: Modern Standard Arabic and the dialects of 19 Arab countries. The model was released alongside the Jais 3 family that IFM and Inception42 announced on 15 October 2026. Every transcript comes with the recognised language or dialect label.

How do you transcribe an Arabic recording through an API?

Create an API key on LLMTR and keep it in the LLMTR_API_KEY environment variable. The Python example below reads an mp3 file, encodes it as base64 and sends it as JSON to /v1/audio/transcriptions with requests. It asks for verbose_json as the response_format; next to the transcript, the response carries the language, duration, no_speech and truncated fields.

language is the recording's recognised language: msa for Modern Standard Arabic, a country code for a dialect (such as EG, MA or SA), or a language code such as en for a recording that is not Arabic. If the recording has no speech, no_speech comes back true and text is empty; the example handles that case separately. If truncated is true, the transcript ended before the end of the recording.

The example catches the 429 response that arrives when the daily audio allowance is used up, and prints the Retry-After header. A large audio file can take a few seconds to answer; set the client's timeout accordingly.

A Python requests example that sends an mp3 recording base64-encoded to ifm/jais-asr in a JSON body, prints the language, duration and transcript from the verbose_json response and handles a recording without speech separately.

import base64
import os

import requests

with open("recording.mp3", "rb") as f:
    audio_b64 = base64.b64encode(f.read()).decode("ascii")

response = requests.post(
    "https://llmtr.com/v1/audio/transcriptions",
    headers={"Authorization": "Bearer " + os.environ["LLMTR_API_KEY"]},
    json={
        "model": "ifm/jais-asr",
        "audio_base64": audio_b64,
        "audio_format": "mp3",
        "response_format": "verbose_json",
    },
    timeout=300,
)
if response.status_code == 429:
    print("Daily audio allowance reached, Retry-After:", response.headers.get("Retry-After"))
    raise SystemExit(1)
response.raise_for_status()

result = response.json()
if result["no_speech"]:
    print("No speech in this recording.")
else:
    print(result["language"], round(result["duration"], 1), "s")
    print(result["text"])

Request fields and limits

The table shows the request's fields and the model's limits. An unsupported format or language code returns 400 before the request reaches the model. prompt and file_id are not used on this model.

ifm/jais-asr on LLMTR, as of 17 October 2026
Field or limitValue
Endpoint/v1/audio/transcriptions (JSON body)
audio_formatwav, mp3, flac, ogg (m4a and webm are not accepted)
languagear, msa, 19 country codes, or en, fr, es, it; detected if omitted
diacriticstrue adds Arabic vowel marks
code_switchtrue keeps English, French, Spanish and Italian words in their own script
response_formatjson (default), text, verbose_json
Recording lengthat most 15 minutes
Daily allowance60 minutes of audio, free until 5 November 2026, 23:59 (TRT)

Long recordings and file format

One request can carry about 9 MB of audio. Sending a 15-minute recording as wav can exceed that; compress it to mp3 or ogg, and bring it down to mono and 16 kHz if needed. Split recordings longer than 15 minutes at quiet moments, send the parts in separate requests and join the transcripts in order.

If you know the recording's language, set it in the language field; for example EG for the Egyptian dialect. If you leave the field out, the language is detected and the result comes back in the language field. For readability, add diacritics true if you want Arabic vowel marks.

Error cases and retrying

400 invalid_request says the request carries a value that is not accepted: a format such as m4a or webm, a language code that is not on the list, an audio file that cannot be decoded, or a prompt field. 400 unsupported_input comes back when file_id is sent. 413 says the recording is longer than 15 minutes; split it. Do not repeat the request without fixing it after these errors.

429 comes in two cases. If Retry-After is a few seconds, the short-term request limit is full; wait that long and repeat the same request. If Retry-After is measured in hours, the daily audio allowance is used up; continue after 00:00 (TRT). 503 model_unavailable reports a temporary problem; if Retry-After is present, try again after that time.

If you pass the transcript to a language model in the next step, for example to Jais 3 for a summary or classification, send the language label along with it. That way the model knows which dialect the text is in.

Free period, daily allowance and the data note

Jais ASR is free until 5 November 2026, 23:59 (TRT), and every account has an allowance of 60 minutes of audio a day; this allowance is separate from the chat models' token allowance. A recording longer than the minutes left is refused before it is sent. When the allowance is used up the API returns 429, the Retry-After header tells you when you can try again, and the allowance renews at 00:00 (TRT). From 6 November 2026, 00:00 the model returns 410 model_retired.

According to the data note on the LLMTR model page, recordings and transcripts may be logged by the provider and used to improve the model. Do not send recordings that contain sensitive, personal or customer data. LLMTR does not write audio or transcript content to the usage log; the log keeps the audio duration.

Transcribe an Arabic recording with Jais ASR

Encode the recording as base64, send it in a JSON body with ifm/jais-asr and read the transcript and language from the verbose_json response.

  1. Prepare the recording. Prepare the recording as wav, mp3, flac or ogg; split it if it is longer than 15 minutes and compress it to mp3 or ogg if it is large.
  2. Request. Encode the file as base64, put it in the audio_base64 field and send it as JSON to https://llmtr.com/v1/audio/transcriptions with the model ifm/jais-asr.
  3. Read the response. Read the text, language and duration fields from the verbose_json response; if no_speech is true, treat the recording as having no speech.

Frequently asked questions

Can I upload a file to Jais ASR with the OpenAI SDK?

No. LLMTR's /v1/audio/transcriptions endpoint takes the audio base64-encoded in a JSON body, in the audio_base64 field. A file upload (multipart) call does not work on this endpoint.

Which audio formats does Jais ASR accept?

wav, mp3, flac and ogg. m4a and webm are not accepted. A recording can be at most 15 minutes long.

What comes back if the recording has no speech?

The verbose_json response returns no_speech true and an empty text, and the language field is null. The model does not invent text for a silent recording.

Related posts