Dialect-aware Arabic translation powered by HUMAIN’s ALLaM model.
X-NAWA-Cache: HIT).| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer nawa_live_sk_xxx or Bearer nawa_test_sk_xxx |
Content-Type | Yes | application/json |
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The text to translate. Max 5,000 characters. |
source | string | No | Source language: ar, en, auto. Default: auto (detects automatically). |
target | string | Yes | Target language: ar, en. |
dialect | string | No | Target dialect for Arabic output: gulf, egyptian, levantine, msa. Default: msa. |
tone | string | No | Translation tone: formal, casual, social_media. Default: formal. |
platform | string | No | Source platform for social media tone context: youtube, instagram, twitter, facebook. |
metadata | object | No | Arbitrary key-value metadata to attach to the translation. |
| Field | Type | Description |
|---|---|---|
text | string | The original input text |
translated_text | string | The translated output |
source_language | string | Detected or specified source language |
target_language | string | Target language |
source_dialect | string or null | Detected dialect if source is Arabic |
target_dialect | string or null | Target dialect if target is Arabic |
tone | string | The tone used for translation |
model | string | Model version used |
provider | string | AI provider used (allam or claude) |
fallback_used | boolean | Whether the fallback provider was used |
cached | boolean | Whether served from semantic cache |
cost_usd | number | Cost in USD |
credits_used | number | Credits deducted |
English to Gulf Arabic (casual)
English to Egyptian Arabic (social media)
Arabic to English (formal)
MSA to Gulf Arabic dialect conversion
| Status | Type | When |
|---|---|---|
| 400 | invalid_request_error | Missing text, source, or target. Invalid values. Text too long. |
| 401 | authentication_error | Invalid or missing API key |
| 402 | insufficient_credits | No credits remaining |
| 429 | rate_limit_error | Rate limit exceeded |
| 500 | api_error | Internal or provider error |