Translate
Endpoints
Translate
Dialect-aware Arabic translation powered by HUMAIN’s ALLaM model.
POST
Translate
Translate text between English and Arabic with dialect awareness. Generates culturally appropriate translations in Gulf, Egyptian, Levantine, or MSA Arabic.Documentation Index
Fetch the complete documentation index at: https://developers.trynawa.com/llms.txt
Use this file to discover all available pages before exploring further.
Cost: $0.005 per request (5 credits). Semantic cache hits are free (
X-NAWA-Cache: HIT).Request
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer nawa_live_sk_xxx or Bearer nawa_test_sk_xxx |
Content-Type | Yes | application/json |
Body parameters
| 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. |
Example request
Response
Success response (200)
Result fields
| 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 |
Dialect examples
English to Gulf Arabic (casual)
English to Gulf Arabic (casual)
Input: “The food was amazing, thank you so much”
Output: “الأكل كان وايد حلو، مشكور وايد”
English to Egyptian Arabic (social media)
English to Egyptian Arabic (social media)
Arabic to English (formal)
Arabic to English (formal)
Input: “وش رايكم بالمحتوى الجديد؟”
Output: “What do you think of the new content?”
MSA to Gulf Arabic dialect conversion
MSA to Gulf Arabic dialect conversion
Input: “كيف حالك اليوم؟” (MSA)
Output: “شلونك اليوم؟” (Gulf)
Error responses
| 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 |