Lahjaلهجة
Arabic mode for AI apps

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.

Try it

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.

Dialect match, out of 5
plain → Arabic mode
Stops placed by longitude, Rabat 6.8°W to Doha 51.5°E. MSA is the shared standard, so it sits off the line.

The full board

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.

Same message, both ways

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.

Customer · Gulf

واجد غالي بالنسبة لي. ما تقدر ترخصه؟

"It's too expensive for me. Can't you make it cheaper?"

gpt-oss-120b · plain

أفهم رغبتك في الحصول على سعر أفضل، لكن للأسف لا يمكنني تعديل الأسعار أو تقديم خصومات إضافية. إذا كان لديك أي سؤال آخر حول المنتج أو طريقة الشحن أو أي استفسار آخر، فأنا هنا لمساعدتك!

Formal Modern Standard Arabic. Judge: 1 of 5 on dialect.

gpt-oss-120b · Arabic mode

أبشر، السعر ثابت وما فيه خصم إضافي. إذا عندك أي سؤال ثاني أو تبي تفاصيل عن المنتج، أنا حاضر!

Gulf Arabic ("أبشر", "تبي", "ثاني"). Judge: 5 of 5.

Use it

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>"}]
  }'
  • OpenAI-compatible, so existing SDKs work by changing the base URL.
  • Add :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).
  • Streaming and tool calls work as usual.

Get a key

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.

Your users speak (optional)

How we measured

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.