Kawn
Models

Mutarjim Translation

English to Arabic text translation.

Overview

Mutarjim (مترجم) translates English text into Arabic. Send plain English text of up to 30,000 characters and receive the Arabic translation in a single response.


Endpoint

POST /v1/translations

Requires an API Key passed via the x-api-key header or Authorization: Bearer <YOUR_API_KEY>.

Request Body

FieldTypeRequiredDescription
modelstringYesThe translation model to use. See Models.
textstringYesThe English text to translate, up to 30,000 characters.

HTML tags and control characters are removed before translation. Paragraphs separated by a blank line stay separated in the translation; single line breaks are not kept.

Example Request

curl -X POST https://api.kawn.ai/v1/translations \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mutarjim/v1",
    "text": "Knowledge is a light that guides people."
  }'

Response

FieldTypeDescription
translationstringThe Arabic translation.
modelstringThe model that produced the translation.
usage.charactersCountnumberThe billed characters, after text cleaning.
creditsConsumednumberThe credits deducted for this request.

Models

ModelDirectionPrice
mutarjim/v1English to Arabic1 credit per character

Every character of the cleaned text is billed, including spaces and punctuation. A failed request is not billed.


Errors

StatusMeaning
400The request is invalid, the text exceeds 30,000 characters, or nothing is left after cleaning.
401The API key is missing or invalid.
403The organization's credit balance is not positive.
500The translation failed. No credits were deducted.

On this page