Patent pending · USPTO provisional application 64/021,845

How Lebanon actually speaks.

The Lebanese-dialect language model, as an API. Typed in Arabizi, Arabic script, English or French. Understood in full.

Input, Arabizi
shu3amta3mel
Same input, Arabic script
شو عم تعمل
English
What are you doing?
MSA
ماذا تفعل؟
French
Qu'est-ce que tu fais ?

How it works

  1. Your message is read the way Lebanese is written: tokens in any script, with each digit decided as a letter (3am) or a number (3 kteb).
  2. Its meaning is resolved inside the dialect first, using the Lebanese.ai pipeline (USPTO provisional application 64/021,845).
  3. Only then is it written out in the language you ask for. The reasoning stages run on Claude by Anthropic.

Quick start

Send your key as a bearer token. Keys look like lai_xxxxxxxxxx_…; create an account to get one.

curl https://api.lebanese.ai/v1/translate \
  -H "Authorization: Bearer $LEBANESE_AI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "shu 3am ta3mel", "targets": ["english", "lebanese_arabic"]}'

Playground

Raw JSON

Pricing

Pay monthly for a token allowance, top up with credits that never expire, or use credits alone. Plan tokens are used first, then credits. Tokens are what the model reads and writes for you; a short translation uses about 1,000 to 3,000.

Endpoints

EndpointWhat it does
POST /v1/translateLebanese to English, French, MSA, standard Arabizi or Lebanese in Arabic script. Returns each translation with a confidence, the resolved meaning and alternatives, the dialect, and how every digit was read.
POST /v1/normalizeRewrites a message in standard Lebanese Arabizi and in Lebanese Arabic script, keeping names, numbers and English or French words.
POST /v1/analyzeThe full pipeline trace, stage by stage (110, 120, 300, 400, 200, 130, 1010, 140, 150), with each stage's output, confidence and reasoning.
POST /v1/chat/completionsOpenAI-compatible chat that understands Lebanese and replies in the user's own script and register. Streaming is not available yet.
GET /v1/usageYour requests and tokens this month, your quota and rate limit.
GET /v1/modelsLists gebal-apc.

Translate: request and response

{ "text": "shu 3am ta3mel",
  "targets": ["english", "lebanese_arabic"],   // english | french | msa | normalized_lebanese | lebanese_arabic
  "session_id": "chat-42",                     // optional: gives the pipeline conversation context
  "include_trace": false }                     // optional: adds the stage-by-stage trace

{ "translations": [ { "target": "english", "text": "What are you doing?", "confidence": 0.94 }, … ],
  "confidence": 0.93,
  "meaning": { "meaning_en": "…", "intent": "…", "score": 0.94 },
  "alternatives": [ … ],
  "dialect": { "label": "lebanese", "confidence": 0.96 },
  "digits": [ { "token": "3am", "digit": "3", "decision": "phoneme", … } ],
  "degraded": false,
  "usage": { "input_tokens": …, "output_tokens": …, "total_tokens": … } }

Use it from the OpenAI SDK

from openai import OpenAI
client = OpenAI(base_url="https://api.lebanese.ai/v1", api_key="lai_…")
r = client.chat.completions.create(model="gebal-apc",
      messages=[{"role": "user", "content": "shu 3am ta3mel"}])
print(r.choices[0].message.content)

Limits and errors

Each key has a rate limit (requests per minute, set by your plan) and draws on your account's balance. Messages can be up to 2,000 characters; a chat conversation up to 24,000. Every error has the same shape:

{ "error": { "type": "rate_limited", "message": "Rate limit of 60 requests per minute reached." } }
StatusTypeMeaning
401missing_api_key, invalid_api_keyNo key, a malformed key, or a revoked one.
402insufficient_balanceYour plan's tokens and your credits are used up.
422invalid_requestThe body failed validation; the message names the field.
429rate_limited, quota_exceededToo many requests this minute (see Retry-After), or this month's quota is used.
400unsupported, invalid_requestFor example, streaming chat, or a chat that doesn't end with a user message.

"degraded": true means the reasoning step was unavailable and the pipeline answered with its built-in rules: the answer is still valid, but less fluent.

Your data

Messages are processed to answer your request and are not stored, unless your organisation has agreed in writing to share data to improve the model. Usage counts (time, endpoint, tokens) are kept for billing.