Translation

Translate text

Translate one text between Hebrew, English, Russian and the other languages in GET /v1/languages, and attach RTL/LTR metadata (dir, mixed, lang, script, runs) to both the source and the result.

Protected translation. Add protect: true or any protection field (protected_terms, redact_terms, glossary, listener_gender, speaker_gender, domain (general, clinical, finance, legal), date_order, date_style) to keep prices, quantities, numbers, dates, codes, identifiers, product names and interface variables exactly as written. Every sentence is then checked; one that cannot be verified comes back in the source language with status: "fallback". Protection is available between Hebrew, English and Russian, and switches on automatically for these pairs when the account has account terms.

ICU messages. With message_format: "icu", text is an ICU MessageFormat message and the result is a valid ICU message in the target language, with arguments and # kept and plural branches rewritten for the target language (Hebrew one, two, other; Russian one, few, many, other).

Quota. Consumes the monthly character quota: the length of text. A request that fails upstream is not charged.

Limits. text up to 20,000 characters. Not idempotent: the same request translated twice may differ in wording, never in protected values.

post/v1/translate

Request

  • Base URL: https://hc.itsbaba.com
  • URL: https://hc.itsbaba.com/v1/translate
  • Auth: HTTP bearer

Request body

textstring required

Text to translate, 1 to 20,000 characters. Counts toward the monthly character quota.

source_langstring

BCP 47 source language, or auto (default) to detect it.

target_langstring required

BCP 47 target language, e.g. he, en, ru. See GET /v1/languages.

transliterateboolean

Include a Latin transliteration when the target is Hebrew.

quality'fast' | 'balanced' | 'smartest'

fast: lowest latency, for high volume and short strings. balanced: the default. smartest: maximum nuance for long or sensitive text.

gender'male' | 'female' | 'general'

Grammatical gender for the reader where the target language marks it. For assistants, prefer listener_gender and speaker_gender.

storeboolean

Accepted for compatibility and has no effect: HebrewCore never stores request or response text.

message_format'icu'

icu: the text is an ICU MessageFormat message. The result is a valid ICU message in the target language: arguments ({name}, {count, number}, {d, date, short}) and # are kept, plural and selectordinal branches are rewritten for the target language's CLDR categories (Hebrew one, two, other; Russian one, few, many, other; English one, other; exact matches such as =0 kept), and select keys are kept. A plural or select inside a sentence is moved to the top so every branch is a whole sentence; protection.segments lists each branch sentence. Always protected; Hebrew, English and Russian. Invalid ICU returns 400 invalid_message_format; a message that cannot be verified comes back unchanged with protection.status: "fallback".

protectboolean

Keep prices, quantities, numbers, dates, codes, identifiers, product names, interface variables ({name}, %s) and <keep>…</keep> text exactly as written, and verify every sentence. Implied by any protection field. Hebrew, English and Russian. Account terms switch it on automatically for these pairs.

domain'general' | 'clinical' | 'finance' | 'legal'

general (default) for product, commerce, support and interface text. clinical adds clinical register and drug, dose, lab and abbreviation detection. finance adds a formal banking register, protects IBANs, SWIFT/BIC codes, bank account numbers (including Israeli bank-branch-account), Israeli ID numbers and card numbers (check digits verified; these values are never shown to the model), invoice, policy and transaction references, signed amounts, rates and basis points, and checks that every money direction (credit/debit, deposit/withdrawal, buy/sell, increase/decrease, gain/loss, who owes whom) is kept. legal adds a formal legal register, protects clause and section references (Section 4.2, Clause 7(b), סעיף 12(א), § 3) and case and statute citations, renders each defined term ("the Company") the same way throughout, and checks that modality (shall, may, shall not, is not required to) is kept. Any value implies protect.

audience'clinician' | 'patient'

Clinical domain register. clinician (default) keeps shorthand such as BID and PO; patient writes it as plain words.

protected_termsstring[]

Terms kept exactly as written: product names, brand names, SKUs. Up to 500, each up to 200 characters. Added to the account terms list for this request.

redact_termsstring[]

Kept exactly and never shown to the model: customer names and other personal data. Up to 200.

glossaryobject

Source term → required rendering in the target language. Up to 500 entries. Wins over an account term with the same text.

listener_gender'male' | 'female'

Gender of the reader ("you"): תרצי / תרצה. Hebrew and Russian mark it; English does not. Without it, Hebrew interface text uses neutral forms.

speaker_gender'male' | 'female'

Gender of the speaker ("I"), for an assistant or brand voice: מצאתי, я нашла / я нашёл.

patient_gender'male' | 'female'

Clinical domain: gender of a patient referred to in the third person.

date_order'MDY' | 'DMY'

How to read ambiguous numeric dates such as 04/03/2026. Default MDY for English sources, DMY for Hebrew and Russian.

date_style'hebrew' | 'iso' | 'keep'

hebrew (default) spells the month out in the target language ("4 במרץ 2026", "4 марта 2026 г."); iso; keep (unambiguous dates only).

bidi'isolate' | 'none'

isolate wraps protected values in Unicode isolates in Hebrew output. Default none; see /v1/wrap.

Example request

{
  "text": "Welcome to your account",
  "source_lang": "auto",
  "target_lang": "he",
  "quality": "balanced",
  "gender": "general",
  "message_format": "icu",
  "protect": true,
  "domain": "finance",
  "audience": "patient",
  "protected_terms": [
    "Wireless Earbuds Pro",
    "A-10234"
  ],
  "redact_terms": [
    "Dana Levi"
  ],
  "glossary": {
    "Checkout": "לתשלום"
  },
  "listener_gender": "female",
  "speaker_gender": "female",
  "patient_gender": "male",
  "date_order": "MDY",
  "date_style": "hebrew",
  "bidi": "none"
}

Response

Translation result

idstring required

Request identifier. Include it when you contact support.

qualitystring required

Quality tier used.

Example response

{
  "id": "txn_a1b2c3d4e5f6",
  "source": {
    "dir": "rtl",
    "mixed": true,
    "lang": "he",
    "script": "Hebr",
    "runs": [
      {
        "text": "שלום ",
        "dir": "rtl",
        "script": "Hebr",
        "lang": "he",
        "end": 5
      }
    ],
    "display_runs": [
      {
        "text": "שלום ",
        "dir": "rtl",
        "script": "Hebr",
        "lang": "he",
        "end": 5
      }
    ],
    "text": "Welcome to your account"
  },
  "translation": {
    "dir": "rtl",
    "mixed": true,
    "lang": "he",
    "script": "Hebr",
    "runs": [
      {
        "text": "שלום ",
        "dir": "rtl",
        "script": "Hebr",
        "lang": "he",
        "end": 5
      }
    ],
    "display_runs": [
      {
        "text": "שלום ",
        "dir": "rtl",
        "script": "Hebr",
        "lang": "he",
        "end": 5
      }
    ],
    "text": "ברוכים הבאים לחשבון שלך",
    "transliteration": "Bruchim haba'im lakheshbon shelkha",
    "protection": {
      "status": "ok",
      "source_lang": "en",
      "spans": [
        {
          "type": "date",
          "value": "04/03/2026",
          "render": "3 באפריל 2026",
          "ambiguous_date": true
        }
      ],
      "issues": [
        {
          "code": "term_missing",
          "severity": "error",
          "detail": "\"A-10234\" (term) is missing or altered."
        }
      ],
      "segments": [
        {
          "source": "Would you like me to schedule delivery for 04/03/2026?",
          "text": "האם תרצי שאקבע את המשלוח ל־3 באפריל 2026?",
          "status": "ok"
        }
      ]
    }
  },
  "quality": "balanced",
  "usage": {
    "characters": 23
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.