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

# Audio Translations API

> Transcribe speech and translate it, into English by default or into another language with target_language.

For runnable examples, see [Speech to Text](https://docs.morphllm.com/models/speech-to-text.md#translation).

## Overview

`POST /v1/audio/translations` is OpenAI-compatible: `client.audio.translations.create(model="morph-transcribe", file=audio)` returns English. Morph adds `target_language`, to translate from English into another language, `url` input in a JSON body, and `prompt` and `keyterms` for names and jargon.

```bash theme={null}
curl --fail-with-body https://api.morphllm.com/v1/audio/translations \
  -H "Authorization: Bearer $MORPH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "morph-transcribe", "url": "https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac", "target_language": "de"}'
```

## Languages

Translation runs into English from ar, bg, cs, da, de, el, es, et, fi, fr, he, hi, hr, hu, it, ja, ko, lt, lv, mt, nl, pl, pt, ro, ru, sk, sl, sv, th, uk and zh, or from English into any of them. `target_language` takes the code or the English name; the default is `en`.

## Options and responses

Only `morph-transcribe` translates. It takes `prompt`, `keyterms[]`, `stream` and the `json`, `text` and `verbose_json` formats; `style`, `diarize`, `tag_audio_events`, timestamps, `srt` and `vtt` are refused with a 400. In `verbose_json`, `language` is the target. `stream: true` returns the same server-sent events as transcription. Usage, limits and errors match [transcription](https://docs.morphllm.com/api-reference/endpoint/audio-transcriptions.md).


## OpenAPI

````yaml POST /v1/audio/translations
openapi: 3.1.0
info:
  title: Morph API
  version: 1.2.0
  description: >-
    The Morph public API at api.morphllm.com: OpenAI- and Anthropic-compatible
    inference (chat completions, messages), Fast Apply code editing, Compact
    context compression, System One typed decisions, speech to text (audio
    transcription and translation), model listing, and dedicated endpoint
    management, agentic credit top-ups paid over x402, account usage and billing
    settings, and organization member budgets. Model ids, prices, and context
    windows are served live at https://www.morphllm.com/api/models/json.
  contact:
    name: Morph
    url: https://morphllm.com
    email: info@morphllm.com
  license:
    name: Proprietary
    url: https://morphllm.com/privacy/tos
servers:
  - url: https://api.morphllm.com
    description: Production
security: []
tags:
  - name: chat
    description: >-
      OpenAI- and Anthropic-compatible chat inference, including Fast Apply and
      WarpGrep models.
  - name: compact
    description: Context compression for long agent conversations.
  - name: systemone
    description: 'Typed decisions: a state in, a probability distribution per question out.'
  - name: audio
    description: >-
      Speech to text: transcription and translation of audio files,
      OpenAI-compatible.
  - name: models
    description: Model listing.
  - name: dedicated
    description: Dedicated endpoint discovery, status, and cancellation.
  - name: credits
    description: Agentic credit top-ups paid in USDC over x402.
  - name: account
    description: >-
      Usage and spend per day; billing settings: extra usage, spend limit and
      alert, auto-reload.
  - name: organization
    description: Organization member budgets.
  - name: telemetry
    description: Usage reporting hooks.
paths:
  /v1/audio/translations:
    post:
      tags:
        - audio
      summary: Translate audio
      description: >-
        Transcribe speech and translate it: into English by default, or into
        another language with `target_language`. OpenAI-compatible, plus
        `target_language`, `keyterms` and `url` input. Upload a multipart
        `file`, or send JSON with an https `url`.
      operationId: createTranslation
      requestBody:
        required: true
        description: The audio and the target language.
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TranslationForm'
          application/json:
            example:
              model: morph-transcribe
              url: >-
                https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac
              target_language: de
            schema:
              $ref: '#/components/schemas/TranslationUrlBody'
      responses:
        '200':
          description: >-
            The translation as `json`, `text` or `verbose_json`, or a
            server-sent event stream when `stream` is true.
          content:
            application/json:
              example:
                text: >-
                  He hoped there would be stew for dinner, turnips and carrots
                  and bruised potatoes and fat mutton pieces to be ladled out in
                  thick, peppered, flour-fattened sauce.
                usage:
                  type: duration
                  seconds: 10.435
                  input_tokens: 131
                  output_tokens: 36
              schema:
                anyOf:
                  - $ref: '#/components/schemas/TranscriptionJson'
                  - $ref: '#/components/schemas/TranscriptionVerbose'
            text/plain:
              example: >-
                He hoped there would be stew for dinner, turnips and carrots and
                bruised potatoes and fat mutton pieces to be ladled out in
                thick, peppered, flour-fattened sauce.
              schema:
                type: string
                description: The translated `text` response.
                example: >-
                  He hoped there would be stew for dinner, turnips and carrots
                  and bruised potatoes and fat mutton pieces to be ladled out in
                  thick, peppered, flour-fattened sauce.
            text/event-stream:
              example: >+
                data: {"type": "transcript.text.delta", "delta": "He hoped there
                would be stew"}


                data: {"type": "transcript.text.delta", "delta": " for dinner,"}


                data: {"type": "transcript.text.done", "text": "He hoped there
                would be stew for dinner, turnips and carrots and bruised
                potatoes and fat mutton pieces to be ladled out in thick,
                peppered, flour-fattened sauce.", "usage": {"type": "tokens",
                "input_tokens": 131, "output_tokens": 36, "total_tokens": 167}}

              schema:
                type: string
                description: Translation deltas, then the done event with usage.
                example: >+
                  data: {"type": "transcript.text.delta", "delta": "He hoped
                  there would be stew"}


                  data: {"type": "transcript.text.delta", "delta": " for
                  dinner,"}


                  data: {"type": "transcript.text.done", "text": "He hoped there
                  would be stew for dinner, turnips and carrots and bruised
                  potatoes and fat mutton pieces to be ladled out in thick,
                  peppered, flour-fattened sauce.", "usage": {"type": "tokens",
                  "input_tokens": 131, "output_tokens": 36, "total_tokens":
                  167}}

        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/SpendLimitReached'
        '413':
          $ref: '#/components/responses/AudioTooLarge'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/SpeechEngineFailed'
      security:
        - bearerAuth: []
components:
  schemas:
    TranslationForm:
      type: object
      properties:
        file:
          $ref: '#/components/schemas/AudioFile'
        model:
          $ref: '#/components/schemas/TranslationModel'
        target_language:
          $ref: '#/components/schemas/TranslationTargetLanguage'
        prompt:
          $ref: '#/components/schemas/TranscriptionPrompt'
        response_format:
          $ref: '#/components/schemas/TranslationResponseFormat'
        stream:
          $ref: '#/components/schemas/TranscriptionStream'
        keyterms[]:
          $ref: '#/components/schemas/TranscriptionKeytermsField'
      required:
        - file
        - model
      description: >-
        A multipart upload to translate. `style`, `diarize`, `tag_audio_events`,
        timestamps and subtitles are refused with a 400.
      example:
        file: interview.mp3
        model: morph-transcribe
        target_language: en
    TranslationUrlBody:
      type: object
      properties:
        url:
          $ref: '#/components/schemas/AudioUrl'
        model:
          $ref: '#/components/schemas/TranslationModel'
        target_language:
          $ref: '#/components/schemas/TranslationTargetLanguage'
        prompt:
          $ref: '#/components/schemas/TranscriptionPrompt'
        response_format:
          $ref: '#/components/schemas/TranslationResponseFormat'
        stream:
          $ref: '#/components/schemas/TranscriptionStream'
        keyterms:
          $ref: '#/components/schemas/TranscriptionKeyterms'
      required:
        - url
        - model
      description: >-
        A JSON body: the audio to translate by `url`, with the same options as
        the multipart form.
      example:
        model: morph-transcribe
        url: https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac
        target_language: de
    TranscriptionJson:
      type: object
      properties:
        text:
          type: string
          description: The transcript, or the translation.
          example: >-
            He hoped there would be stew for dinner, turnips and carrots and
            bruised potatoes and fat mutton pieces to be ladled out in thick,
            peppered, flour-fattened sauce.
        segments:
          type: array
          items:
            $ref: '#/components/schemas/TranscriptionSegment'
          description: Speaker segments, when `diarize` is on.
          example:
            - id: 0
              start: 0.56
              end: 10.08
              text: >-
                He hoped there would be stew for dinner, turnips and carrots and
                bruised potatoes and fat mutton pieces to be ladled out in
                thick, peppered, flour-fattened sauce.
              speaker: null
        truncated:
          $ref: '#/components/schemas/TranscriptionTruncated'
        timestamps_incomplete:
          $ref: '#/components/schemas/TranscriptionTimestampsIncomplete'
        usage:
          $ref: '#/components/schemas/AudioUsage'
      required:
        - text
        - usage
      description: The `json` response.
      example:
        text: >-
          He hoped there would be stew for dinner, turnips and carrots and
          bruised potatoes and fat mutton pieces to be ladled out in thick,
          peppered, flour-fattened sauce.
        usage:
          type: duration
          seconds: 10.435
          input_tokens: 131
          output_tokens: 36
    TranscriptionVerbose:
      type: object
      properties:
        task:
          type: string
          enum:
            - transcribe
            - translate
          description: What was done.
          example: transcribe
        language:
          type: string
          description: >-
            The spoken language (for a translation, the target) as a lowercase
            English name. Present only when known.
          example: english
        duration:
          type: number
          description: Length of the audio in seconds, as in `usage.seconds`.
          example: 10.435
        text:
          type: string
          description: The full transcript or translation.
          example: >-
            He hoped there would be stew for dinner, turnips and carrots and
            bruised potatoes and fat mutton pieces to be ladled out in thick,
            peppered, flour-fattened sauce.
        words:
          type: array
          items:
            type: object
            properties:
              word:
                type: string
                description: The word as written in the transcript.
                example: hoped
              start:
                type: number
                description: Start time in seconds.
                example: 0.72
              end:
                type: number
                description: End time in seconds.
                example: 1.04
              speaker:
                type:
                  - integer
                  - 'null'
                description: Speaker label when `diarize` is on, else null.
                example: 0
            required:
              - word
              - start
              - end
              - speaker
            description: One timed word.
            example:
              word: hoped
              start: 0.72
              end: 1.04
              speaker: null
          description: >-
            Timed words, when timestamps were requested and cover the whole
            transcript.
          example:
            - word: He
              start: 0.56
              end: 0.72
              speaker: null
            - word: hoped
              start: 0.72
              end: 1.04
              speaker: null
        segments:
          type: array
          items:
            $ref: '#/components/schemas/TranscriptionSegment'
          description: Segments, when timestamps or `diarize` were requested.
          example:
            - id: 0
              start: 0.56
              end: 10.08
              text: >-
                He hoped there would be stew for dinner, turnips and carrots and
                bruised potatoes and fat mutton pieces to be ladled out in
                thick, peppered, flour-fattened sauce.
              speaker: null
        truncated:
          $ref: '#/components/schemas/TranscriptionTruncated'
        timestamps_incomplete:
          $ref: '#/components/schemas/TranscriptionTimestampsIncomplete'
        usage:
          $ref: '#/components/schemas/AudioUsage'
      required:
        - task
        - duration
        - text
        - usage
      description: The `verbose_json` response.
      example:
        task: transcribe
        language: english
        duration: 10.435
        text: >-
          He hoped there would be stew for dinner, turnips and carrots and
          bruised potatoes and fat mutton pieces to be ladled out in thick,
          peppered, flour-fattened sauce.
        words:
          - word: He
            start: 0.56
            end: 0.72
            speaker: null
          - word: hoped
            start: 0.72
            end: 1.04
            speaker: null
        segments:
          - id: 0
            start: 0.56
            end: 10.08
            text: >-
              He hoped there would be stew for dinner, turnips and carrots and
              bruised potatoes and fat mutton pieces to be ladled out in thick,
              peppered, flour-fattened sauce.
            speaker: null
        usage:
          type: duration
          seconds: 10.435
          input_tokens: 131
          output_tokens: 36
    AudioFile:
      type: string
      format: binary
      description: >-
        The audio or video file. Anything ffmpeg decodes (mp3, wav, flac, m4a,
        ogg, webm, mp4 and more); the first audio track is used. Up to 180 MB
        and 60 minutes. Send exactly one of `file` or `url`.
      example: meeting.mp3
    TranslationModel:
      type: string
      enum:
        - morph-transcribe
      description: Only `morph-transcribe` translates.
      example: morph-transcribe
    TranslationTargetLanguage:
      type: string
      description: >-
        The language to translate into, as an ISO 639-1 code or an English name.
        Default `en`. Translation runs from English into ar, bg, cs, da, de, el,
        es, et, fi, fr, he, hi, hr, hu, it, ja, ko, lt, lv, mt, nl, pl, pt, ro,
        ru, sk, sl, sv, th, uk, zh, or from any of them into English.
      example: en
    TranscriptionPrompt:
      type: string
      description: >-
        Free-text context about the audio, such as the topic or the names in it,
        to spell words correctly. It is context, not an instruction. With
        `keyterms`, up to 2,000 characters in total.
      example: Quarterly earnings call for Acme Robotics.
    TranslationResponseFormat:
      type: string
      enum:
        - json
        - text
        - verbose_json
      description: >-
        `json` (default), `text` or `verbose_json`. Subtitles and timestamps are
        refused: word times align the source speech, not the translation.
      example: json
    TranscriptionStream:
      type: boolean
      description: >-
        Stream the transcript as server-sent events: `transcript.text.delta`
        events, then one `transcript.text.done` with the full text and usage.
        Works with `json` and `text` response formats.
      example: false
    TranscriptionKeytermsField:
      type: array
      items:
        type: string
      maxItems: 100
      description: >-
        Names and jargon to spell correctly, one form field per term. Up to 100
        terms.
      example:
        - Acme Robotics
        - EBITDA
    AudioUrl:
      type: string
      format: uri
      description: >-
        An https URL the API fetches the audio from: the path for large files.
        Must resolve to a public address; up to 3 redirects, 180 MB and 60
        minutes of audio.
      example: https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac
    TranscriptionKeyterms:
      type: array
      items:
        type: string
      maxItems: 100
      description: Names and jargon to spell correctly. Up to 100 terms.
      example:
        - Acme Robotics
        - EBITDA
    TranscriptionSegment:
      type: object
      properties:
        id:
          type: integer
          description: Segment index, from 0, in `verbose_json`.
          example: 0
        start:
          type:
            - number
            - 'null'
          description: >-
            Start of the first word, in seconds. Null when the segment comes
            without word timestamps.
          example: 0.56
        end:
          type:
            - number
            - 'null'
          description: >-
            End of the last word, in seconds. Null when the segment comes
            without word timestamps.
          example: 10.08
        text:
          type: string
          description: The words of the segment.
          example: >-
            He hoped there would be stew for dinner, turnips and carrots and
            bruised potatoes and fat mutton pieces to be ladled out in thick,
            peppered, flour-fattened sauce.
        speaker:
          type:
            - integer
            - 'null'
          description: >-
            The speaker of every word in the segment when `diarize` is on, else
            null.
          example: 0
      required:
        - start
        - end
        - text
        - speaker
      description: >-
        A run of consecutive speech from one speaker. Without `diarize`, speaker
        is null.
      example:
        id: 0
        start: 0.56
        end: 10.08
        text: >-
          He hoped there would be stew for dinner, turnips and carrots and
          bruised potatoes and fat mutton pieces to be ladled out in thick,
          peppered, flour-fattened sauce.
        speaker: null
    TranscriptionTruncated:
      type: boolean
      enum:
        - true
      description: >-
        Present when the transcript ends before the audio does: it hit the
        per-request output cap of ceil(audio seconds x 16) + 256 tokens (about 4
        tokens per second is normal speech, so this marks a model repetition
        loop), or the model stopped transcribing and the text was cut there.
        Also sent as the header `x-morph-truncated: true`.
      example: true
    TranscriptionTimestampsIncomplete:
      type: boolean
      enum:
        - true
      description: >-
        Present when timestamps were requested and could not be placed for every
        word. `words` is then left out and `segments` carry null times; the text
        is complete. Also sent as the header `x-morph-timestamps-incomplete:
        true`.
      example: true
    AudioUsage:
      type: object
      properties:
        type:
          type: string
          enum:
            - duration
          description: Always `duration`.
          example: duration
        seconds:
          type: number
          description: Audio length in seconds.
          example: 10.435
        input_tokens:
          type: integer
          description: >-
            Billed input: the audio at 12.5 tokens per second, rounded up.
            Instruction, prompt and keyterm tokens are not billed, so this is
            exactly the audio length.
          example: 131
        output_tokens:
          type: integer
          description: Transcript tokens. Output is not billed.
          example: 36
      required:
        - type
        - seconds
        - input_tokens
        - output_tokens
      description: What the request used.
      example:
        type: duration
        seconds: 10.435
        input_tokens: 131
        output_tokens: 36
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request_error
              description: Machine-readable error code.
            message:
              type: string
              example: The request body is missing the `model` field.
              description: Human-readable explanation of the failure.
          required:
            - code
            - message
      required:
        - error
      description: Standard error envelope returned by every non-2xx response.
      example:
        error:
          code: invalid_request_error
          message: The request body is missing the `model` field.
  responses:
    BadRequest:
      description: Malformed request — missing or invalid fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request_error
              message: The request body is missing the `model` field.
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Invalid API key provided.
    SpendLimitReached:
      description: The account reached its monthly spend limit.
      content:
        application/json:
          example:
            error:
              message: Monthly spend limit reached.
              type: quota_exceeded_error
              param: null
              code: monthly_quota_exceeded
    AudioTooLarge:
      description: >-
        The audio is over 180 MB (`file_too_large`) or over 60 minutes
        (`audio_too_long`).
      content:
        application/json:
          example:
            error:
              message: Audio is longer than the 3600 second limit.
              type: invalid_request_error
              param: file
              code: audio_too_long
    RateLimited:
      description: Rate limited — retry after the interval in the Retry-After header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: Too many requests. Retry in 12 seconds.
    InternalError:
      description: Internal error — safe to retry with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: internal_error
              message: Something went wrong on our side.
    SpeechEngineFailed:
      description: The speech engine failed on this request. Safe to retry.
      content:
        application/json:
          example:
            error:
              message: Transcription failed.
              type: api_error
              param: null
              code: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        Morph API key, passed as `Authorization: Bearer sk-...`. Create keys at
        https://www.morphllm.com/dashboard/api-keys.

````

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