How Lebanon actually speaks.
The Lebanese-dialect language model, as an API. Typed in Arabizi, Arabic script, English or French. Understood in full.
How it works
- 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). - Its meaning is resolved inside the dialect first, using the Lebanese.ai pipeline (USPTO provisional application 64/021,845).
- 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
| Endpoint | What it does |
|---|---|
POST /v1/translate | Lebanese 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/normalize | Rewrites a message in standard Lebanese Arabizi and in Lebanese Arabic script, keeping names, numbers and English or French words. |
POST /v1/analyze | The 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/completions | OpenAI-compatible chat that understands Lebanese and replies in the user's own script and register. Streaming is not available yet. |
GET /v1/usage | Your requests and tokens this month, your quota and rate limit. |
GET /v1/models | Lists 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." } }
| Status | Type | Meaning |
|---|---|---|
| 401 | missing_api_key, invalid_api_key | No key, a malformed key, or a revoked one. |
| 402 | insufficient_balance | Your plan's tokens and your credits are used up. |
| 422 | invalid_request | The body failed validation; the message names the field. |
| 429 | rate_limited, quota_exceeded | Too many requests this minute (see Retry-After), or this month's quota is used. |
| 400 | unsupported, invalid_request | For 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.