Medical

Translate clinical English, streamed as Server-Sent Events

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).

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

post/v1/medical/translate/stream

Request

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

Request body

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_termsstring[]

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_termsstring[]

Kept verbatim and never shown to the model (patient and staff names). Up to 200.

glossaryobject

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.

textstring required

English text, 1 to 20,000 characters. Markdown lists, headings and tables keep their structure. Counts toward the monthly character quota.

Example request

{
  "audience": "patient",
  "reader_gender": "female",
  "patient_gender": "male",
  "protected_terms": [
    "Eliquis 5 mg BID",
    "atrial fibrillation"
  ],
  "redact_terms": [
    "Dana Levi"
  ],
  "glossary": {
    "hypertension": "יתר לחץ דם"
  },
  "date_order": "MDY",
  "date_style": "hebrew",
  "bidi": "isolate",
  "text": "Based on your records, you are taking Eliquis 5 mg twice a day. Your dose was changed on 03/04/2026."
}

Response

A stream of segment events, then done or error.

Changes

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