> ## 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).
  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.
        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.
        engine:
          type: string
          description: >-
            whisperLocal | parakeet | qwen3Asr | appleSpeech | <CloudProvider
            rawValue>
        model:
          type: string
        language:
          type: string
    TranscribeResponse:
      type: object
      properties:
        ok:
          type: boolean
        text:
          type: string
        engine:
          type: string
        model:
          type: string
        language:
          type: string
          nullable: true
        timings:
          type: object
          properties:
            load_ms:
              type: integer
            decode_ms:
              type: integer
        latency_ms:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: base64-url
      description: >-
        Token from the discovery file. Required on every endpoint except
        /health.

````