Start a live Word report session
POST /v1/report-documents/stream-sessionsStart a complete Word report request using a saved template and revision. Send the same payload fields accepted by POST /v1/report-documents inside payload, choose a supported PCM sample rate, and include Authorization plus a new Idempotency-Key. The response returns a session ID, a short-lived ticket, and a WebSocket path. The maximum recording duration is 10 minutes.
Connect to the returned path and send the ticket first. Then send mono signed 16-bit little-endian PCM audio frames, followed by {"type":"finish"}. The server returns a completion event followed by the Word document bytes. Existing report, template, metadata, and audio validation rules still apply.
Optional silence trimming
Trimming is off by default. To enable it, send both top-level fields of the session-start JSON: silence_threshold_dbfs and silence_min_duration_ms. For example, -55 and 500 shorten passages that stay below -55 dBFS for at least 500 milliseconds. A more negative threshold preserves quieter sounds.
The threshold ranges from -120 to 0 dBFS. The duration is a whole number from 1 to 600000 milliseconds. Up to 100 milliseconds at each edge is kept, capped at a quarter of the requested duration. An entirely below-threshold recording is processed in full.
Quiet speech can fall below your threshold. Test your settings with representative recordings. Returned times refer to the original recording. Trimming adds no report caution and does not change prices or the original recording limits. Use a new request key if you change these settings.
Live sessions are charged when the session is created, including sessions that are cancelled, expire, or fail. Uploads are charged only when generation succeeds.
Send audio and finish
{"ticket":"TICKET_FROM_SESSION_RESPONSE"}Send binary audio frames at 24000 samples per second. Finish with the same control message used by the live report endpoint. The response first describes the completed Word file, then sends its bytes in a binary frame.
Authentication
Create a named API key in your workspace’s API keys tab, then send it in the Authorization header on each API request. Your key connects the integration to that workspace’s saved settings and Word templates. Signing into the website does not replace this header in an API integration.
Authorization: Bearer <API_KEY>Keep the key in your application’s server-side secret configuration. It is shown only once when created, so save it securely then. Do not place it in browser code, logs, version control, or a prompt sent to your coding agent. You can revoke an integration’s key from the workspace without changing the other keys.
Parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
| Idempotency-Key | header: string | Yes | — | — |
Request
application/json| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
| silence_threshold_dbfs | number | null | No | — | — |
| silence_min_duration_ms | integer | null | No | — | — |
| payload | ReportDocumentInput | Yes | — | — |
| sample_rate | integer | No | default=24000 | — |
Request examples
{
"payload": {
"template_id": "00000000000000000000000000000000",
"template_revision": 1
},
"sample_rate": 24000
}Example
BASE_URL=https://radiologydictation.com
curl --request POST "$BASE_URL/v1/report-documents/stream-sessions" \
--header "Authorization: Bearer $API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--header "Content-Type: application/json" \
--data '{"payload": {"template_id": "00000000000000000000000000000000", "template_revision": 1}, "sample_rate": 24000}'Responses
| Status | Description | Type |
|---|---|---|
| 200 | Successful Response | object · application/json |
| 422 | Validation Error | HTTPValidationError · application/json |
Schemas
HTTPValidationError
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
| detail | array<ValidationError> | No | — | — |
MetadataSource
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
| type | string | Yes | — | Use metadata to send DICOM JSON directly. This field does not select a PACS connection or file upload. |
| dicom_metadata | array<object> | Yes | minItems=1; maxItems=512 | Array of DICOM JSON datasets containing acquisition metadata. Use tag numbers, vr, and Value arrays. Exclude patient identifiers and image data. |
| metadata_complete | boolean | No | default=false | Set true only when these datasets cover all acquisitions in the study. Leave false for partial or uncertain coverage. |
ReportDocumentInput
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
| template_id | string | Yes | pattern="^[a-f0-9]{32}$" | — |
| template_revision | integer | Yes | minimum=1.0 | — |
| study_metadata | string | null | No | — | — |
| user_specification | string | null | No | — | — |
| exam_title | string | No | maxLength=20000; default="" | — |
| clinical_history | string | No | maxLength=20000; default="" | — |
| comparison | string | No | maxLength=20000; default="" | — |
| patient_name | string | null | No | — | — |
| date_of_birth | string | null | No | — | — |
| referring_physician | string | null | No | — | — |
| patient_id | string | null | No | — | — |
| date_of_study | string | null | No | — | — |
| source | MetadataSource | null | No | — | — |
ReportDocumentStreamStart
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
| silence_threshold_dbfs | number | null | No | — | — |
| silence_min_duration_ms | integer | null | No | — | — |
| payload | ReportDocumentInput | Yes | — | — |
| sample_rate | integer | No | default=24000 | — |
ValidationError
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
| loc | array<string | integer> | Yes | — | — |
| msg | string | Yes | — | — |
| type | string | Yes | — | — |
| input | object | No | — | — |
| ctx | object | No | — | — |