Back to all APIs
Translation API
AI-powered translation for 22+ languages with transliteration and formality control
Category: UtilitiesEndpoint:
/v1/translateAvg Response
<50ms
Uptime SLA
99.99%
Free Tier
1,000/mo
Quick Start
JavaScript / TypeScript
javascript
import { KhaleejiAPI } from '@khaleejiapi/sdk'; const client = new KhaleejiAPI({ apiKey: 'your_api_key' }); // AI-powered translationconst result = await client.communication.translateAI({ text: 'Hello, how are you?', target: 'ar', formality: 'formal',}); console.log(result.translatedText); // "مرحباً، كيف حالك؟"console.log(result.transliteration); // "marhaban, kayf halak?"console.log(result.confidence); // 0.95Python
python
from khaleejiapi import KhaleejiAPI client = KhaleejiAPI('your_api_key') # AI-powered translationresult = client.communication.translate_ai( text="Hello, how are you?", target="ar", formality="formal") print(result["translatedText"]) # "مرحباً، كيف حالك؟"print(result["transliteration"]) # "marhaban, kayf halak?"print(result["confidence"]) # 0.95cURL
curl
curl -X POST "https://khaleejiapi.dev/api/v1/translate" \ -H "x-api-key: your_api_key" \ -H "Content-Type: application/json" \ -d '{"text":"Hello, how are you?","target":"ar","formality":"formal"}'