---
title: "Translate clinical English, streamed as Server-Sent Events"
method: POST
path: "/v1/medical/translate/stream"
tags: ["Medical"]
---

# Translate clinical English, streamed as Server-Sent Events

`POST /v1/medical/translate/stream`

## Request

- Base URL: `https://hc.itsbaba.com`
- URL: `https://hc.itsbaba.com/v1/medical/translate/stream`
- Auth: HTTP bearer

Same body and checks as /v1/medical/translate, answered as Server-Sent Events so the first verified sentence can be shown before the last is done.

Events: `segment` (a MedicalSegment, strictly in order), then `done` (`{ stats, usage }`) or `error` (`{ error: { type, message } }`). For English that your model is still generating, use the WebSocket at `wss://hc.itsbaba.com/v1/medical/stream` instead (see [the docs](/docs#medical-stream)).

**Quota.** Charged up front for the length of `text`; refunded when the provider fails for every sentence.

## Request body

- MedicalTranslateRequest
  - `audience` 'clinician' | 'patient': Who reads the Hebrew. `clinician` (default) keeps shorthand such as BID and PO; `patient` writes dosing shorthand (BID, PRN) as plain words.
  - `reader_gender` 'male' | 'female': Gender of the reader, the person the text calls "you". Omit when unknown.
  - `patient_gender` 'male' | 'female': Gender of the patient in third-person references. Inferred from he/she when omitted.
  - `protected_terms` string[]: Kept verbatim. Pass the patient's medication and problem lists from the record. Up to 500, each up to 200 characters. Added to the account terms list for this request.
  - `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. Up to 500 entries.
  - `date_order` 'MDY' | 'DMY': How to read ambiguous numeric dates in the source. US records are MDY.
  - `date_style` 'hebrew' | 'iso' | 'keep': `hebrew` writes "4 במרץ 2026"; `iso` writes 2026-03-04; `keep` leaves unambiguous dates as written (an ambiguous one is still rewritten). A two-digit year is kept as written.
  - `bidi` 'isolate' | 'none': `isolate` wraps English values in Unicode isolates so "5 mg" never renders as "mg 5". `none` returns plain text.
  - `text` string, required: English text, 1 to 20,000 characters. Markdown lists, headings and tables keep their structure. Counts toward the monthly character quota.

## Response `200`

A stream of `segment` events, then `done` or `error`.

## Other responses

- `400`: Invalid request: the body failed validation or a value is out of range.
- `401`: Missing, malformed, invalid or revoked API key.
- `402`: A new self-serve account must save a card in the console before it can use the API. Adding a card is free.
- `403`: The request came from a browser, or TLS is older than 1.2.
- `429`: Too many requests this minute (`rate_limited`), or the monthly character quota is used up (`quota_exceeded`). Retry `rate_limited` after a short wait; `quota_exceeded` lasts until the quota resets or the plan changes.
- `502`: The model provider failed for every sentence, so no Hebrew was produced. The characters are refunded. Safe to retry.
- `503`: Medical translation is not configured on this server.

---

[API](https://skmtc.dev/itsbaba/apis/hebrewcore-api.md) · [All operations](https://skmtc.dev/itsbaba/apis/hebrewcore-api/llms.txt) · [OpenAPI document](https://skmtc.dev/itsbaba/apis/hebrewcore-api/revisions/f54229695236?raw)
