We gave four open AI models 200 messages written by native speakers in five varieties of Arabic, then checked whether each reply came back in the user's own dialect. Arabic mode is one setting in our API that tells the model which dialect to answer in.
Type a message the way your users write it. You get two replies from the same model: as most apps call it today, and with Arabic mode on.
Each model twice: as most apps call it today, and with Arabic mode on. Dialect columns are 1–5. "In dialect" is the share of dialect messages answered in that dialect rather than formal Arabic.
A shopper in the Gulf asks for a discount. The plain model answers in formal Arabic. With Arabic mode it answers like a shop assistant in Doha or Riyadh would.
واجد غالي بالنسبة لي. ما تقدر ترخصه؟
"It's too expensive for me. Can't you make it cheaper?"
أفهم رغبتك في الحصول على سعر أفضل، لكن للأسف لا يمكنني تعديل الأسعار أو تقديم خصومات إضافية. إذا كان لديك أي سؤال آخر حول المنتج أو طريقة الشحن أو أي استفسار آخر، فأنا هنا لمساعدتك!
Formal Modern Standard Arabic. Judge: 1 of 5 on dialect.
أبشر، السعر ثابت وما فيه خصم إضافي. إذا عندك أي سؤال ثاني أو تبي تفاصيل عن المنتج، أنا حاضر!
Gulf Arabic ("أبشر", "تبي", "ثاني"). Judge: 5 of 5.
curl https://api.lahja.dev/v1/chat/completions \
-H "Authorization: Bearer $LAHJA_KEY" \
-d '{
"model": "google/gemma-4-31b-it:arabic-gulf",
"messages": [{"role": "user",
"content": "<your user's message>"}]
}'
:arabic-gulf, -egy, -lev, -mag or -msa to the model name. If you don't know your users' dialect, :arabic detects it per message (less accurate than telling us).Free trial: 1 million tokens, no card. The key appears on this page right away. We'll publish pricing before the trial ends, and nothing is ever charged without your OK.
The first call after a quiet spell can take about two minutes while the model starts. You'll get a 503 with Retry-After; retry and it answers.
Messages: 40 sentences per variety from the MADAR corpus (CAMeL Lab, NYU Abu Dhabi), written by native translators for Rabat, Cairo, Beirut, Doha and Modern Standard Arabic. Each variety uses different sentences.
Grading: every reply was scored blind by Claude Opus 5.5 on three 1–5 scales (dialect match, fluency, helpfulness) and labelled by language. No human ratings yet; native-speaker review is next.
Limits: MADAR sentences are short travel and shopping lines, so helpfulness scores run lower than on full requests. Four models, one date: . Models were called through public APIs at temperature 0.3.