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

# Transcribe audio

> Batch transcription with word timestamps. Accepts raw PCM16 mono or WAV only; compressed formats (mp3, ogg, flac, mp4, m4a) are rejected. Body cap: 25 MB.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/audio/transcriptions
openapi: 3.1.0
info:
  title: Hopper API
  version: 1.0.0
  description: >-
    Inference for voice agents: LLM, text to speech, and speech to text at
    api.withhopper.com. OpenAI-compatible routes are served under /v1; native
    routes are served at the root. All errors use the OpenAI envelope.
servers:
  - url: https://api.withhopper.com
security:
  - bearerAuth: []
tags:
  - name: LLM
    description: OpenAI-compatible chat completions and model listing.
  - name: Text to Speech
    description: >-
      Speech synthesis: native /tts routes and the OpenAI-compatible
      /v1/audio/speech.
  - name: Speech to Text
    description: Batch transcription. Streaming runs over WS /stt/websocket.
  - name: Voices
    description: Voice library, cloning, profiles, and localization.
  - name: Pronunciation
    description: Pronunciation dictionaries applied at synthesis time.
  - name: Jobs
    description: Status of async voice jobs.
  - name: Health
    description: Unauthenticated liveness check.
paths:
  /v1/audio/transcriptions:
    post:
      tags:
        - Speech to Text
      summary: Transcribe audio
      description: >-
        Batch transcription with word timestamps. Accepts raw PCM16 mono or WAV
        only; compressed formats (mp3, ogg, flac, mp4, m4a) are rejected. Body
        cap: 25 MB.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
                - model
              properties:
                file:
                  type: string
                  format: binary
                  description: >-
                    Raw PCM16 mono or WAV audio. Compressed formats return 400
                    unsupported_audio_format.
                model:
                  type: string
                  description: STT model id, e.g. nemotron-asr.
                language:
                  type: string
                  description: Language hint, forwarded to the model.
                keyterms:
                  type: string
                  description: Terms to bias recognition toward, forwarded to the model.
                sample_rate:
                  type: integer
                  enum:
                    - 8000
                    - 16000
                    - 22050
                    - 24000
                    - 44100
                    - 48000
                  default: 16000
                  description: Sample rate of the submitted audio.
      responses:
        '200':
          description: >-
            Transcript with word timestamps. duration_seconds = bytes /
            (sample_rate x 2), rounded to ms.
          headers:
            x-hopper-request-cost-usd:
              $ref: '#/components/headers/XHopperRequestCostUsd'
            x-hopper-credits-remaining-usd:
              $ref: '#/components/headers/XHopperCreditsRemainingUsd'
          content:
            application/json:
              schema:
                type: object
                properties:
                  text:
                    type: string
                  words:
                    type: array
                    items:
                      type: object
                      properties:
                        word:
                          type: string
                        start:
                          type: number
                          description: Seconds.
                        end:
                          type: number
                          description: Seconds.
                  duration_seconds:
                    type: number
              example:
                text: the quick brown fox
                words:
                  - word: the
                    start: 0.08
                    end: 0.24
                  - word: quick
                    start: 0.24
                    end: 0.52
                duration_seconds: 12.345
        '400':
          description: >-
            Not multipart, missing model, compressed audio, or a sample rate
            outside the model's allowlist. Codes: invalid_content_type,
            missing_model, unsupported_audio_format, invalid_sample_rate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '413':
          description: 'Body over 25 MB. Code: body_too_large.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          description: 'Transcription upstream failed. Code: upstream_unavailable.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 'Model not available. Code: model_offline.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  headers:
    XHopperRequestCostUsd:
      description: >-
        Cost of this request, 6-decimal USD string (e.g. 0.000123). Absent on
        LLM streaming responses; the cost is unknown until the stream ends.
      schema:
        type: string
    XHopperCreditsRemainingUsd:
      description: >-
        Credit balance in USD, 6-decimal string. On LLM streaming responses this
        is the pre-request balance.
      schema:
        type: string
  schemas:
    Error:
      type: object
      description: OpenAI error envelope, used by every error response.
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
            param:
              type:
                - string
                - 'null'
  responses:
    Unauthorized:
      description: >-
        Missing, malformed, or revoked API key. Codes: invalid_api_key,
        api_key_disabled.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: >-
                Incorrect API key provided. Check your key at
                https://withhopper.com/dashboard.
              type: invalid_request_error
              code: invalid_api_key
              param: null
    PaymentRequired:
      description: Credit balance is zero.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: You have run out of credits. Contact us to add more.
              type: insufficient_quota
              code: insufficient_quota
              param: null
    RateLimited:
      description: >-
        Over 600 requests per minute on this key. Retry after the number of
        seconds in Retry-After.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: >-
                Rate limit reached: 600 requests per minute per key. Retry after
                21s.
              type: rate_limit_error
              code: rate_limit_exceeded
              param: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key in the Authorization header: Bearer sk_hopper_... Keys are
        minted in the dashboard at withhopper.com/console/keys and shown once at
        creation. WebSocket connections also accept ?api_key=.

````