UtilitiesPopular
Translation API
AI-powered translation across 22 languages using Google Gemini 2.5 Flash. Features Arabic transliteration (romanization), auto-detection, formal/informal register, and 24-hour intelligent caching via Valkey.
Endpoint:
/v1/translateMethods:GETPOST
Latency:~500ms (AI) / ~5ms (cached)
Try it out
POST
/v1/translateParameters
Code
curl
curl -X POST "https://khaleejiapi.dev/api/v1/translate?text=Hello%2C%20how%20are%20you%3F&source=auto&target=ar&formality=formal" \ -H "X-API-Key: your_api_key"Methods
GET — Language Info
Returns the list of 22 supported languages with codes, names, and RTL flags. No parameters needed.
POST — Translate Text
Translate text between languages. Submit the text, source, target, and formality in the request body.
POST Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Required | Text to translate (max 5000 characters) |
| source | string | Optional | Source language code or 'auto' for detection |
| target | string | Optional | Target language code (22 supported) |
| formality | string | Optional | Register: 'formal' or 'informal' |
Supported Languages
Arabic (ar)English (en)French (fr)Spanish (es)German (de)Turkish (tr)Urdu (ur)Persian (fa)Hindi (hi)Chinese (zh)Japanese (ja)Korean (ko)Russian (ru)Portuguese (pt)Italian (it)Dutch (nl)Polish (pl)Indonesian (id)Malay (ms)Swahili (sw)Hebrew (he)Bengali (bn)
RTL languages: Arabic, Urdu, Persian, Hebrew
Response Fields
translatedText
The translated text result
transliteration
Arabic romanization (when source or target is Arabic)
confidence
Translation confidence score (0–1)
cached
Whether the result came from the 24-hour cache
Rate Limits
| Plan | Requests/Month | Rate Limit |
|---|---|---|
| Free | 500 | 5 req/min |
| Starter | 5,000 | 30 req/min |
| Professional | 50,000 | 120 req/min |
| Business | 250,000 | 500 req/min |