# Start a live report session

https://radiologydictation.com/docs/post-v1-reports-stream-sessions

```http
POST /v1/reports/stream-sessions
```

Start a JSON report request before sending audio. Include the Authorization header and a new Idempotency-Key. The response contains a session ID, a short-lived ticket, and a WebSocket path. Connect to that path, send the ticket as the first JSON message, then send mono signed 16-bit little-endian PCM audio frames at the selected sample rate. The maximum recording duration is 10 minutes.

Finish by sending {"type":"finish"}. The connection returns interim transcription events while audio arrives and a complete report JSON result after processing. Audio is limited by the same byte and duration limits as uploaded dictations. A session that has not connected can be cancelled with DELETE /v1/stream-sessions/{session_id}.

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

## Start the connection

```json
{"ticket":"TICKET_FROM_SESSION_RESPONSE"}
```

Send binary audio frames at 24000 samples per second. The final response includes the transcription and its word timings.

```json
{"type":"transcription","event":{"intermediate":"..."}}
{"type":"transcription","event":{"delta":"..."}}
{"type":"transcription.completed","text":"..."}
```

## Finish the report

```json
{"type":"finish"}
```

A complete event contains the report response and request ID. Keep the Idempotency-Key and session ID if you need to check whether the request completed.

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

```http
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

```http
application/json
```

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| silence_threshold_dbfs | number \| null | No |  |  |
| silence_min_duration_ms | integer \| null | No |  |  |
| study_metadata | string \| null | No |  |  |
| user_specification | string \| null | No |  |  |
| sample_rate | integer | No | default=24000 |  |

### Request examples

```json
{
  "sample_rate": 24000,
  "study_metadata": "MRI brain"
}
```

## Example

```bash
BASE_URL=https://radiologydictation.com

curl --request POST "$BASE_URL/v1/reports/stream-sessions" \
  --header "Authorization: Bearer $API_KEY" \
  --header "Idempotency-Key: $REQUEST_ID" \
  --header "Content-Type: application/json" \
  --data '{"sample_rate": 24000, "study_metadata": "MRI brain"}'
```

## 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 |  |  |

### ReportStreamStart

| Name | Type | Required | Constraints | Description |
| --- | --- | --- | --- | --- |
| silence_threshold_dbfs | number \| null | No |  |  |
| silence_min_duration_ms | integer \| null | No |  |  |
| study_metadata | string \| null | No |  |  |
| user_specification | string \| null | No |  |  |
| 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 |  |  |
