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

# Transcribe audio

> Accepts either an absolute `file` path OR an `audio_base64` + `mime_type`
pair. The engine + model can come from a saved `mode_id`, from explicit
`engine`/`model`/`language` fields, or a mix (mode supplies defaults
and per-call fields override).




## OpenAPI

````yaml /api-reference/local-api/openapi.yaml post /transcribe
openapi: 3.0.3
info:
  title: HyperWhisper Local API
  description: >
    HTTP API exposed by HyperWhisper.app on `127.0.0.1` when the user enables

    Settings → API Server. Off by default. Used by MCP wrappers, benchmarking

    scripts, and power-user automation.


    **Port + token discovery.** The server writes

    `~/Library/Application Support/HyperWhisper/local-api.json`

    (chmod 600) on every start. Clients read that file to find the port

    and bearer token — neither value is hard-coded.


    **Response envelope.** Successful calls return `{"ok": true, ...}` with

    HTTP 200. Expected business failures (model not installed, missing API

    key, file not found, transcription engine errored, etc.) also return HTTP

    200 with `{"ok": false, "error": {"code": "...", "message": "...", "hint":
    "..."}}`.

    HTTP 4xx is reserved for protocol failures: malformed JSON (400), missing

    or invalid bearer token (401), or a rejected Host/Origin header (403 — a

    DNS-rebinding guard applied to every route, including the unauthenticated

    /health, on every platform). On macOS, a request head over 8 KiB a line

    or 64 KiB in total gets a bare 431 and the connection closes.
  version: 1.0.0
servers:
  - url: http://127.0.0.1:{port}
    description: >-
      Local-only loopback. The port is dynamic — read it from the discovery
      file.
    variables:
      port:
        default: '39201'
        description: >-
          Persisted port from `~/Library/Application
          Support/HyperWhisper/local-api.json`.
security:
  - bearerAuth: []
paths:
  /transcribe:
    post:
      summary: Transcribe audio
      description: >
        Accepts either an absolute `file` path OR an `audio_base64` +
        `mime_type`

        pair. The engine + model can come from a saved `mode_id`, from explicit

        `engine`/`model`/`language` fields, or a mix (mode supplies defaults

        and per-call fields override).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TranscribeRequest'
      responses:
        '200':
          description: Transcript or business error envelope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranscribeResponse'
components:
  schemas:
    TranscribeRequest:
      type: object
      properties:
        file:
          type: string
          description: >-
            Absolute filesystem path. Mutually exclusive with audio_base64.
            Where a platform applies the 48 MiB audio limit to a file path, a
            larger file is refused with INVALID_REQUEST — see Request limits in
            the Local API overview for what each platform enforces.
        audio_base64:
          type: string
          description: base64-encoded audio bytes. Pair with mime_type.
        mime_type:
          type: string
          description: e.g. audio/wav, audio/m4a, audio/mpeg, audio/flac
        mode_id:
          type: string
          format: uuid
          description: >-
            Saved Mode used as the baseline. May be combined with
            engine/model/language to override per-call. When `mode_id` and
            `engine` name DIFFERENT cloud providers, the Mode's saved model is
            not carried across to the new provider: the request runs the
            engine's own default model. An inherited model is kept only when it
            really belongs to the engine you named — including under its legacy
            spelling, so an AssemblyAI Mode on `universal` re-run with `engine:
            "assemblyai"` still runs `universal` and is not upgraded to a
            different-priced model. Send an explicit `model` to pin one; for a
            BYOK provider that wins outright. HyperWhisper Cloud is different,
            because it selects by the Mode's accuracy tier rather than by a
            model id: `engine: "cloud"` keeps the Mode's model only when that
            model belongs to the tier, and otherwise runs the tier's default —
            an explicit `model` included. The default a dropped model falls back
            to is the same on every platform: every head reads it from
            `cloud-stt-catalog.json`, and
            `shared-conformance/default-model-vectors.json` pins the answer for
            all of them, so `engine: "openai"` with no `model` resolves to
            `gpt-transcribe` everywhere. The legacy engine names `googlespeech`
            and `microsoftazurespeech` now fold onto the same HyperWhisper Cloud
            accuracy tiers on every platform too, so neither of the two gaps
            this paragraph used to list is still open.
        engine:
          type: string
          description: >-
            whisperLocal | parakeet | nemotron | qwen3Asr | appleSpeech |
            <CloudProvider rawValue>. nemotron and appleSpeech are macOS only.
            Windows and Linux reject them with ENGINE_UNAVAILABLE. The value is
            trimmed and matched without regard to case on every platform, and
            every platform accepts the same alias spellings: whisper,
            whisperLocal, libwhisper; parakeet; nemotron, nemotronLocal,
            nemotron-local, nemotron-asr; qwen3Asr, qwen3, qwen3-asr, qwen3_asr,
            qwen; appleSpeech, apple, apple-speech, apple-speech-analyzer,
            speech-analyzer. So the engine a response reports can always be fed
            back into the next request, on any platform.

            TWO CLOUD VALUES ARE LEGACY NAMES AND ARE FOLDED, on every platform.
            `googlespeech` and `microsoftazurespeech` (either casing) name
            providers that HyperWhisper Cloud now serves as accuracy tiers, so
            the request runs on HyperWhisper Cloud — spending credits — with the
            tier `geminiTranscribe` or `azureMaiTranscribe`, and the response
            reports `engine: "hyperwhisper"`. Send an explicit `model` to pin a
            model INSIDE that tier (`mai-transcribe-1.5` rather than the default
            `mai-transcribe-2`); with no `model`, the Mode's own sub-model is
            kept when the tier serves it and the tier default runs otherwise.
            The fold replaces the Mode's provider and tier for this one call and
            supersedes whatever `mode_id` held, so the model rules under
            `mode_id` above are the HyperWhisper Cloud ones. `cloud` and
            `hyperwhisper` are NOT legacy names: they select HyperWhisper Cloud
            without changing the Mode's accuracy tier.
        model:
          type: string
          description: >-
            The model to run. Optional. It is echoed back unvalidated, and it
            wins over everything the Mode holds. Omit it to let the `engine`
            choose, and read `mode_id` above for what happens when the Mode and
            the `engine` disagree about the model. `whisperLocal` (and its
            aliases) is the exception: sent with `engine` and no `mode_id`, it
            needs a `model` (for example `base.en`), and a missing or blank one
            is refused with `INVALID_REQUEST` on all three platforms (macOS and
            Windows answer HTTP 200 with the message "A Whisper model is
            required."; Linux answers HTTP 400). `nemotron` with no `model`
            tries `nemotron-asr-3.5-multilingual`; on macOS, sent with `engine`
            and no `mode_id`, the `MODEL_NOT_INSTALLED` message names that model
            when it is not installed.
        language:
          type: string
        timestamp_granularities:
          type: array
          items:
            type: string
            enum:
              - segment
              - word
          description: >-
            macOS only. Opt-in caption timestamps — ['segment'], ['word'], or
            both. Populates segments/words on the response.
    TranscribeResponse:
      type: object
      properties:
        ok:
          type: boolean
        text:
          type: string
          description: >-
            The transcript. /transcribe never runs AI post-processing —
            /post-process is the endpoint for that. The deterministic text
            passes DO run, on all three platforms: vocabulary replacements,
            dictated "new line" / "new paragraph" break commands, and
            filler-word removal when Remove filler words is on. Filler-word
            removal is English-only everywhere, but each platform decides
            "English" the way its own dictation does: Windows and Linux read the
            request's / Mode's language, so the default "auto" does not remove
            fillers and you should send "language": "en"; macOS prefers the
            language the engine reported and falls back to the request's, so
            "auto" against an engine that reports English does remove them
            there.
        engine:
          type: string
        model:
          type: string
          description: >-
            The model that actually transcribed the audio, on all three
            platforms. When the request names an explicit `model`, that value is
            echoed back unvalidated. When the request sends `engine` (or only
            `mode_id`) and no `model`, the response reports the model the engine
            resolved to rather than an empty string, so a caller driving the API
            by `engine` can still record which model produced the text; for
            HyperWhisper Cloud that is the model behind the mode's accuracy tier
            (for example `scribe_v2`), because the tier is what the service
            dispatches on. It is still empty for the handful of providers that
            take no model parameter at all — read an empty value as "this engine
            has no model id", not as "unreported".
        language:
          type: string
          nullable: true
        timings:
          type: object
          properties:
            load_ms:
              type: integer
            decode_ms:
              type: integer
        latency_ms:
          type: integer
        raw_text:
          type: string
          nullable: true
          description: macOS only. Set when timestamp_granularities was requested.
        segments:
          type: array
          nullable: true
          description: macOS only. Present when timestamp_granularities included 'segment'.
          items:
            $ref: '#/components/schemas/TranscribeSegment'
        words:
          type: array
          nullable: true
          description: macOS only. Present when timestamp_granularities included 'word'.
          items:
            $ref: '#/components/schemas/TranscribeWord'
    TranscribeSegment:
      type: object
      properties:
        id:
          type: integer
        text:
          type: string
        start:
          type: number
        end:
          type: number
    TranscribeWord:
      type: object
      properties:
        word:
          type: string
        start:
          type: number
        end:
          type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: base64-url
      description: >-
        Token from the discovery file. Required on every endpoint except
        /health.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.