Create Session
Create a new scribing session. Returns a session_id that must be used in every subsequent call (audio upload, end session, status polling) and an upload_url to which audio is sent. upload_type and communication_protocol are required and must be one of the methods advertised by the discovery endpoint.
session_id that ties together every subsequent call — audio upload, end session and status polling — and an upload_url that audio chunks are POSTed to.
upload_type and communication_protocol are required. Both must be values advertised by the Discovery endpoint (capabilities.upload_methods and the supported protocols).chunked (HTTP binary upload) and stream (WebSocket) are currently supported through these APIs. For other use cases (e.g. single full-file / batch upload), the SDKs are the best option; if you must use a raw API instead, use the deprecated EkaScribe v2 APIs.upload_url depends on upload_type
The response’s upload_url is tailored to the chosen upload_type:
upload_type | upload_url scheme | Use it with |
|---|---|---|
chunked | https://… | Upload Audio (HTTP binary) |
stream | wss://… | Stream Audio (WebSocket) |
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | No | Client-supplied session id (16–32 chars). If omitted, the server generates one. |
session_mode | enum | No | dictation (default) or consultation. |
templates | string[] | No | Up to 2 template IDs to extract (e.g. eka_emr_template, clinical_notes_template). |
model | enum | No | lite (default) or pro. From the discovery models list. |
language_hint | string[] | No | ISO 639-1 code(s) hinting the spoken language(s), e.g. ["en"], ["hi"]. |
transcript_language | string | No | ISO 639-1 code for the transcript output language. |
upload_type | enum | Yes | chunked, single, or stream. |
communication_protocol | enum | Yes | http, websocket, or rpc. |
additional_data | object | No | Arbitrary pass-through metadata returned in webhooks and status responses (≤4KB recommended). |
patient_details | object | No | Patient demographic / identifier metadata. The oid key is promoted to patient_oid for indexing. |
Response fields
| Field | Type | Description |
|---|---|---|
session_id | string | Unique session identifier — use in all subsequent calls. |
status | string | Always created on success. |
created_at | datetime | ISO 8601 creation timestamp. |
expires_at | datetime | ISO 8601 expiry timestamp. Sessions expire (~1 hour) if not ended. |
upload_url | string | Endpoint to upload audio chunks to. |
patient_details | object | Echo of the patient details supplied at creation, if any. |
Choosing an upload type
upload_type | Behavior | Next step |
|---|---|---|
chunked | Split audio into short chunks and upload them in order over HTTP. | Upload Audio — once per chunk (audio_0.webm, audio_1.webm, …) |
stream | Stream audio in real time over a WebSocket. | Stream Audio — connect to the returned wss:// URL |
Next step
Send audio via Upload Audio (chunked) or Stream Audio (stream), then call End Session and poll Get Session for results.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Audio upload method. Must be advertised by discovery.
chunked, single, stream Communication protocol used for the session.
websocket, http, rpc Optional client-supplied session id. If omitted, the server generates one.
16 - 32"ses_abc123def456"
Session mode.
consultation, dictation Template IDs to extract (max 2). See the templates endpoint for valid IDs.
2["eka_emr_template"]Model ID from the discovery document.
pro, lite ISO 639-1 language code(s) hinting the audio input language.
["en"]ISO 639-1 language code for the transcript output.
"en"
Pass-through metadata returned in webhooks and status responses (≤4KB recommended).
Patient demographic / identifier metadata. oid is promoted to patient_oid for indexing.

