Dialect-aware Arabic content moderation. Catches profanity and slang that Western APIs miss.
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 moderate. Max 5,000 characters. |
context | string | No | Where the text appears (e.g. “youtube comment”, “product review”). Helps the model calibrate. |
strictness | string | No | Moderation strictness: low, medium, high. Default: medium. |
platform | string | No | Source platform: youtube, instagram, twitter, facebook. |
| Field | Type | Description |
|---|---|---|
text | string | The original input text |
is_safe | boolean | Whether the content passed moderation |
verdict | string | safe or flagged |
flags | array | List of triggered category names |
severity | string | Overall severity: none, low, medium, high |
severity_score | number | Severity score 0—1 |
language | string | Detected language: ar, en, or mixed |
dialect | string or null | Detected Arabic dialect. Null if not Arabic. |
categories | object | Boolean flags for each moderation category |
category_scores | object | Confidence scores 0—1 for each category |
flagged_terms | array | Specific problematic words/phrases found |
cleaned_text | string or null | Text with flagged terms replaced by ***. Null if safe. |
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 |
| Category | Description |
|---|---|
profanity | Swearing, vulgar language, dialect-specific profanity |
hate_speech | Content targeting groups based on race, religion, ethnicity, etc. |
harassment | Personal attacks, bullying, intimidation |
sexual | Sexually explicit or suggestive content |
spam | Promotional content, repetitive text, link spam |
self_harm | Content promoting or describing self-harm |
violence | Threats, glorification of violence, graphic descriptions |
Safe Gulf Arabic content
true, verdict: safe, severity: noneSpam detection
false, flags: ["spam"], severity: lowHigh strictness catching mild content
With platform context
| Status | Type | When |
|---|---|---|
| 400 | invalid_request_error | Missing text. Invalid strictness or platform. 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 |