# POST /v1/medical/translate

Part of the HebrewCore documentation. Web: https://hc.itsbaba.com/docs#medical-translate · Whole docs: https://hc.itsbaba.com/docs.md · Index: https://hc.itsbaba.com/llms.txt

`POST /v1/medical/translate`

Translate a complete English text. Sentences are translated in parallel and returned in order.

| Parameter | Type | Description |
| --- | --- | --- |
| `text` *required* | string | 1–20,000 characters of English. Markdown lists, headings and tables keep their structure. |
| `audience` | enum | `clinician` (default) keeps shorthand such as BID and PO. `patient` writes it as plain Hebrew. |
| `reader_gender` | enum | `male` · `female`. How to address "you". Omit when unknown. |
| `patient_gender` | enum | `male` · `female`. The patient in third-person references. Inferred from he/she when omitted. |
| `protected_terms` | string[] | Kept verbatim, e.g. the medication and problem lists your record search returned. Up to 500. |
| `redact_terms` | string[] | Kept verbatim and never shown to the model: patient and staff names. Up to 200. |
| `glossary` | object | English term → required Hebrew rendering, e.g. `{"hypertension": "יתר לחץ דם"}`. Up to 500. |
| `date_order` | enum | How to read ambiguous numeric dates: `MDY` (default, US records) or `DMY`. |
| `date_style` | enum | `hebrew` (default, "4 במרץ 2026") · `iso` ("2026-03-04") · `keep` (unambiguous dates only; an ambiguous one is still rewritten). A two-digit year is kept as written. |
| `bidi` | enum | `isolate` (default) wraps English values in Unicode isolates · `none`. |

```bash
curl https://hc.itsbaba.com/v1/medical/translate \
  -H "Authorization: Bearer hc_live_YOUR_MEDICAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "You are taking Eliquis 5 mg twice a day. Your dose was changed on 03/04/2026.",
    "audience": "patient",
    "reader_gender": "female",
    "protected_terms": ["Eliquis 5 mg", "atrial fibrillation"]
  }'
```

## Response

```json
{
  "id": "med_…",
  "text": "את נוטלת Eliquis 5 mg פעמיים ביום. המינון שלך שונה ב־4 במרץ 2026.",
  "segments": [
    {
      "index": 0, "prefix": "", "suffix": " ",
      "source": "You are taking Eliquis 5 mg twice a day.",
      "text": "את נוטלת Eliquis 5 mg פעמיים ביום.",
      "status": "ok", "issues": [],
      "spans": [ { "type": "term", "value": "Eliquis 5 mg" } ]
    },
    {
      "index": 1, "prefix": "", "suffix": "",
      "source": "Your dose was changed on 03/04/2026.",
      "text": "המינון שלך שונה ב־4 במרץ 2026.",
      "status": "ok", "issues": [],
      "spans": [ { "type": "date", "value": "03/04/2026", "render": "4 במרץ 2026", "ambiguous_date": true } ]
    }
  ],
  "stats": { "segments": 2, "ok": 2, "retried": 0, "fallback": 0, "passthrough": 0 },
  "usage": { "characters": 77 }
}
```
