Translation

Translate a batch of strings

Translate up to 50 strings to one target language in a single call, for example the interface strings of a screen or the fields of a product. Results come back in input order. Every option of /v1/translate applies to all items.

With protection (any protection field, or account terms for Hebrew, English and Russian pairs), each item carries its own protection block and interface variables such as {count}, {{name}} and %s stay in place.

Quota. Consumes the monthly character quota: the total length of all items.

Limits. 1 to 50 items, each up to 5,000 characters. A protected batch carries at most 20,000 characters in total.

post/v1/translate/batch

Request

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

Request body

itemsstring[] required

1 to 50 strings, each up to 5,000 characters. A protected batch carries at most 20,000 characters in total.

target_langstring required

BCP 47 target language, applied to every item.

source_langstring

BCP 47 source language, or auto (default).

transliterateboolean

Include a Latin transliteration when the target is Hebrew.

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

Quality tier, applied to every item.

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

Grammatical gender for the reader where the target language marks it.

message_format'icu'

icu: every item is an ICU MessageFormat message. Each 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

{
  "items": [
    "{count} items in your cart",
    "Checkout",
    "Last updated %s ago"
  ],
  "target_lang": "he",
  "source_lang": "auto",
  "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

Batch results (input order)

Example response

{
  "results": [
    {
      "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"
          }
        ]
      }
    }
  ],
  "usage": {
    "characters": 23
  }
}

Changes

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