All protocol endpoints are served under the base path
/voice/v1 on https://api.eka.care (production) or https://api.dev.eka.care (development).Why the protocol APIs
- Single session lifecycle — one
session_idties discovery, upload, processing and results together; no separate transaction/presigned-URL juggling. - Direct chunked upload — stream audio chunks straight to the session as raw binary, or send one file and let the server chunk it via VAD.
- Self-describing — the discovery endpoint advertises supported models, audio formats, languages and limits so clients can configure themselves at runtime.
- Provider-agnostic — the same protocol backs HTTP, WebSocket and streaming clients.
Authentication
Every endpoint except Discovery requires a bearer token:The session flow
Discover capabilities
Call Discovery to learn which
models, audio_formats and upload_methods are available. Cache the result (valid for 3 hours).Create a session
Call Create Session with your chosen
model, templates, upload_type and communication_protocol. Store the returned session_id and upload_url.Send audio
Based on your
upload_type: stream chunks over HTTP with Upload Audio (chunked), or stream in real time over a WebSocket with Stream Audio (stream).End the session
Call End Session to lock the session and trigger transcription + template extraction. This is the canonical finalize for both audio paths.
Retrieve results
Poll Get Session at ~1-second intervals (or register a webhook) until the status is no longer
202. The response carries the transcript and structured template results.Key identifiers
| ID | Created by | Used in |
|---|---|---|
session_id | Create Session (or client-supplied, 16–32 chars) | Upload Audio, End Session, status polling |
upload_url | Create Session | The endpoint audio chunks are POSTed to |
API reference
| API | Endpoint | Auth |
|---|---|---|
| Discovery | GET /voice/v1/.well-known/medscribealliance | Public |
| Create Session | POST /voice/v1/sessions | Bearer |
| Upload Audio | POST /voice/v1/sessions/{session_id}/audio/{file_name} | Bearer |
| Stream Audio | wss://…/voice/v1/stream/sessions/{stream_id}/audio | Bearer |
| End Session | POST /voice/v1/sessions/{session_id}/end | Bearer |
| Get Session | GET /voice/v1/sessions/{session_id} | Bearer |

