Medical

Clinical translation over a WebSocket, for English that is still being generated

Open a WebSocket (wss://hc.itsbaba.com/v1/medical/stream) with the usual Authorization: Bearer key, from your server. Use it when the English text is itself streaming from a language model: send it as it arrives and receive verified Hebrew one sentence at a time, in order.

You send JSON text frames (each under 64 KB):

  • {"type":"start", ...options} once, with the same options as /v1/medical/translate (audience, reader_gender, patient_gender, protected_terms, redact_terms, glossary, date_order, date_style, bidi).
  • {"type":"delta","text":"..."} for each piece of English, as it arrives.
  • {"type":"end"} when the English is complete.

You receive {"type":"ready"}, then {"type":"segment", ...} for each verified sentence (same shape as a /v1/medical/translate segment), then {"type":"done","stats":{...},"usage":{"characters","billed_characters"}}. Errors arrive as {"type":"error","error":{"type","message"}} and close the socket.

Limits. 100,000 characters, 5,000 messages, 1,000 sentences and 30 minutes per session; the socket closes after 60 seconds without a message; at most 10 open sessions per account. Each sentence is charged as it starts (3× characters), so a quota stop is exact.

get/v1/medical/stream

Request

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

Changes

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