Translate a batch of strings
translate_batchTranslate 1 to 50 strings (each up to 5,000 characters) into one target language in a single call; results come back in input order. Use it for the interface strings of a screen, a string file, or the fields of a product.
Takes every option of translate: protect, domain (general, clinical, finance, legal), protected_terms, glossary, listener_gender, speaker_gender, message_format: "icu" and quality. With protection, interface variables such as {count}, {{name}} and %s, numbers, prices and dates stay exactly as written, and each item carries its own verification status. Uses the monthly character quota.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bidi | No | `isolate` wraps protected values in Unicode isolates in Hebrew output. Default none; see /v1/wrap. | |
| items | Yes | 1 to 50 strings, each up to 5,000 characters. A protected batch carries at most 20,000 characters in total. | |
| domain | No | `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`. | |
| gender | No | Grammatical gender for the reader where the target language marks it. | |
| protect | No | 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. | |
| quality | No | Quality tier, applied to every item. | balanced |
| audience | No | Clinical domain register. `clinician` (default) keeps shorthand such as BID and PO; `patient` writes it as plain words. | |
| glossary | No | Source term → required rendering in the target language. Up to 500 entries. Wins over an account term with the same text. | |
| date_order | No | How to read ambiguous numeric dates such as 04/03/2026. Default MDY for English sources, DMY for Hebrew and Russian. | |
| date_style | No | `hebrew` (default) spells the month out in the target language ("4 במרץ 2026", "4 марта 2026 г."); `iso`; `keep` (unambiguous dates only). | |
| source_lang | No | BCP 47 source language, or `auto` (default). | |
| target_lang | Yes | BCP 47 target language, applied to every item. | |
| redact_terms | No | Kept exactly and never shown to the model: customer names and other personal data. Up to 200. | |
| transliterate | No | Include a Latin transliteration when the target is Hebrew. | |
| message_format | No | `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"`. | |
| patient_gender | No | Clinical domain: gender of a patient referred to in the third person. | |
| speaker_gender | No | Gender of the speaker ("I"), for an assistant or brand voice: מצאתי, я нашла / я нашёл. | |
| listener_gender | No | Gender of the reader ("you"): תרצי / תרצה. Hebrew and Russian mark it; English does not. Without it, Hebrew interface text uses neutral forms. | |
| protected_terms | No | 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usage | No | What this request consumed. | |
| results | No | One translation per item, in input order. |