> ## Documentation Index
> Fetch the complete documentation index at: https://developer.eka.care/llms.txt
> Use this file to discover all available pages before exploring further.

# Discovery

> Public, unauthenticated endpoint that advertises the service's protocol version, supported authentication methods, audio capabilities, available models and supported languages. Clients should fetch this first and use the returned `models`, `capabilities.audio_formats` and `capabilities.upload_methods` to configure their session. The response is cacheable (`Cache-Control: max-age=10800`).


The discovery endpoint is the **first call** a client should make. It is public (no authentication) and advertises everything a client needs to configure a session: the protocol version, supported authentication methods, audio capabilities, available models and supported languages.

<Info>
  The response is cacheable — it is returned with `Cache-Control: max-age=10800` (3 hours). Fetch it once on startup and reuse it.
</Info>

## What to do with the response

| Field                                     | Use it to…                                                                               |
| ----------------------------------------- | ---------------------------------------------------------------------------------------- |
| `capabilities.audio_formats`              | Pick a recording MIME type the server accepts.                                           |
| `capabilities.upload_methods`             | Choose a valid `upload_type` (`chunked`, `single`, `stream`) for Create Session.         |
| `capabilities.max_chunk_duration_seconds` | Cap how long each uploaded chunk should be (≤20s recommended).                           |
| `models[]`                                | Choose a `model` (`lite` / `pro`) based on languages, max session duration and features. |
| `languages.supported`                     | Validate the `language_hint` / `transcript_language` you intend to send.                 |
| `authentication.supported_methods`        | Decide between API key and OIDC auth.                                                    |

## Response fields

| Field                | Type      | Description                                                       |
| -------------------- | --------- | ----------------------------------------------------------------- |
| `protocol`           | string    | Always `medscribealliance`.                                       |
| `protocol_version`   | string    | Current protocol version (e.g. `0.1`).                            |
| `supported_versions` | string\[] | All protocol versions the service supports.                       |
| `service`            | object    | Service name, documentation URL, support email.                   |
| `endpoints`          | object    | `base_url`, `webhooks_url`, `templates_url`.                      |
| `authentication`     | object    | `supported_methods` and optional `oidc` config.                   |
| `capabilities`       | object    | Audio formats, chunk limits, upload methods, delivery flags.      |
| `models`             | object\[] | Available models with languages, limits and feature flags.        |
| `languages`          | object    | Supported language codes and whether auto-detection is available. |

## Next step

Use the advertised models and capabilities to [create a session](/api-reference/health-ai/ekascribe/protocol/create-session).


## OpenAPI

````yaml GET /voice/v1/.well-known/medscribealliance
openapi: 3.0.1
info:
  title: EkaScribe Protocol API (MedScribeAlliance v0.1)
  version: '0.1'
  description: >
    Session-based medical voice capture API implementing the MedScribeAlliance
    Protocol v0.1. Discover service capabilities, create a session, stream audio
    chunks, then end the session to trigger asynchronous transcription and
    structured-template extraction.
servers:
  - url: https://api.eka.care
    description: Production server
  - url: https://api.dev.eka.care
    description: Development server
security: []
paths:
  /voice/v1/.well-known/medscribealliance:
    get:
      tags:
        - protocol
      summary: Discovery
      description: >
        Public, unauthenticated endpoint that advertises the service's protocol
        version, supported authentication methods, audio capabilities, available
        models and supported languages. Clients should fetch this first and use
        the returned `models`, `capabilities.audio_formats` and
        `capabilities.upload_methods` to configure their session. The response
        is cacheable (`Cache-Control: max-age=10800`).
      responses:
        '200':
          description: Discovery document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryResponse'
              example:
                protocol: medscribealliance
                protocol_version: '0.1'
                supported_versions:
                  - '0.1'
                service:
                  name: Voice2Rx Medical Scribe Service
                  documentation_url: https://developer.eka.care
                  support_email: support@eka.care
                endpoints:
                  base_url: https://api.eka.care/voice/v1
                  webhooks_url: https://api.eka.care/voice/v1/webhooks
                  templates_url: https://api.eka.care/voice/api/v1/template
                authentication:
                  supported_methods:
                    - api_key
                    - oidc
                  oidc:
                    issuer: https://accounts.eka.care/oauth2
                    authorization_endpoint: https://accounts.eka.care/oauth2/authorize
                    token_endpoint: https://accounts.eka.care/oauth2/token
                    scopes_supported:
                      - openid
                      - profile
                capabilities:
                  audio_formats:
                    - audio/webm;codecs=opus
                    - audio/wav
                    - audio/ogg
                    - audio/mp4
                    - audio/m4a
                    - audio/mp3
                  max_chunk_duration_seconds: 20
                  upload_methods:
                    - chunked
                    - single
                    - stream
                  webhook_delivery: true
                  client_sdk_delivery: true
                models:
                  - id: lite
                    display_name: Lite
                    languages:
                      - en
                      - hi
                    max_session_duration_seconds: 600
                    response_speed: fast
                    features:
                      realtime_transcription: false
                      speaker_diarization: false
                      custom_templates: false
                  - id: pro
                    display_name: Professional
                    languages:
                      - en
                      - hi
                      - ta
                      - te
                      - bn
                      - mr
                      - gu
                      - kn
                      - ml
                      - pa
                    max_session_duration_seconds: 3600
                    response_speed: standard
                    features:
                      realtime_transcription: true
                      speaker_diarization: true
                      custom_templates: true
                languages:
                  supported:
                    - en
                    - hi
                    - ta
                    - te
                    - bn
                    - mr
                    - gu
                    - kn
                    - ml
                    - pa
                  auto_detection: true
components:
  schemas:
    DiscoveryResponse:
      type: object
      properties:
        protocol:
          type: string
          example: medscribealliance
        protocol_version:
          type: string
          example: '0.1'
        supported_versions:
          type: array
          items:
            type: string
        service:
          type: object
          properties:
            name:
              type: string
            documentation_url:
              type: string
            support_email:
              type: string
        endpoints:
          type: object
          properties:
            base_url:
              type: string
            webhooks_url:
              type: string
            templates_url:
              type: string
        authentication:
          type: object
          properties:
            supported_methods:
              type: array
              items:
                type: string
            oidc:
              type: object
              properties:
                issuer:
                  type: string
                authorization_endpoint:
                  type: string
                token_endpoint:
                  type: string
                scopes_supported:
                  type: array
                  items:
                    type: string
        capabilities:
          type: object
          properties:
            audio_formats:
              type: array
              items:
                type: string
            max_chunk_duration_seconds:
              type: integer
            upload_methods:
              type: array
              items:
                type: string
            webhook_delivery:
              type: boolean
            client_sdk_delivery:
              type: boolean
        models:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              display_name:
                type: string
              languages:
                type: array
                items:
                  type: string
              max_session_duration_seconds:
                type: integer
              response_speed:
                type: string
              features:
                type: object
                properties:
                  realtime_transcription:
                    type: boolean
                  speaker_diarization:
                    type: boolean
                  custom_templates:
                    type: boolean
        languages:
          type: object
          properties:
            supported:
              type: array
              items:
                type: string
            auto_detection:
              type: boolean

````